summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Dombroski <cdombroski@google.com>2019-04-24 13:13:22 -0700
committerhamzeh <hamzeh@google.com>2019-05-10 14:19:36 -0700
commitc3a4cf721d272e9ecc6910f15fdb2ad598f83a92 (patch)
tree7f19a18845330f3e786c7e8dad8bde9b1ae1d885
parent8c0ef16adf0d20b7e821b375df1833c66cb758bc (diff)
downloadandroid_packages_apps_PackageInstaller-c3a4cf721d272e9ecc6910f15fdb2ad598f83a92.tar.gz
android_packages_apps_PackageInstaller-c3a4cf721d272e9ecc6910f15fdb2ad598f83a92.tar.bz2
android_packages_apps_PackageInstaller-c3a4cf721d272e9ecc6910f15fdb2ad598f83a92.zip
[RESTRICT AUTOMERGE]: Merge commit '217f31fb5da6a08b2172d292fa5b8f440c02ae3a' into OP_REQUEST_INSTALL_PACKAGES-denied
* commit '217f31fb5da6a08b2172d292fa5b8f440c02ae3a': [RESTRICT AUTOMERGE]: 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: I56cd3ad2f3e3b0b7487b91966eb9a0f0dbc432f5 (cherry picked from commit fec8435de6c4f614d3a09f66d313a259dce3cddb)
-rw-r--r--src/com/android/packageinstaller/PackageInstallerActivity.java11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/com/android/packageinstaller/PackageInstallerActivity.java b/src/com/android/packageinstaller/PackageInstallerActivity.java
index 06444179..339aff07 100644
--- a/src/com/android/packageinstaller/PackageInstallerActivity.java
+++ b/src/com/android/packageinstaller/PackageInstallerActivity.java
@@ -41,7 +41,6 @@ import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Process;
-import android.os.RemoteException;
import android.os.UserManager;
import android.provider.Settings;
import android.support.annotation.NonNull;
@@ -526,16 +525,6 @@ public class PackageInstallerActivity extends OverlayTouchActivity implements On
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