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
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user