Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2cb1357d authored by Christopher Tate's avatar Christopher Tate
Browse files

Run the screen on/off broadcasts at foreground priority

Bug 6643559

Change-Id: I392f11dabea518238d0f4336c3663bf5c7d46146
parent a676cdab
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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();