mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-03-03 07:48:36 +00:00
Don't cancel KeyCachingService if not necessary.
This relates to #12043. There's some xiaomi-specific issue, and this code was causing a pending intent creation on every app startup, preventing it from opening. This call shouldn't be necessary unless screenlock is active.
This commit is contained in:
committed by
Alex Hart
parent
8a75d78ce7
commit
c0e1507ef4
@@ -103,7 +103,9 @@ public class KeyCachingService extends Service {
|
||||
}
|
||||
|
||||
public static void onAppForegrounded(@NonNull Context context) {
|
||||
ServiceUtil.getAlarmManager(context).cancel(buildExpirationPendingIntent(context));
|
||||
if (TextSecurePreferences.isScreenLockEnabled(context) || !TextSecurePreferences.isPasswordDisabled(context)) {
|
||||
ServiceUtil.getAlarmManager(context).cancel(buildExpirationPendingIntent(context));
|
||||
}
|
||||
}
|
||||
|
||||
public static void onAppBackgrounded(@NonNull Context context) {
|
||||
|
||||
Reference in New Issue
Block a user