Cross-device sync implementation ()

* first run updates for sync
* finish sync implementation and fix build for openssl 1.1.1b required for sdk
* fix openssl recipe and tweak build
* fix NativeModules import on wallet page
* display total wallet balance. fix dispatch prop.
* add pipeline status to README.md
* remove unused build recipes
* hide 'No, thanks' button during email new request
* bumpversion 0.6.0 --> 0.6.1
* move unclaimed reward amount to the left of floating wallet balance
* Upgrade to React Native 0.59.3 ()
* upgrade to react native 0.59.3
* add FOREGROUND_SERVICE permission for Android 9 Pie (target sdk 28)
* put android.permission.FOREGROUND_SERVICE permission directly in AndroidManifest
* allow cleartext traffic
* minor copy changes
* enable secure password input and auto account_unlock on startup
This commit is contained in:
Akinwale Ariwodola 2019-04-22 13:42:47 +01:00 committed by GitHub
parent 3d1b07f11c
commit d0226ab4cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 462 additions and 8038 deletions
src/main/java/io/lbry/browser/reactmodules

View file

@ -33,6 +33,7 @@ import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Random;
import java.security.KeyStore;
import io.lbry.browser.MainActivity;
import io.lbry.browser.R;
@ -52,9 +53,16 @@ public class UtilityModule extends ReactContextBaseJavaModule {
private Context context;
private KeyStore keyStore;
public UtilityModule(ReactApplicationContext reactContext) {
super(reactContext);
this.context = reactContext;
try {
this.keyStore = Utils.initKeyStore(context);
} catch (Exception ex) {
// continue without keystore
}
}
@Override
@ -300,4 +308,21 @@ public class UtilityModule extends ReactContextBaseJavaModule {
(Build.BRAND.startsWith("generic") && Build.DEVICE.startsWith("generic"))
);
}
@ReactMethod
public void setSecureValue(String key, String value) {
if (keyStore != null) {
Utils.setSecureValue(key, value, context, keyStore);
}
}
@ReactMethod
public void getSecureValue(String key, Promise promise) {
if (keyStore == null) {
promise.reject("no keyStore found");
return;
}
promise.resolve(Utils.getSecureValue(key, context, keyStore));
}
}