Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 74c6bafe authored by Christopher Dombroski's avatar Christopher Dombroski Committed by android-build-merger
Browse files

[RESTRICT AUTOMERGE]: OP_REQUEST_INSTALL_PACKAGES denied by default

am: 217f31fb

Change-Id: I38808ae833b6712814a07d1b0a7966a52a52066b
parents 55c96e9b 217f31fb
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -40,7 +40,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;
@@ -523,16 +522,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(AppOpsManager.OP_REQUEST_INSTALL_PACKAGES, mOriginatingUid,
                        mOriginatingPackage, AppOpsManager.MODE_ERRORED);
                // fall through