Automated import from //branches/master/...@140830,140830
This commit is contained in:
committed by
The Android Open Source Project
parent
678764730b
commit
04750b6b43
@@ -3248,12 +3248,18 @@ class PackageManagerService extends IPackageManager.Stub {
|
||||
res.removedInfo.sendBroadcast(false, true);
|
||||
Bundle extras = new Bundle(1);
|
||||
extras.putInt(Intent.EXTRA_UID, res.uid);
|
||||
if (res.removedInfo.removedPackage != null) {
|
||||
final boolean update = res.removedInfo.removedPackage != null;
|
||||
if (update) {
|
||||
extras.putBoolean(Intent.EXTRA_REPLACING, true);
|
||||
}
|
||||
sendPackageBroadcast(Intent.ACTION_PACKAGE_ADDED,
|
||||
res.pkg.applicationInfo.packageName,
|
||||
extras);
|
||||
if (update) {
|
||||
sendPackageBroadcast(Intent.ACTION_PACKAGE_REPLACED,
|
||||
res.pkg.applicationInfo.packageName,
|
||||
extras);
|
||||
}
|
||||
}
|
||||
Runtime.getRuntime().gc();
|
||||
}
|
||||
|
||||
@@ -10142,11 +10142,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
||||
// this decision.
|
||||
boolean skip = false;
|
||||
if (intent.ACTION_PACKAGE_ADDED.equals(intent.getAction())) {
|
||||
// If this is replacing an existing package, then we allow it
|
||||
// to see the broadcast for it to restart itself.
|
||||
if (!intent.getBooleanExtra(Intent.EXTRA_REPLACING, false)) {
|
||||
skip = true;
|
||||
}
|
||||
skip = true;
|
||||
} else if (intent.ACTION_PACKAGE_RESTARTED.equals(intent.getAction())) {
|
||||
skip = true;
|
||||
} else if (intent.ACTION_PACKAGE_DATA_CLEARED.equals(intent.getAction())) {
|
||||
|
||||
Reference in New Issue
Block a user