Skip to content
This repository has been archived by the owner on Nov 7, 2023. It is now read-only.

Commit

Permalink
Merge pull request #18 from emeraldsanto/dev
Browse files Browse the repository at this point in the history
Version 2.4.2
  • Loading branch information
emeraldsanto authored May 30, 2020
2 parents a80d210 + eb65dd0 commit f95df3e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,5 @@ buck-out/
coverage/

# TYPESCRIPT
dist/*
dist/*
*.prefs
2 changes: 1 addition & 1 deletion android/.settings/org.eclipse.buildship.core.prefs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
arguments=
auto.sync=false
build.scans.enabled=false
connection.gradle.distribution=GRADLE_DISTRIBUTION(VERSION(6.0-20191016123526+0000))
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
connection.project.dir=
eclipse.preferences.version=1
gradle.user.home=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@

import android.content.Context;
import android.content.SharedPreferences;
import android.content.res.Resources;
import android.os.Build;
import android.util.Log;

import androidx.security.crypto.EncryptedSharedPreferences;
import androidx.security.crypto.MasterKeys;

import com.facebook.react.bridge.Promise;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
import com.facebook.react.bridge.ReactMethod;

Expand Down Expand Up @@ -102,6 +99,7 @@ public void removeItem(String key, Promise promise) {
}
}

@ReactMethod
public void clear(Promise promise) {
if (this.sharedPreferences == null) {
promise.reject(new NullPointerException("Could not initialize SharedPreferences"));
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "react-native-encrypted-storage",
"title": "React Native Encrypted Storage",
"version": "2.4.1",
"version": "2.4.2",
"description": "A React Native wrapper over SharedPreferences and Keychain to provide a secure alternative to Async Storage",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down

0 comments on commit f95df3e

Please sign in to comment.