Skip to content

Commit 05b9a6f

Browse files
committed
fix(app): use correct application context
1 parent c24f4e0 commit 05b9a6f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flutter_secure_storage/android/src/main/java/com/it_nomads/fluttersecurestorage/FlutterSecureStoragePlugin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ private boolean initSecureStorage(Result result, Map<String, Object> options) {
5454
if (secureStorage != null) return true;
5555

5656
try {
57-
isStrongBoxAvailable = getContext().getPackageManager().hasSystemFeature(PackageManager.FEATURE_STRONGBOX_KEYSTORE);
57+
isStrongBoxAvailable = binding.getApplicationContext().getPackageManager().hasSystemFeature(PackageManager.FEATURE_STRONGBOX_KEYSTORE);
5858
secureStorage = new FlutterSecureStorage(binding.getApplicationContext(), options);
5959
return true;
6060
} catch (Exception e) {

0 commit comments

Comments
 (0)