Skip to content
Commit 6c000af3 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

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
parent 2c270dd7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment