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

Commit ef2a4c38 authored by jianzhou's avatar jianzhou Committed by Chris Tate
Browse files

AlarmManagerService: Fix FWR before boot completed

Root cause: AlarmManagerService send broadcast of TIMEZONE_CHANGED
before boot completed lead to IllegalStateException in AMS and system
skip StartWindowManagerService, and finally got crashed.
Modification: add flag Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT.

Change-Id: Iab9cd5acfeabd114371a8aaaa406a4a1c5919f98
Test: Monkey
Bug: 79550062
parent be0d76d3
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1675,6 +1675,7 @@ class AlarmManagerService extends SystemService {
            Intent intent = new Intent(Intent.ACTION_TIMEZONE_CHANGED);
            intent.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING
                    | Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND
                    | Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT
                    | Intent.FLAG_RECEIVER_VISIBLE_TO_INSTANT_APPS);
            intent.putExtra("time-zone", zone.getID());
            getContext().sendBroadcastAsUser(intent, UserHandle.ALL);