Run the screen on/off broadcasts at foreground priority

Bug 6643559

Change-Id: I392f11dabea518238d0f4336c3663bf5c7d46146
This commit is contained in:
Christopher Tate
2012-06-14 17:00:48 -07:00
parent a676cdab11
commit 2cb1357d1b

View File

@ -618,9 +618,11 @@ public class PowerManagerService extends IPowerManager.Stub
PowerManager.PARTIAL_WAKE_LOCK, "Proximity Partial", false);
mScreenOnIntent = new Intent(Intent.ACTION_SCREEN_ON);
mScreenOnIntent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY);
mScreenOnIntent.addFlags(
Intent.FLAG_RECEIVER_REGISTERED_ONLY | Intent.FLAG_RECEIVER_FOREGROUND);
mScreenOffIntent = new Intent(Intent.ACTION_SCREEN_OFF);
mScreenOffIntent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY);
mScreenOffIntent.addFlags(
Intent.FLAG_RECEIVER_REGISTERED_ONLY | Intent.FLAG_RECEIVER_FOREGROUND);
Resources resources = mContext.getResources();