Revise homepage highlight mechanism
- Create TopLevelHighlightMixin to handle highlight actions and simplify TopLevelSettings - Fix the error highlight and the flicker after screen rotation - Postpone creating the fragment until it's needed to accelerate the initialization and to fix the search highlight function breakage after toggling light/dark mode - Register activity embedding rules only once for injection and wallpaper - Do not highlight Tips & support since it's full screen - Refactor ActivityEmbeddingRulesController Bug: 207316936 Test: manual, robotest build pass Change-Id: If322ec180b03ee123987c70779a25c6a570d9faf
This commit is contained in:
@@ -63,6 +63,11 @@ public class TopLevelWallpaperPreferenceController extends BasePreferenceControl
|
||||
super.displayPreference(screen);
|
||||
Preference preference = screen.findPreference(getPreferenceKey());
|
||||
preference.setTitle(getTitle());
|
||||
ActivityEmbeddingRulesController.registerTwoPanePairRuleForSettingsHome(
|
||||
mContext,
|
||||
getComponentName(),
|
||||
null /* secondaryIntentAction */,
|
||||
true /* clearTop */);
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
@@ -103,11 +108,6 @@ public class TopLevelWallpaperPreferenceController extends BasePreferenceControl
|
||||
mContext)) {
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
||||
}
|
||||
ActivityEmbeddingRulesController.registerTwoPanePairRuleForSettingsHome(
|
||||
mContext,
|
||||
intent.getComponent(),
|
||||
null /* secondaryIntentAction */,
|
||||
true /* clearTop */);
|
||||
preference.getContext().startActivity(intent);
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user