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

Commit acce5e4a authored by jianzhou's avatar jianzhou Committed by Christopher 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
Merged-In: Iab9cd5acfeabd114371a8aaaa406a4a1c5919f98
Test: Monkey
Bug: 79550062

(Cherrypick for R)

Change-Id: I802b90c55946cfac0f64cb69072588b0acb03cc2
parent 680c708a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1670,6 +1670,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);