Skip to content

Commit d67fc1e

Browse files
committed
Add some helper methods to set and get the build fingerprint
1 parent 489b1d9 commit d67fc1e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

app/src/main/java/fuzion24/device/vulnerability/util/SharedPreferencesUtils.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ public class SharedPreferencesUtils {
1313
private static final String PREFS_LAST_LIST_OF_SCANS = "PREFS_LIST_OF_SCANS";
1414
private static final String PREFS_FIRST_RUN = "PREFS_FIRST_RUN";
1515
private static final String PREFS_AUTOMATIC_SHARING_ENABLE = "PREFS_AUTOMATIC_SHARING_ENABLE";
16+
private static final String BUILD_FINGERPRINT_HASH = "BUILD_FINGERPRINT_HASH";
17+
1618

1719
private static final String PREFS_NAME = "com.nowsecure.android.vts.PREFERENCE_FILE_KEY";
1820

@@ -57,4 +59,16 @@ public static void setTheListOfScansAvailable(Context context, List<String> list
5759
editor.apply();
5860
}
5961

62+
public static void setBuildUpdateFingerPrint(Context context, String fingerprint){
63+
SharedPreferences.Editor editor = getPreferences(context).edit();
64+
65+
editor.putString(BUILD_FINGERPRINT_HASH, fingerprint);
66+
67+
editor.apply();
68+
}
69+
70+
public static String getBuildUpdateFingerprint(Context context){
71+
return getPreferences(context).getString(BUILD_FINGERPRINT_HASH, null);
72+
}
73+
6074
}

0 commit comments

Comments
 (0)