Add 'constraints' and 'key preferences' sections to logs.

This commit is contained in:
Greyson Parrelli
2021-01-14 19:22:47 -05:00
parent 577d2b13ca
commit 727175e4f4
6 changed files with 79 additions and 3 deletions

View File

@@ -80,7 +80,13 @@ public class KeyCachingService extends Service {
public KeyCachingService() {}
public static synchronized boolean isLocked(Context context) {
return masterSecret == null && (!TextSecurePreferences.isPasswordDisabled(context) || TextSecurePreferences.isScreenLockEnabled(context));
boolean locked = masterSecret == null && (!TextSecurePreferences.isPasswordDisabled(context) || TextSecurePreferences.isScreenLockEnabled(context));
if (locked) {
Log.d(TAG, "Locked! PasswordDisabled: " + TextSecurePreferences.isPasswordDisabled(context) + ", ScreenLock: " + TextSecurePreferences.isScreenLockEnabled(context));
}
return locked;
}
public static synchronized @Nullable MasterSecret getMasterSecret(Context context) {