Merge \"Prevent crash from null ApplicationInfo after package is removed.\" into nyc-dev

am: 42edc7c2c2

Change-Id: Ieaef2531a5f4c7bd462917d5c6a12b0095938211
This commit is contained in:
Chong Zhang
2016-06-13 22:43:08 +00:00
committed by android-build-merger

View File

@@ -17784,6 +17784,11 @@ public final class ActivityManagerService extends ActivityManagerNative
getPackageManagerInternalLocked().getApplicationInfo(
ssp,
userId);
if (aInfo == null) {
Slog.w(TAG, "Dropping ACTION_PACKAGE_REPLACED for non-existent pkg:"
+ " ssp=" + ssp + " data=" + data);
return ActivityManager.BROADCAST_SUCCESS;
}
mStackSupervisor.updateActivityApplicationInfoLocked(aInfo);
sendPackageBroadcastLocked(IApplicationThread.PACKAGE_REPLACED,
new String[] {ssp}, userId);