Merge "Render an additional icon to the tappable tiles with pending intents" into udc-d1-dev

This commit is contained in:
Peter Zhang
2023-05-12 12:12:21 +00:00
committed by Android (Google) Code Review
3 changed files with 40 additions and 1 deletions

View File

@@ -573,6 +573,10 @@ public abstract class DashboardFragment extends SettingsPreferenceFragment
return (tile instanceof ActivityTile || tile.hasPendingIntent())
? new PrimarySwitchPreference(getPrefContext())
: new SwitchPreference(getPrefContext());
} else if (tile.hasPendingIntent()) {
Preference preference = new Preference(getPrefContext());
preference.setWidgetLayoutResource(R.layout.preference_external_action_icon);
return preference;
} else {
return new Preference(getPrefContext());
}