am 486a9942: Merge "[ActivityManager] Use synchronized to protect object"
automerge: e3b07b4
* commit 'e3b07b4856d55f7d96dcb25e3749c7cce1a1cd3d':
[ActivityManager] Use synchronized to protect object
This commit is contained in:
@@ -4187,6 +4187,7 @@ public final class ActivityThread {
|
|||||||
final void handleDispatchPackageBroadcast(int cmd, String[] packages) {
|
final void handleDispatchPackageBroadcast(int cmd, String[] packages) {
|
||||||
boolean hasPkgInfo = false;
|
boolean hasPkgInfo = false;
|
||||||
if (packages != null) {
|
if (packages != null) {
|
||||||
|
synchronized (mResourcesManager) {
|
||||||
for (int i=packages.length-1; i>=0; i--) {
|
for (int i=packages.length-1; i>=0; i--) {
|
||||||
//Slog.i(TAG, "Cleaning old package: " + packages[i]);
|
//Slog.i(TAG, "Cleaning old package: " + packages[i]);
|
||||||
if (!hasPkgInfo) {
|
if (!hasPkgInfo) {
|
||||||
@@ -4205,6 +4206,7 @@ public final class ActivityThread {
|
|||||||
mResourcePackages.remove(packages[i]);
|
mResourcePackages.remove(packages[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
ApplicationPackageManager.handlePackageBroadcast(cmd, packages,
|
ApplicationPackageManager.handlePackageBroadcast(cmd, packages,
|
||||||
hasPkgInfo);
|
hasPkgInfo);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user