Supported updated suggestion cards in AOSP Settings
Flag: com.android.settings.flags.updated_suggestion_card_aosp Bug: 323258154 Test: Enable flag and trigger suggestion cards to show Change-Id: Iee47d05d8d75c10ba073ae3541f108bc37b4c09b
This commit is contained in:
@@ -276,7 +276,8 @@ public class SettingsHomepageActivity extends FragmentActivity implements
|
||||
final boolean scrollNeeded = mIsEmbeddingActivityEnabled
|
||||
&& !TextUtils.equals(getString(DEFAULT_HIGHLIGHT_MENU_KEY), highlightMenuKey);
|
||||
showSuggestionFragment(scrollNeeded);
|
||||
if (FeatureFlagUtils.isEnabled(this, FeatureFlags.CONTEXTUAL_HOME)) {
|
||||
if (!Flags.updatedSuggestionCardAosp()
|
||||
&& FeatureFlagUtils.isEnabled(this, FeatureFlags.CONTEXTUAL_HOME)) {
|
||||
showFragment(() -> new ContextualCardsFragment(), R.id.contextual_cards_content);
|
||||
((FrameLayout) findViewById(R.id.main_content))
|
||||
.getLayoutTransition().enableTransitionType(LayoutTransition.CHANGING);
|
||||
@@ -477,7 +478,7 @@ public class SettingsHomepageActivity extends FragmentActivity implements
|
||||
|
||||
private void showSuggestionFragment(boolean scrollNeeded) {
|
||||
final Class<? extends Fragment> fragmentClass = FeatureFactory.getFeatureFactory()
|
||||
.getSuggestionFeatureProvider().getContextualSuggestionFragment();
|
||||
.getSuggestionFeatureProvider().getSuggestionFragment();
|
||||
if (fragmentClass == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user