Skip to content

Commit eee7680

Browse files
Numoywestracer
authored andcommitted
fix(app): use correct application context
1 parent f0fb965 commit eee7680

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)