Merge "Use FLAG_RECEIVER_FOREGROUND for lock intent" into nyc-dev

am: af77082

* commit 'af77082a22135381180e031392b58a5ba8f5bb67':
  Use FLAG_RECEIVER_FOREGROUND for lock intent

Change-Id: Id834e315a2edb889da2c7824fca9e1854467dfe9
This commit is contained in:
Jorim Jaggi
2016-04-27 20:41:16 +00:00
committed by android-build-merger

View File

@@ -837,6 +837,7 @@ public class KeyguardViewMediator extends SystemUI {
long when = SystemClock.elapsedRealtime() + timeout;
Intent intent = new Intent(DELAYED_KEYGUARD_ACTION);
intent.putExtra("seq", mDelayedShowingSequence);
intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
PendingIntent sender = PendingIntent.getBroadcast(mContext,
0, intent, PendingIntent.FLAG_CANCEL_CURRENT);
mAlarmManager.setExactAndAllowWhileIdle(AlarmManager.ELAPSED_REALTIME_WAKEUP, when, sender);
@@ -857,6 +858,7 @@ public class KeyguardViewMediator extends SystemUI {
Intent lockIntent = new Intent(DELAYED_LOCK_PROFILE_ACTION);
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);
mAlarmManager.setExactAndAllowWhileIdle(AlarmManager.ELAPSED_REALTIME_WAKEUP,