Loading res/xml/accounts_dashboard_settings.xml +0 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,6 @@ <com.android.settings.widget.GearPreference android:fragment="com.android.settings.applications.defaultapps.DefaultAutofillPicker" android:key="default_autofill_main" android:title="@string/autofill_app" settings:keywords="@string/autofill_keywords"> <extra android:name="for_work" Loading res/xml/accounts_personal_dashboard_settings.xml +0 −1 Original line number Diff line number Diff line Loading @@ -38,7 +38,6 @@ <com.android.settings.widget.GearPreference android:fragment="com.android.settings.applications.defaultapps.DefaultAutofillPicker" android:key="default_autofill_main" android:title="@string/autofill_app" settings:keywords="@string/autofill_keywords"> <extra android:name="for_work" Loading res/xml/accounts_work_dashboard_settings.xml +0 −1 Original line number Diff line number Diff line Loading @@ -38,7 +38,6 @@ <com.android.settings.widget.GearPreference android:fragment="com.android.settings.applications.defaultapps.DefaultAutofillPicker" android:key="default_autofill_work" android:title="@string/autofill_app" settings:searchable="false"> <extra android:name="for_work" Loading src/com/android/settings/applications/defaultapps/DefaultAppPreferenceController.java +17 −2 Original line number Diff line number Diff line Loading @@ -65,11 +65,19 @@ public abstract class DefaultAppPreferenceController extends AbstractPreferenceC ((TwoTargetPreference) preference).setIconSize(ICON_SIZE_MEDIUM); } if (!TextUtils.isEmpty(defaultAppLabel)) { if (showLabelAsTitle()) { preference.setTitle(defaultAppLabel); } else { preference.setSummary(defaultAppLabel); } preference.setIcon(Utils.getSafeIcon(getDefaultAppIcon())); } else { Log.d(TAG, "No default app"); if (showLabelAsTitle()) { preference.setTitle(R.string.app_list_preference_none); } else { preference.setSummary(R.string.app_list_preference_none); } preference.setIcon(null); } mayUpdateGearIcon(app, preference); Loading Loading @@ -102,6 +110,13 @@ public abstract class DefaultAppPreferenceController extends AbstractPreferenceC return null; } /** * Whether to show the default app label as the title, instead of as the summary. */ protected boolean showLabelAsTitle() { return false; } public Drawable getDefaultAppIcon() { if (!isAvailable()) { return null; Loading src/com/android/settings/applications/defaultapps/DefaultAutofillPreferenceController.java +5 −0 Original line number Diff line number Diff line Loading @@ -69,4 +69,9 @@ public class DefaultAutofillPreferenceController extends DefaultAppPreferenceCon } return null; } @Override protected boolean showLabelAsTitle() { return true; } } Loading
res/xml/accounts_dashboard_settings.xml +0 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,6 @@ <com.android.settings.widget.GearPreference android:fragment="com.android.settings.applications.defaultapps.DefaultAutofillPicker" android:key="default_autofill_main" android:title="@string/autofill_app" settings:keywords="@string/autofill_keywords"> <extra android:name="for_work" Loading
res/xml/accounts_personal_dashboard_settings.xml +0 −1 Original line number Diff line number Diff line Loading @@ -38,7 +38,6 @@ <com.android.settings.widget.GearPreference android:fragment="com.android.settings.applications.defaultapps.DefaultAutofillPicker" android:key="default_autofill_main" android:title="@string/autofill_app" settings:keywords="@string/autofill_keywords"> <extra android:name="for_work" Loading
res/xml/accounts_work_dashboard_settings.xml +0 −1 Original line number Diff line number Diff line Loading @@ -38,7 +38,6 @@ <com.android.settings.widget.GearPreference android:fragment="com.android.settings.applications.defaultapps.DefaultAutofillPicker" android:key="default_autofill_work" android:title="@string/autofill_app" settings:searchable="false"> <extra android:name="for_work" Loading
src/com/android/settings/applications/defaultapps/DefaultAppPreferenceController.java +17 −2 Original line number Diff line number Diff line Loading @@ -65,11 +65,19 @@ public abstract class DefaultAppPreferenceController extends AbstractPreferenceC ((TwoTargetPreference) preference).setIconSize(ICON_SIZE_MEDIUM); } if (!TextUtils.isEmpty(defaultAppLabel)) { if (showLabelAsTitle()) { preference.setTitle(defaultAppLabel); } else { preference.setSummary(defaultAppLabel); } preference.setIcon(Utils.getSafeIcon(getDefaultAppIcon())); } else { Log.d(TAG, "No default app"); if (showLabelAsTitle()) { preference.setTitle(R.string.app_list_preference_none); } else { preference.setSummary(R.string.app_list_preference_none); } preference.setIcon(null); } mayUpdateGearIcon(app, preference); Loading Loading @@ -102,6 +110,13 @@ public abstract class DefaultAppPreferenceController extends AbstractPreferenceC return null; } /** * Whether to show the default app label as the title, instead of as the summary. */ protected boolean showLabelAsTitle() { return false; } public Drawable getDefaultAppIcon() { if (!isAvailable()) { return null; Loading
src/com/android/settings/applications/defaultapps/DefaultAutofillPreferenceController.java +5 −0 Original line number Diff line number Diff line Loading @@ -69,4 +69,9 @@ public class DefaultAutofillPreferenceController extends DefaultAppPreferenceCon } return null; } @Override protected boolean showLabelAsTitle() { return true; } }