Merge "[Settings] Update the title if launch the fragment from search app" am: eef6d0cb24
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2331882 Change-Id: Ic4f9bb2f9fb07e9243dbb327f2ce0a41eeb9da0f Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -53,17 +53,18 @@ public class MobileNetworkIntentConverter implements Function<Intent, Intent> {
|
|||||||
private static final ComponentName sTargetComponent = ComponentName
|
private static final ComponentName sTargetComponent = ComponentName
|
||||||
.createRelative("com.android.settings",
|
.createRelative("com.android.settings",
|
||||||
MobileNetworkActivity.class.getTypeName());
|
MobileNetworkActivity.class.getTypeName());
|
||||||
|
private static final String INTENT_TRAMPOLINE = "android.settings.SEARCH_RESULT_TRAMPOLINE";
|
||||||
/**
|
/**
|
||||||
* These actions has better aligned with definitions within AndroidManifest.xml
|
* These actions has better aligned with definitions within AndroidManifest.xml
|
||||||
*/
|
*/
|
||||||
private static final String [] sPotentialActions = new String [] {
|
private static final String[] sPotentialActions = new String[]{
|
||||||
null,
|
null,
|
||||||
Intent.ACTION_MAIN,
|
Intent.ACTION_MAIN,
|
||||||
android.provider.Settings.ACTION_NETWORK_OPERATOR_SETTINGS,
|
android.provider.Settings.ACTION_NETWORK_OPERATOR_SETTINGS,
|
||||||
android.provider.Settings.ACTION_DATA_ROAMING_SETTINGS,
|
android.provider.Settings.ACTION_DATA_ROAMING_SETTINGS,
|
||||||
android.provider.Settings.ACTION_MMS_MESSAGE_SETTING,
|
android.provider.Settings.ACTION_MMS_MESSAGE_SETTING,
|
||||||
ImsRcsManager.ACTION_SHOW_CAPABILITY_DISCOVERY_OPT_IN
|
ImsRcsManager.ACTION_SHOW_CAPABILITY_DISCOVERY_OPT_IN,
|
||||||
|
INTENT_TRAMPOLINE
|
||||||
};
|
};
|
||||||
|
|
||||||
private static final String RE_ROUTE_TAG = ":reroute:" + TAG;
|
private static final String RE_ROUTE_TAG = ":reroute:" + TAG;
|
||||||
@@ -112,30 +113,31 @@ public class MobileNetworkIntentConverter implements Function<Intent, Intent> {
|
|||||||
if (TextUtils.equals(action,
|
if (TextUtils.equals(action,
|
||||||
android.provider.Settings.ACTION_NETWORK_OPERATOR_SETTINGS)
|
android.provider.Settings.ACTION_NETWORK_OPERATOR_SETTINGS)
|
||||||
|| TextUtils.equals(action,
|
|| TextUtils.equals(action,
|
||||||
android.provider.Settings.ACTION_DATA_ROAMING_SETTINGS)) {
|
android.provider.Settings.ACTION_DATA_ROAMING_SETTINGS)
|
||||||
|
|| TextUtils.equals(action, INTENT_TRAMPOLINE)) {
|
||||||
// Accepted.
|
// Accepted.
|
||||||
ops = ops.andThen(intent -> extractArguments(intent, subId))
|
ops = ops.andThen(intent -> extractArguments(intent, subId))
|
||||||
.andThen(args -> rePackIntent(args, reqIntent))
|
.andThen(args -> rePackIntent(args, reqIntent))
|
||||||
.andThen(intent -> updateFragment(intent, mAppContext, subId));
|
.andThen(intent -> updateFragment(intent, mAppContext, subId));
|
||||||
} else if (TextUtils.equals(action,
|
} else if (TextUtils.equals(action,
|
||||||
android.provider.Settings.ACTION_MMS_MESSAGE_SETTING)) {
|
android.provider.Settings.ACTION_MMS_MESSAGE_SETTING)) {
|
||||||
ops = ops.andThen(intent -> extractArguments(intent, subId))
|
ops = ops.andThen(intent -> extractArguments(intent, subId))
|
||||||
.andThen(args -> convertMmsArguments(args))
|
.andThen(args -> convertMmsArguments(args))
|
||||||
.andThen(args -> rePackIntent(args, reqIntent))
|
.andThen(args -> rePackIntent(args, reqIntent))
|
||||||
.andThen(intent -> updateFragment(intent, mAppContext, subId));
|
.andThen(intent -> updateFragment(intent, mAppContext, subId));
|
||||||
} else if (TextUtils.equals(action,
|
} else if (TextUtils.equals(action,
|
||||||
ImsRcsManager.ACTION_SHOW_CAPABILITY_DISCOVERY_OPT_IN)) {
|
ImsRcsManager.ACTION_SHOW_CAPABILITY_DISCOVERY_OPT_IN)) {
|
||||||
ops = ops.andThen(intent -> extractArguments(intent, subId))
|
ops = ops.andThen(intent -> extractArguments(intent, subId))
|
||||||
.andThen(args -> supportContactDiscoveryDialog(args, mAppContext, subId))
|
.andThen(args -> supportContactDiscoveryDialog(args, mAppContext, subId))
|
||||||
.andThen(args -> rePackIntent(args, reqIntent))
|
.andThen(args -> rePackIntent(args, reqIntent))
|
||||||
.andThen(intent -> updateFragment(intent, mAppContext, subId));
|
.andThen(intent -> updateFragment(intent, mAppContext, subId));
|
||||||
} else if ((sTargetComponent.compareTo(mComponent) == 0)
|
} else if ((sTargetComponent.compareTo(mComponent) == 0)
|
||||||
&& ((action == null) || Intent.ACTION_MAIN.equals(action))) {
|
&& ((action == null) || Intent.ACTION_MAIN.equals(action))) {
|
||||||
Log.d(TAG, "Support default actions direct to this component");
|
Log.d(TAG, "Support default actions direct to this component");
|
||||||
ops = ops.andThen(intent -> extractArguments(intent, subId))
|
ops = ops.andThen(intent -> extractArguments(intent, subId))
|
||||||
.andThen(args -> rePackIntent(args, reqIntent))
|
.andThen(args -> rePackIntent(args, reqIntent))
|
||||||
.andThen(intent -> replaceIntentAction(intent))
|
.andThen(intent -> replaceIntentAction(intent))
|
||||||
.andThen(intent -> updateFragment(intent, mAppContext, subId));
|
.andThen(intent -> updateFragment(intent, mAppContext, subId));
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user