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

Commit 3ef223de authored by Nan Wu's avatar Nan Wu Committed by Automerger Merge Worker
Browse files

Merge "Rescind BAL privilege when ShortcutService sends the callback PI" into...

Merge "Rescind BAL privilege when ShortcutService sends the callback PI" into udc-dev am: 4c452c35 am: d432d793

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/24005105



Change-Id: Ibd224010bb056bd66c69075e5b5078fa712b532f
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents f08ba2f6 d432d793
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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);
        }