summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorHongyi Zhang <hongyiz@google.com>2020-03-30 18:46:59 -0700
committerHongyi Zhang <hongyiz@google.com>2020-04-02 19:47:21 +0000
commit9ef3ea11cbfe9d30d9f5b2e08a0a661cb938f20e (patch)
treed5ab0dc19944ef15d7ffc8c56f0510b72dc92914 /tools/aapt2/java/JavaClassGenerator_test.cpp
parent754636846c0dd0ba6f8fd025dc3c270efd8bc500 (diff)
Fix RescueParty querying DeviceConfig before SettingsProvider ready
It turns out that PackageWatchdog will invoke RescuePartyObserver.onBootloop very early in the boot sequence(in startBootstrapServices), thus calling into isDisabled() which calls into DeviceConfig.getBoolean before SettingProvider is initialized(in startOtherServices), thus causing an NPE thrown from SettingsProvider. Since we registered namespace "configuration" in SettingsToProperiesMapper.java, DeviceConfig flags from "configuration" will be synced to corresponding persistent sys props. Thus instead of querying DeviceConfig, we can query the system property which is ready at the time that onBootloop is called. Note that the race condition won't cause a problem to DeviceConfig reset on bootloop, since: 1. executeRescueLevel will swallow the exception when reset is attempted before SettingsProvider initialized. Thus won't crashing system server. 2. onSettingsProviderPublished will retry the reset based the incremented rescue level set in executeBootLoopMitigation Bug:152346219 Test: 1. atest RescuePartyTest 2. manually turn on the flag via adb device_config and observe RescuePary is disable during systemui crashloop. Change-Id: Idde46ee5872bc3107cbc8a2ab05b3e1de028d998
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions