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:
Chris Antol
2024-08-01 09:01:49 +00:00
parent 4c90aa7404
commit 468e15f49a
11 changed files with 438 additions and 6 deletions

View File

@@ -21,6 +21,7 @@ import android.content.Context;
import android.content.SharedPreferences;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
/** Interface should be implemented if you have added new suggestions */
@@ -46,6 +47,20 @@ public interface SuggestionFeatureProvider {
/**
* Returns the class of {@link Fragment} that supports contextual suggestion.
*
* @deprecated - use {@link SuggestionFeatureProvider#getSuggestionFragment()} instead.
*/
Class<? extends Fragment> getContextualSuggestionFragment();
@Deprecated
@Nullable
default Class<? extends Fragment> getContextualSuggestionFragment() {
return null;
}
/**
* Returns the class of {@link Fragment} that provides the UI for Suggestions.
*/
@Nullable
default Class<? extends Fragment> getSuggestionFragment() {
return getContextualSuggestionFragment();
}
}