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

Commit 87dcbc72 authored by Todd Kennedy's avatar Todd Kennedy
Browse files

Don't crash installer

When starting the installer without a URI, it would crash. Don't
do that.

Bug: 26450627
Change-Id: I2b0d452c12c0fc695326200617c5284f60a9e45b
parent a4f67b71
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -467,6 +467,14 @@ public class PackageInstallerActivity extends Activity implements OnCancelListen
            mReferrerURI = intent.getParcelableExtra(Intent.EXTRA_REFERRER);
        }

        // if there's nothing to do, quietly slip into the ether
        if (mPackageURI == null) {
            Log.w(TAG, "Unspecified source");
            setPmResult(PackageManager.INSTALL_FAILED_INVALID_URI);
            finish();
            return;
        }

        if (DeviceUtils.isWear(this)) {
            showDialogInner(DLG_NOT_SUPPORTED_ON_WEAR);
            return;