Loading packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +5 −1 Original line number Diff line number Diff line Loading @@ -1083,6 +1083,7 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable, final IntentFilter delayedActionFilter = new IntentFilter(); delayedActionFilter.addAction(DELAYED_KEYGUARD_ACTION); delayedActionFilter.addAction(DELAYED_LOCK_PROFILE_ACTION); delayedActionFilter.setPriority(IntentFilter.SYSTEM_HIGH_PRIORITY); mContext.registerReceiver(mDelayedLockBroadcastReceiver, delayedActionFilter, SYSTEMUI_PERMISSION, null /* scheduler */, Context.RECEIVER_EXPORTED_UNAUDITED); Loading Loading @@ -1392,6 +1393,7 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable, // Lock in the future long when = SystemClock.elapsedRealtime() + timeout; Intent intent = new Intent(DELAYED_KEYGUARD_ACTION); intent.setPackage(mContext.getPackageName()); intent.putExtra("seq", mDelayedShowingSequence); intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND); PendingIntent sender = PendingIntent.getBroadcast(mContext, Loading @@ -1412,11 +1414,13 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable, } else { long userWhen = SystemClock.elapsedRealtime() + userTimeout; Intent lockIntent = new Intent(DELAYED_LOCK_PROFILE_ACTION); lockIntent.setPackage(mContext.getPackageName()); lockIntent.putExtra("seq", mDelayedProfileShowingSequence); lockIntent.putExtra(Intent.EXTRA_USER_ID, profileId); lockIntent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND); PendingIntent lockSender = PendingIntent.getBroadcast( mContext, 0, lockIntent, PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_MUTABLE_UNAUDITED); mContext, 0, lockIntent, PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_IMMUTABLE); mAlarmManager.setExactAndAllowWhileIdle(AlarmManager.ELAPSED_REALTIME_WAKEUP, userWhen, lockSender); } Loading Loading
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +5 −1 Original line number Diff line number Diff line Loading @@ -1083,6 +1083,7 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable, final IntentFilter delayedActionFilter = new IntentFilter(); delayedActionFilter.addAction(DELAYED_KEYGUARD_ACTION); delayedActionFilter.addAction(DELAYED_LOCK_PROFILE_ACTION); delayedActionFilter.setPriority(IntentFilter.SYSTEM_HIGH_PRIORITY); mContext.registerReceiver(mDelayedLockBroadcastReceiver, delayedActionFilter, SYSTEMUI_PERMISSION, null /* scheduler */, Context.RECEIVER_EXPORTED_UNAUDITED); Loading Loading @@ -1392,6 +1393,7 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable, // Lock in the future long when = SystemClock.elapsedRealtime() + timeout; Intent intent = new Intent(DELAYED_KEYGUARD_ACTION); intent.setPackage(mContext.getPackageName()); intent.putExtra("seq", mDelayedShowingSequence); intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND); PendingIntent sender = PendingIntent.getBroadcast(mContext, Loading @@ -1412,11 +1414,13 @@ public class KeyguardViewMediator extends CoreStartable implements Dumpable, } else { long userWhen = SystemClock.elapsedRealtime() + userTimeout; Intent lockIntent = new Intent(DELAYED_LOCK_PROFILE_ACTION); lockIntent.setPackage(mContext.getPackageName()); lockIntent.putExtra("seq", mDelayedProfileShowingSequence); lockIntent.putExtra(Intent.EXTRA_USER_ID, profileId); lockIntent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND); PendingIntent lockSender = PendingIntent.getBroadcast( mContext, 0, lockIntent, PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_MUTABLE_UNAUDITED); mContext, 0, lockIntent, PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_IMMUTABLE); mAlarmManager.setExactAndAllowWhileIdle(AlarmManager.ELAPSED_REALTIME_WAKEUP, userWhen, lockSender); } Loading