Merge "Work around AM ContentObserver timing issue"

This commit is contained in:
Courtney Goeltzenleuchter
2020-02-11 23:21:03 +00:00
committed by Android (Google) Code Review
2 changed files with 14 additions and 0 deletions

View File

@@ -19397,6 +19397,13 @@ public class ActivityManagerService extends IActivityManager.Stub
}
}
/**
* Force the settings cache to be loaded
*/
void refreshSettingsCache() {
mCoreSettingsObserver.onChange(true);
}
/**
* Kill processes for the user with id userId and that depend on the package named packageName
*/

View File

@@ -306,6 +306,8 @@ final class ActivityManagerShellCommand extends ShellCommand {
return runWaitForBroadcastIdle(pw);
case "compat":
return runCompat(pw);
case "refresh-settings-cache":
return runRefreshSettingsCache();
default:
return handleDefaultCommands(cmd);
}
@@ -2940,6 +2942,11 @@ final class ActivityManagerShellCommand extends ShellCommand {
return 0;
}
int runRefreshSettingsCache() throws RemoteException {
mInternal.refreshSettingsCache();
return 0;
}
private int runCompat(PrintWriter pw) throws RemoteException {
final PlatformCompat platformCompat = (PlatformCompat)
ServiceManager.getService(Context.PLATFORM_COMPAT_SERVICE);