mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 08:47:46 +00:00
Remove unnecessary start of KeyCachingService.
This commit is contained in:
parent
89f97f57cb
commit
5219d79e27
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user