commit | c26013462c1fd17ca2947b785f63e8081a8f5cb9 | [log] [tgz] |
---|---|---|
author | JW Wang <wangchun@google.com> | Tue Jun 30 16:38:29 2020 +0800 |
committer | JW Wang <wangchun@google.com> | Fri Jul 10 01:03:18 2020 +0000 |
tree | bca800f26d17d5944a17389b89c6a755c7fa2fe5 | |
parent | 11894cace7374be508650989af9472dd536f495f [diff] |
Add a method to notify when is safe to send broadcasts See https://source.corp.google.com/android/frameworks/base/services/core/java/com/android/server/pm/PackageInstallerService.java;rcl=45f6b4ce664df69d4f7db33f6d413a2574973121;l=286-288 It is possible for broadcasts to be rejected by AMS with an exception even if mOkToSendBroadcasts is true. This causes b/160106846 and crashes the system server which then fails staged installs as well as StagedInstallTest. Lifecycle listens to boot phases and calls #onBroadcastReady to notify that it is now safe to send broadcasts. Bug: 160106846 Test: atest StagedInstallTest Change-Id: I984167c592411a1685e9d9f714d1cb22f0bc9964