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

Commit 694f2458 authored by Tony Mak's avatar Tony Mak
Browse files

Send ACTION_POWER_SAVE_MODE_CHANGED to all user

Fix: 36174715

Test: Install an app that listens to ACTION_POWER_SAVE_MODE_CHANGED in
      work profile. Make sure it receives the broadcast.

Change-Id: I26df6710bc996792212d52189cd04bd2d30ac6d1
parent a017e573
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -991,7 +991,7 @@ public final class PowerManagerService extends SystemService
                    }
                    }
                    intent = new Intent(PowerManager.ACTION_POWER_SAVE_MODE_CHANGED);
                    intent = new Intent(PowerManager.ACTION_POWER_SAVE_MODE_CHANGED);
                    intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY);
                    intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY);
                    mContext.sendBroadcast(intent);
                    mContext.sendBroadcastAsUser(intent, UserHandle.ALL);
                    // Send internal version that requires signature permission.
                    // Send internal version that requires signature permission.
                    intent = new Intent(PowerManager.ACTION_POWER_SAVE_MODE_CHANGED_INTERNAL);
                    intent = new Intent(PowerManager.ACTION_POWER_SAVE_MODE_CHANGED_INTERNAL);
                    intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY);
                    intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY);