Merge "Protects against a null statusReceiver in uninstall" into qt-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
6dc0388426
@@ -813,7 +813,7 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void uninstall(VersionedPackage versionedPackage, String callerPackageName, int flags,
|
public void uninstall(VersionedPackage versionedPackage, String callerPackageName, int flags,
|
||||||
IntentSender statusReceiver, int userId) throws RemoteException {
|
IntentSender statusReceiver, int userId) {
|
||||||
final int callingUid = Binder.getCallingUid();
|
final int callingUid = Binder.getCallingUid();
|
||||||
mPermissionManager.enforceCrossUserPermission(callingUid, userId, true, true, "uninstall");
|
mPermissionManager.enforceCrossUserPermission(callingUid, userId, true, true, "uninstall");
|
||||||
if ((callingUid != Process.SHELL_UID) && (callingUid != Process.ROOT_UID)) {
|
if ((callingUid != Process.SHELL_UID) && (callingUid != Process.ROOT_UID)) {
|
||||||
@@ -952,6 +952,9 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onUserActionRequired(Intent intent) {
|
public void onUserActionRequired(Intent intent) {
|
||||||
|
if (mTarget == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
final Intent fillIn = new Intent();
|
final Intent fillIn = new Intent();
|
||||||
fillIn.putExtra(PackageInstaller.EXTRA_PACKAGE_NAME, mPackageName);
|
fillIn.putExtra(PackageInstaller.EXTRA_PACKAGE_NAME, mPackageName);
|
||||||
fillIn.putExtra(PackageInstaller.EXTRA_STATUS,
|
fillIn.putExtra(PackageInstaller.EXTRA_STATUS,
|
||||||
@@ -972,6 +975,9 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements
|
|||||||
SystemMessage.NOTE_PACKAGE_STATE,
|
SystemMessage.NOTE_PACKAGE_STATE,
|
||||||
mNotification);
|
mNotification);
|
||||||
}
|
}
|
||||||
|
if (mTarget == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
final Intent fillIn = new Intent();
|
final Intent fillIn = new Intent();
|
||||||
fillIn.putExtra(PackageInstaller.EXTRA_PACKAGE_NAME, mPackageName);
|
fillIn.putExtra(PackageInstaller.EXTRA_PACKAGE_NAME, mPackageName);
|
||||||
fillIn.putExtra(PackageInstaller.EXTRA_STATUS,
|
fillIn.putExtra(PackageInstaller.EXTRA_STATUS,
|
||||||
|
|||||||
Reference in New Issue
Block a user