Remove redundant locking.

This commit is contained in:
akwizgran
2018-07-27 14:18:31 +01:00
parent abaefacb69
commit adbfa26364
3 changed files with 20 additions and 20 deletions

View File

@@ -35,15 +35,14 @@ class AndroidAccountManager extends AccountManagerImpl
appContext = app.getApplicationContext();
}
// Locking: stateChangeLock
@Override
@Nullable
protected String loadEncryptedDatabaseKey() {
synchronized (stateChangeLock) {
String key = getDatabaseKeyFromPreferences();
if (key == null) key = super.loadEncryptedDatabaseKey();
else migrateDatabaseKeyToFile(key);
return key;
}
String key = getDatabaseKeyFromPreferences();
if (key == null) key = super.loadEncryptedDatabaseKey();
else migrateDatabaseKeyToFile(key);
return key;
}
// Locking: stateChangeLock