Replace PackageManagerInternal with PackageManager.
PackageManagerInternal in LocaleManagerService allowed any app to query for another app's existence by looking at the exception message thrown by the LocaleManager's get/set APIs. External PM, on the other hand, does package visibility filtering which restricts regular apps from querying information about other apps. Bug: 225881167 Bug: 226900861 Test: atest CtsLocaleManagerTestCases Test: atest CtsLocaleManagerHostTestCases Test: atest CtsBackupTestCases:AppLocalesBackupTest Test: atest LocaleManagerServiceTest Test: atest LocaleManagerBackupRestoreTest Test: atest SystemAppUpdateTrackerTest Test: Manually tested by flashing and verifying that the test app (PocProject) attached in the bug is not able to query app existence, and also verifying that Settings and PlayStore are able to get/set any app's locales. Also tested multi-user and work profiles. Change-Id: If00016e7afd7f6552b6c66984cc0194d1bc449b1
Loading
Please register or sign in to comment