Fine tune the homepage scrolling behavior
Scroll to the highlight position before showing homepage. Bug: 199017944 Bug: 204946469 Test: visual Change-Id: I11708f42180a3af22855ac7b5f53460f737ed208
This commit is contained in:
@@ -94,7 +94,7 @@ public class SearchResultTrampoline extends Activity {
|
||||
|
||||
if (!ActivityEmbeddingUtils.isEmbeddingActivityEnabled(this)) {
|
||||
startActivity(intent);
|
||||
} else if (isFromSettingsIntelligence(callingActivity)) {
|
||||
} else if (isSettingsIntelligence(callingActivity)) {
|
||||
// Register SplitPairRule for SubSettings, set clearTop false to prevent unexpected back
|
||||
// navigation behavior.
|
||||
ActivityEmbeddingRulesController.registerSubSettingsPairRule(this,
|
||||
@@ -104,7 +104,6 @@ public class SearchResultTrampoline extends Activity {
|
||||
startActivity(intent);
|
||||
} else {
|
||||
// Two-pane case
|
||||
intent.setFlags(intent.getFlags() & ~Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
startActivity(SettingsActivity.getTrampolineIntent(intent, highlightMenuKey));
|
||||
}
|
||||
|
||||
@@ -112,7 +111,7 @@ public class SearchResultTrampoline extends Activity {
|
||||
finish();
|
||||
}
|
||||
|
||||
private boolean isFromSettingsIntelligence(ComponentName callingActivity) {
|
||||
private boolean isSettingsIntelligence(ComponentName callingActivity) {
|
||||
return callingActivity != null && TextUtils.equals(
|
||||
callingActivity.getPackageName(),
|
||||
FeatureFactory.getFactory(this).getSearchFeatureProvider()
|
||||
|
Reference in New Issue
Block a user