[Large screen] Fix searched Subsettings back navigation bug
Settings app registers SubSettings SplitPairRule with clearTop
true, it will finish Settings app if users click back button on
a SubSettings page.
This change registers SubSettings SplitPairRule with clearTop
true when users click a SubSettings item in Settings home menu.
And this change registers SubSettings SplitPairRule with clearTop
false when users click a SubSettings item in search result.
Bug: 204501750
Test: manual
1. Settings -> Search settings -> search a SubSettings item
(e.g., Battery)
2. Click the searched item.
3. Click back button.
Change-Id: I6e1862de528e971137ae7087de608bbdd79096b2
This commit is contained in:
@@ -239,13 +239,15 @@ public class SettingsHomepageActivity extends FragmentActivity implements
|
||||
targetComponentName,
|
||||
targetIntent.getAction(),
|
||||
true /* finishPrimaryWithSecondary */,
|
||||
true /* finishSecondaryWithPrimary */);
|
||||
true /* finishSecondaryWithPrimary */,
|
||||
true /* clearTop*/);
|
||||
ActivityEmbeddingRulesController.registerTwoPanePairRule(this,
|
||||
new ComponentName(Settings.class.getPackageName(), Settings.class.getName()),
|
||||
targetComponentName,
|
||||
targetIntent.getAction(),
|
||||
true /* finishPrimaryWithSecondary */,
|
||||
true /* finishSecondaryWithPrimary */);
|
||||
true /* finishSecondaryWithPrimary */,
|
||||
true /* clearTop*/);
|
||||
startActivity(targetIntent);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user