diff options
author | Suprabh Shukla <suprabh@google.com> | 2019-04-05 16:34:19 -0700 |
---|---|---|
committer | Suprabh Shukla <suprabh@google.com> | 2019-04-09 21:00:10 +0000 |
commit | acc75528ffda2360dc7a3e5a4dbe8f3ecd71dc27 (patch) | |
tree | 0bf4b830b1c673b50378c35bd8799887fb19a0ad /packages/PackageInstaller/src | |
parent | 35ed6c34c7274333911b4add55c29aa8e5538cf7 (diff) |
OP_REQUEST_INSTALL_PACKAGES denied by default
Some system apps may download unknown content and the user should
be explicitly asked whether they trust these files. System apps should
explicitly use the extra NOT_UNKNOWN_SOURCE to bypass this check.
Test: Builds, boots, existing tests pass:
atest CtsPackageInstallTestCases
Locally verified they pass if CtsPackageInstallTestCases.apk was signed by
the platform cert.
Bug: 123700348
Change-Id: I2578251906f6656b83464d1c4fc4db99165841c9
Diffstat (limited to 'packages/PackageInstaller/src')
-rw-r--r-- | packages/PackageInstaller/src/com/android/packageinstaller/PackageInstallerActivity.java | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/packages/PackageInstaller/src/com/android/packageinstaller/PackageInstallerActivity.java b/packages/PackageInstaller/src/com/android/packageinstaller/PackageInstallerActivity.java index bde1b25b914f..55ff591e3a1f 100644 --- a/packages/PackageInstaller/src/com/android/packageinstaller/PackageInstallerActivity.java +++ b/packages/PackageInstaller/src/com/android/packageinstaller/PackageInstallerActivity.java @@ -43,7 +43,6 @@ import android.content.pm.PackageUserState; import android.net.Uri; import android.os.Bundle; import android.os.Process; -import android.os.RemoteException; import android.os.UserManager; import android.provider.Settings; import android.util.Log; @@ -472,16 +471,6 @@ public class PackageInstallerActivity extends AlertActivity { mOriginatingUid, mOriginatingPackage); switch (appOpMode) { case AppOpsManager.MODE_DEFAULT: - try { - int result = mIpm.checkUidPermission( - Manifest.permission.REQUEST_INSTALL_PACKAGES, mOriginatingUid); - if (result == PackageManager.PERMISSION_GRANTED) { - initiateInstall(); - break; - } - } catch (RemoteException exc) { - Log.e(TAG, "Unable to talk to package manager"); - } mAppOpsManager.setMode(appOpCode, mOriginatingUid, mOriginatingPackage, AppOpsManager.MODE_ERRORED); // fall through |