summaryrefslogtreecommitdiff
path: root/libs/androidfw/ObbFile.cpp
diff options
context:
space:
mode:
author Riddle Hsu <riddlehsu@google.com> 2023-06-26 14:22:02 +0000
committer Riddle Hsu <riddlehsu@google.com> 2023-06-27 06:56:04 +0000
commit6c000af3b40c2b3244579c5ee214deb74584709a (patch)
tree0d217127be5affc5d5caeae43955662b374c4238 /libs/androidfw/ObbFile.cpp
parent2c270dd7a432fb3237b9bd354e3911f1e0df2bfd (diff)
Write app warning configs on IO thread
- readConfigFromFileAmsThread is called from the constructor of ActivityManagerService, which runs on main thread with allowing IO during booting. And because it is done in constructor, there is no synchronization concern. - Previously writeConfigToFileAmsThread runs by ConfigHandler which executes on display thread, which is not allowed to perform IO operations. So move it to IO thread. - Also optimize a bit that it doesn't need to write config every time when a package is removed or cleared data. It only needs to write if there was a corresponding config of the package. Bug: 286620755 Test: atest DeprecatedTargetSdkTest Test: Launch an app with targetSdk < 28 Click "Ok" of the warning dialog, wait 10s, reboot. Launch the app again. The dialog won't popup again. Change-Id: I128963718054e8ba4254153ca543e4964e423f04
Diffstat (limited to 'libs/androidfw/ObbFile.cpp')
0 files changed, 0 insertions, 0 deletions