From 4b6af5fa63909060225b8756319273fcedcd0898 Mon Sep 17 00:00:00 2001 From: Jennifer Wang Date: Thu, 18 Aug 2016 10:29:34 -0700 Subject: [PATCH] Add wrapper class for async storage Reviewed By: wsanville Differential Revision: D3654554 fbshipit-source-id: bc21da4b5c46228136cc80592f84206d2deb541e --- .../facebook/react/modules/storage/AsyncLocalStorageUtil.java | 4 ++-- .../facebook/react/modules/storage/ReactDatabaseSupplier.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/modules/storage/AsyncLocalStorageUtil.java b/ReactAndroid/src/main/java/com/facebook/react/modules/storage/AsyncLocalStorageUtil.java index 78b58639d..ea6487c9b 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/modules/storage/AsyncLocalStorageUtil.java +++ b/ReactAndroid/src/main/java/com/facebook/react/modules/storage/AsyncLocalStorageUtil.java @@ -31,7 +31,7 @@ import static com.facebook.react.modules.storage.ReactDatabaseSupplier.VALUE_COL /** * Helper for database operations. */ -/* package */ class AsyncLocalStorageUtil { +public class AsyncLocalStorageUtil { /** * Build the String required for an SQL select statement: @@ -60,7 +60,7 @@ import static com.facebook.react.modules.storage.ReactDatabaseSupplier.VALUE_COL /** * Returns the value of the given key, or null if not found. */ - /* package */ static @Nullable String getItemImpl(SQLiteDatabase db, String key) { + public static @Nullable String getItemImpl(SQLiteDatabase db, String key) { String[] columns = {VALUE_COLUMN}; String[] selectionArgs = {key}; diff --git a/ReactAndroid/src/main/java/com/facebook/react/modules/storage/ReactDatabaseSupplier.java b/ReactAndroid/src/main/java/com/facebook/react/modules/storage/ReactDatabaseSupplier.java index 87f9daf5c..9787ddf6a 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/modules/storage/ReactDatabaseSupplier.java +++ b/ReactAndroid/src/main/java/com/facebook/react/modules/storage/ReactDatabaseSupplier.java @@ -112,7 +112,7 @@ public class ReactDatabaseSupplier extends SQLiteOpenHelper { /** * Create and/or open the database. */ - /* package */ synchronized SQLiteDatabase get() { + public synchronized SQLiteDatabase get() { ensureDatabase(); return mDb; }