Fixes callback on saving and resetting the password on android (#24)
* invoke callback after saving * invoke callback after pw reset
This commit is contained in:
parent
60455e88ce
commit
040b2c2128
|
@ -66,6 +66,7 @@ public class KeychainModule extends ReactContextBaseJavaModule {
|
|||
prefsEditor.putString(service + ":p", encryptedPassword);
|
||||
prefsEditor.apply();
|
||||
Log.d("KeychainModule saved: ", service + encryptedUsername + ":" + encryptedPassword);
|
||||
callback.invoke("", "KeychainModule saved the data");
|
||||
} catch (Exception e) {
|
||||
Log.e("KeychainModule ", e.getLocalizedMessage());
|
||||
callback.invoke(e.getLocalizedMessage());
|
||||
|
@ -124,6 +125,7 @@ public class KeychainModule extends ReactContextBaseJavaModule {
|
|||
prefsEditor.remove(service + ":u");
|
||||
prefsEditor.remove(service + ":p");
|
||||
prefsEditor.apply();
|
||||
callback.invoke("", "KeychainModule password was reset");
|
||||
} catch (Exception e) {
|
||||
//this probably never happens but it is here so that the android api is the same as on iOS
|
||||
callback.invoke(e.getLocalizedMessage());
|
||||
|
|
Loading…
Reference in New Issue