Merge "[RESTRICT AUTOMERGE] Correct the behavior of ACTION_PACKAGE_DATA_CLEARED" into qt-dev
This commit is contained in:
@@ -4075,20 +4075,23 @@ public class ActivityManagerService extends IActivityManager.Stub
|
|||||||
finishForceStopPackageLocked(packageName, appInfo.uid);
|
finishForceStopPackageLocked(packageName, appInfo.uid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
final Intent intent = new Intent(Intent.ACTION_PACKAGE_DATA_CLEARED,
|
|
||||||
Uri.fromParts("package", packageName, null));
|
if (succeeded) {
|
||||||
intent.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND);
|
final Intent intent = new Intent(Intent.ACTION_PACKAGE_DATA_CLEARED,
|
||||||
intent.putExtra(Intent.EXTRA_UID, (appInfo != null) ? appInfo.uid : -1);
|
Uri.fromParts("package", packageName, null /* fragment */));
|
||||||
intent.putExtra(Intent.EXTRA_USER_HANDLE, resolvedUserId);
|
intent.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND);
|
||||||
if (isInstantApp) {
|
intent.putExtra(Intent.EXTRA_UID, (appInfo != null) ? appInfo.uid : -1);
|
||||||
intent.putExtra(Intent.EXTRA_PACKAGE_NAME, packageName);
|
intent.putExtra(Intent.EXTRA_USER_HANDLE, resolvedUserId);
|
||||||
broadcastIntentInPackage("android", SYSTEM_UID, uid, pid, intent, null,
|
if (isInstantApp) {
|
||||||
null, 0, null, null, permission.ACCESS_INSTANT_APPS, null, false,
|
intent.putExtra(Intent.EXTRA_PACKAGE_NAME, packageName);
|
||||||
false, resolvedUserId, false);
|
}
|
||||||
} else {
|
|
||||||
broadcastIntentInPackage("android", SYSTEM_UID, uid, pid, intent, null,
|
broadcastIntentInPackage("android", SYSTEM_UID, uid, pid,
|
||||||
null, 0, null, null, null, null, false, false, resolvedUserId,
|
intent, null /* resolvedType */, null /* resultTo */,
|
||||||
false);
|
0 /* resultCode */, null /* resultData */, null /* resultExtras */,
|
||||||
|
isInstantApp ? permission.ACCESS_INSTANT_APPS : null,
|
||||||
|
null /* bOptions */, false /* serialized */, false /* sticky */,
|
||||||
|
resolvedUserId, false /* allowBackgroundActivityStarts */);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (observer != null) {
|
if (observer != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user