diff options
author | ot904699 <ot_fuqiang.xie@mediatek.com> | 2023-12-26 15:38:19 +0800 |
---|---|---|
committer | alk3pInjection <webmaster@raspii.tech> | 2023-12-31 06:32:02 +0800 |
commit | f82f8dcec7ce2dc1242edc93e9a07cfbff2019d5 (patch) | |
tree | 2b8e171e249b76f445a601c16ad9eae43a127c57 /quickstep/src | |
parent | c35ab677c51d5ddfe10b0fa3af5603d26da6a8f5 (diff) |
Fix widget not show in launcher home screen issueumineko
When we set up a widget, some widgets cannot be set up successfully, resulting in failure to display.
This problem occurs because the Launcher lacks the permission to start the activity when using startIntentSenderForResult API. Before using the API, set this permission and the widget will display successfully
Bug: 317758322
Test: manually
1.long press on the home screen
2.tap Widgets, select message's widget
3.set it on the home screen.
Change-Id: Ie0121b038867b3dbbf52c92d8f850ebd222784f0
Diffstat (limited to 'quickstep/src')
-rw-r--r-- | quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java b/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java index 3139e4d91a..94c8cab570 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java +++ b/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java @@ -16,6 +16,7 @@ package com.android.launcher3.uioverrides; import static android.app.ActivityTaskManager.INVALID_TASK_ID; +import static android.app.ComponentOptions.KEY_PENDING_INTENT_BACKGROUND_ACTIVITY_ALLOWED; import static android.os.Trace.TRACE_TAG_APP; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_OPTIMIZE_MEASURE; import static android.view.accessibility.AccessibilityEvent.TYPE_VIEW_FOCUSED; @@ -817,6 +818,10 @@ public class QuickstepLauncher extends Launcher { @Override public void startIntentSenderForResult(IntentSender intent, int requestCode, Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags, Bundle options) { + if (options == null) { + options = new Bundle(); + } + options.putBoolean(KEY_PENDING_INTENT_BACKGROUND_ACTIVITY_ALLOWED, true); if (requestCode != -1) { mPendingActivityRequestCode = requestCode; StartActivityParams params = new StartActivityParams(this, requestCode); |