mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-10-06 07:44:03 +01:00
Remove unnecessary start of KeyCachingService.
This commit is contained in:
1 parent
89f97f57cb
commit
5219d79e27
2 files changed
+2
-7
No files matched your search
@@ -96,7 +96,7 @@ public class MmsDownloadJob extends MasterSecretJob {
|
||||
|
||||
@Override
|
||||
public void onAdded() {
|
||||
if (automatic && KeyCachingService.getMasterSecret(context) == null) {
|
||||
if (automatic && KeyCachingService.isLocked(context)) {
|
||||
DatabaseFactory.getMmsDatabase(context).markIncomingNotificationReceived(threadId);
|
||||
MessageNotifier.updateNotification(context);
|
||||
}
|
||||
|
||||
@@ -89,12 +89,7 @@ public class KeyCachingService extends Service {
|
||||
public static synchronized @Nullable MasterSecret getMasterSecret(Context context) {
|
||||
if (masterSecret == null && (TextSecurePreferences.isPasswordDisabled(context) && !TextSecurePreferences.isScreenLockEnabled(context))) {
|
||||
try {
|
||||
MasterSecret masterSecret = MasterSecretUtil.getMasterSecret(context, MasterSecretUtil.UNENCRYPTED_PASSPHRASE);
|
||||
Intent intent = new Intent(context, KeyCachingService.class);
|
||||
|
||||
context.startService(intent);
|
||||
|
||||
return masterSecret;
|
||||
return MasterSecretUtil.getMasterSecret(context, MasterSecretUtil.UNENCRYPTED_PASSPHRASE);
|
||||
} catch (InvalidPassphraseException e) {
|
||||
Log.w("KeyCachingService", e);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user