Merge "Run the screen on/off broadcasts at foreground priority" into jb-dev

This commit is contained in:
Christopher Tate
2012-06-14 17:34:28 -07:00
committed by Android (Google) Code Review

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();