summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Ronish Kalia <ronish@google.com> 2022-03-08 01:45:18 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2022-03-08 01:45:18 +0000
commit27e35ec6c35e87689e991f25d6f7981b94e9a24e (patch)
tree9be683c9fbea07123a6ec3b086f6769a97ba7ca0
parentd0359461d207b3ca2756a9e22f92c5f1ee485d30 (diff)
parent26231bf7027208d761a0ae262ade95d95a67eb08 (diff)
Merge "Use ActivityService from lock screen" into tm-dev
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
index 541aeab22a80..dc1af362ec23 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
@@ -32,7 +32,6 @@ import android.app.ActivityManager;
import android.app.ActivityOptions;
import android.app.ActivityTaskManager;
import android.app.admin.DevicePolicyManager;
-import android.content.ActivityNotFoundException;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
@@ -1109,8 +1108,13 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL
Intent intent = mQRCodeScannerController.getIntent();
if (intent != null) {
try {
- mContext.startActivity(intent);
- } catch (ActivityNotFoundException e) {
+ ActivityTaskManager.getService().startActivityAsUser(
+ null, getContext().getBasePackageName(),
+ getContext().getAttributionTag(), intent,
+ intent.resolveTypeIfNeeded(getContext().getContentResolver()),
+ null, null, 0, Intent.FLAG_ACTIVITY_NEW_TASK, null, null,
+ UserHandle.CURRENT.getIdentifier());
+ } catch (RemoteException e) {
// This is unexpected. Nonetheless, just log the error and prevent the UI from
// crashing
Log.e(TAG, "Unexpected intent: " + intent