From 209df88d9d4997c50ab3df174cb12416e41fe023 Mon Sep 17 00:00:00 2001 From: Jason Chiu Date: Thu, 9 Dec 2021 16:51:59 +0800 Subject: [PATCH] Set the package name to the deep link intent If a deep link intent is not specified a package name, the intent action will be resolved to ForwardIntentToParent in some cases. Fix: 209928944 Test: manual Change-Id: I502be6be550ba817b4337f2d0793a7b3678fc8d2 --- src/com/android/settings/SettingsActivity.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/com/android/settings/SettingsActivity.java b/src/com/android/settings/SettingsActivity.java index 2b5f695ecbd..d3d3604a2cc 100644 --- a/src/com/android/settings/SettingsActivity.java +++ b/src/com/android/settings/SettingsActivity.java @@ -377,8 +377,9 @@ public class SettingsActivity extends SettingsBaseActivity public static Intent getTrampolineIntent(Intent intent, String highlightMenuKey) { final Intent detailIntent = new Intent(intent); // It's a deep link intent, SettingsHomepageActivity will set SplitPairRule and start it. - final Intent trampolineIntent = new Intent(ACTION_SETTINGS_EMBED_DEEP_LINK_ACTIVITY); - trampolineIntent.replaceExtras(detailIntent); + final Intent trampolineIntent = new Intent(ACTION_SETTINGS_EMBED_DEEP_LINK_ACTIVITY) + .setPackage(Utils.SETTINGS_PACKAGE_NAME) + .replaceExtras(detailIntent); // Relay detail intent data to prevent failure of Intent#ParseUri. // If Intent#getData() is not null, Intent#toUri will return an Uri which has the scheme of