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

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/13439497

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib2784fe2d21df7cec44969c3fa5c62669a0a8e00
This commit is contained in:
TreeHugger Robot authored and Automerger Merge Worker committed 2021-02-06 03:44:46 +00:00
commit 2bdcdffafa
1 file changed
+9 -7
@@ -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;
}
if (mParams.intent != null) {
startActivityForResult(mParams.intent, mParams.requestCode, mParams.options);
return;
} else if (mParams.intentSender != null) {
try {
try {
if (mParams.intent != null) {
startActivityForResult(mParams.intent, mParams.requestCode, mParams.options);
return;
} else if (mParams.intentSender != null) {
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();
}