summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Nan Wu <wnan@google.com> 2023-09-02 01:27:56 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2023-09-02 01:27:56 +0000
commit4c452c359c69ebe912a7fa42e15a7aaf8c4568f2 (patch)
tree4f0627c4dfb32f1e3ea5e010aec4ddca83f8358b
parent5a145e84f1a7cb943e363091e8bde6bb1dacfb36 (diff)
parent0a0778e96d7da3fa8169abdf9261ed62809539fa (diff)
Merge "Rescind BAL privilege when ShortcutService sends the callback PI" into udc-dev
-rw-r--r--services/core/java/com/android/server/pm/ShortcutService.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/pm/ShortcutService.java b/services/core/java/com/android/server/pm/ShortcutService.java
index 5b3514c01f9f..710e0b72ecfb 100644
--- a/services/core/java/com/android/server/pm/ShortcutService.java
+++ b/services/core/java/com/android/server/pm/ShortcutService.java
@@ -15,6 +15,7 @@
*/
package com.android.server.pm;
+import static android.app.ActivityOptions.MODE_BACKGROUND_ACTIVITY_START_DENIED;
import static android.provider.DeviceConfig.NAMESPACE_SYSTEMUI;
import android.Manifest.permission;
@@ -24,6 +25,7 @@ import android.annotation.Nullable;
import android.annotation.UserIdInt;
import android.app.ActivityManager;
import android.app.ActivityManagerInternal;
+import android.app.ActivityOptions;
import android.app.AppGlobals;
import android.app.IUidObserver;
import android.app.IUriGrantsManager;
@@ -4407,8 +4409,11 @@ public class ShortcutService extends IShortcutService.Stub {
return;
}
try {
+ ActivityOptions options = ActivityOptions.makeBasic()
+ .setPendingIntentBackgroundActivityStartMode(
+ MODE_BACKGROUND_ACTIVITY_START_DENIED);
intentSender.sendIntent(mContext, /* code= */ 0, extras,
- /* onFinished=*/ null, /* handler= */ null);
+ /* onFinished=*/ null, /* handler= */ null, null, options.toBundle());
} catch (SendIntentException e) {
Slog.w(TAG, "sendIntent failed().", e);
}