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

Commit a693baa6 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Catching generic app start exceptions in ProxyActivity" into sc-dev

parents 9165c004 0983b807
Loading
Loading
Loading
Loading
+9 −7
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.launcher3.proxy;

import android.app.Activity;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
import android.content.IntentSender.SendIntentException;
@@ -48,19 +49,20 @@ public class ProxyActivityStarter extends Activity {
            return;
        }

        try {
            if (mParams.intent != null) {
                startActivityForResult(mParams.intent, mParams.requestCode, mParams.options);
                return;
            } else if (mParams.intentSender != null) {
            try {
                startIntentSenderForResult(mParams.intentSender, mParams.requestCode,
                        mParams.fillInIntent, mParams.flagsMask, mParams.flagsValues,
                        mParams.extraFlags,
                        mParams.options);
                return;
            } catch (SendIntentException e) {
                mParams.deliverResult(this, RESULT_CANCELED, null);
            }
        } catch (NullPointerException | ActivityNotFoundException | SecurityException
                | SendIntentException e) {
            mParams.deliverResult(this, RESULT_CANCELED, null);
        }
        finishAndRemoveTask();
    }