Loading core/java/android/app/ProfileManager.java +10 −0 Original line number Diff line number Diff line Loading @@ -177,6 +177,16 @@ public class ProfileManager { */ public static final String EXTRA_PROFILES_STATE = "profile_state"; /** * Set the resource id theme to use for the dialog picker activity.<br/> * The default theme is <code>com.android.internal.R.Theme_Holo_Dialog_Alert</code>. * * @see #ACTION_PROFILE_PICKER * @hide */ public static final String EXTRA_PROFILE_DIALOG_THEME = "android.intent.extra.profile.DIALOG_THEME"; /** * Profiles are disabled. * Loading core/java/android/preference/RingtonePreference.java +28 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ public class RingtonePreference extends Preference implements private int mRingtoneType; private boolean mShowDefault; private boolean mShowSilent; private int mDialogStyle; private int mRequestCode; Loading @@ -61,6 +62,8 @@ public class RingtonePreference extends Preference implements true); mShowSilent = a.getBoolean(com.android.internal.R.styleable.RingtonePreference_showSilent, true); mDialogStyle = a.getResourceId( com.android.internal.R.styleable.RingtonePreference_dialogStyle, 0); a.recycle(); } Loading Loading @@ -131,6 +134,27 @@ public class RingtonePreference extends Preference implements mShowSilent = showSilent; } /** * Returns the resource id style of the ringtone dialog. * * @return The resource id of the style * @hide */ public int getDialogStyle() { return mDialogStyle; } /** * Sets the resource id style of the ringtone dialog. * * @param dialogStyle The resource id of the style. * @see RingtoneManager#EXTRA_RINGTONE_DIALOG_THEME * @hide */ public void setDialogStyle(int dialogStyle) { mDialogStyle = dialogStyle; } @Override protected void onClick() { // Launch the ringtone picker Loading Loading @@ -161,6 +185,10 @@ public class RingtonePreference extends Preference implements ringtonePickerIntent.putExtra(RingtoneManager.EXTRA_RINGTONE_DEFAULT_URI, RingtoneManager.getDefaultUri(getRingtoneType())); } if (mDialogStyle != 0) { ringtonePickerIntent.putExtra(RingtoneManager.EXTRA_RINGTONE_DIALOG_THEME, mDialogStyle); } ringtonePickerIntent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_SILENT, mShowSilent); ringtonePickerIntent.putExtra(RingtoneManager.EXTRA_RINGTONE_TYPE, mRingtoneType); Loading core/res/res/values/attrs.xml +3 −0 Original line number Diff line number Diff line Loading @@ -5330,6 +5330,9 @@ <attr name="showDefault" format="boolean" /> <!-- Whether to show an item for 'Silent'. --> <attr name="showSilent" format="boolean" /> <!-- The style of the ringtone dialog. @hide --> <attr name="dialogStyle" format="reference" /> </declare-styleable> <!-- Base attributes available to VolumePreference. --> Loading core/res/res/values/styles.xml +5 −0 Original line number Diff line number Diff line Loading @@ -1041,6 +1041,11 @@ please see styles_device_defaults.xml. <item name="android:showDefault">true</item> </style> <!-- @hide --> <style name="Preference.Holo.Light.RingtonePreference" parent="Preference.Holo.RingtonePreference"> <item name="android:dialogStyle">@android:style/Theme.Holo.Light.Dialog.Alert</item> </style> <!-- No margins or background by default. Could be different for x-large screens --> <style name="PreferencePanel"> </style> Loading core/res/res/values/themes.xml +1 −1 Original line number Diff line number Diff line Loading @@ -1462,7 +1462,7 @@ please see themes_device_defaults.xml. <item name="yesNoPreferenceStyle">@android:style/Preference.Holo.DialogPreference.YesNoPreference</item> <item name="dialogPreferenceStyle">@android:style/Preference.Holo.DialogPreference</item> <item name="editTextPreferenceStyle">@android:style/Preference.Holo.DialogPreference.EditTextPreference</item> <item name="ringtonePreferenceStyle">@android:style/Preference.Holo.RingtonePreference</item> <item name="ringtonePreferenceStyle">@android:style/Preference.Holo.Light.RingtonePreference</item> <item name="preferenceLayoutChild">@android:layout/preference_child_holo</item> <item name="detailsElementBackground">@android:drawable/panel_bg_holo_light</item> Loading Loading
core/java/android/app/ProfileManager.java +10 −0 Original line number Diff line number Diff line Loading @@ -177,6 +177,16 @@ public class ProfileManager { */ public static final String EXTRA_PROFILES_STATE = "profile_state"; /** * Set the resource id theme to use for the dialog picker activity.<br/> * The default theme is <code>com.android.internal.R.Theme_Holo_Dialog_Alert</code>. * * @see #ACTION_PROFILE_PICKER * @hide */ public static final String EXTRA_PROFILE_DIALOG_THEME = "android.intent.extra.profile.DIALOG_THEME"; /** * Profiles are disabled. * Loading
core/java/android/preference/RingtonePreference.java +28 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ public class RingtonePreference extends Preference implements private int mRingtoneType; private boolean mShowDefault; private boolean mShowSilent; private int mDialogStyle; private int mRequestCode; Loading @@ -61,6 +62,8 @@ public class RingtonePreference extends Preference implements true); mShowSilent = a.getBoolean(com.android.internal.R.styleable.RingtonePreference_showSilent, true); mDialogStyle = a.getResourceId( com.android.internal.R.styleable.RingtonePreference_dialogStyle, 0); a.recycle(); } Loading Loading @@ -131,6 +134,27 @@ public class RingtonePreference extends Preference implements mShowSilent = showSilent; } /** * Returns the resource id style of the ringtone dialog. * * @return The resource id of the style * @hide */ public int getDialogStyle() { return mDialogStyle; } /** * Sets the resource id style of the ringtone dialog. * * @param dialogStyle The resource id of the style. * @see RingtoneManager#EXTRA_RINGTONE_DIALOG_THEME * @hide */ public void setDialogStyle(int dialogStyle) { mDialogStyle = dialogStyle; } @Override protected void onClick() { // Launch the ringtone picker Loading Loading @@ -161,6 +185,10 @@ public class RingtonePreference extends Preference implements ringtonePickerIntent.putExtra(RingtoneManager.EXTRA_RINGTONE_DEFAULT_URI, RingtoneManager.getDefaultUri(getRingtoneType())); } if (mDialogStyle != 0) { ringtonePickerIntent.putExtra(RingtoneManager.EXTRA_RINGTONE_DIALOG_THEME, mDialogStyle); } ringtonePickerIntent.putExtra(RingtoneManager.EXTRA_RINGTONE_SHOW_SILENT, mShowSilent); ringtonePickerIntent.putExtra(RingtoneManager.EXTRA_RINGTONE_TYPE, mRingtoneType); Loading
core/res/res/values/attrs.xml +3 −0 Original line number Diff line number Diff line Loading @@ -5330,6 +5330,9 @@ <attr name="showDefault" format="boolean" /> <!-- Whether to show an item for 'Silent'. --> <attr name="showSilent" format="boolean" /> <!-- The style of the ringtone dialog. @hide --> <attr name="dialogStyle" format="reference" /> </declare-styleable> <!-- Base attributes available to VolumePreference. --> Loading
core/res/res/values/styles.xml +5 −0 Original line number Diff line number Diff line Loading @@ -1041,6 +1041,11 @@ please see styles_device_defaults.xml. <item name="android:showDefault">true</item> </style> <!-- @hide --> <style name="Preference.Holo.Light.RingtonePreference" parent="Preference.Holo.RingtonePreference"> <item name="android:dialogStyle">@android:style/Theme.Holo.Light.Dialog.Alert</item> </style> <!-- No margins or background by default. Could be different for x-large screens --> <style name="PreferencePanel"> </style> Loading
core/res/res/values/themes.xml +1 −1 Original line number Diff line number Diff line Loading @@ -1462,7 +1462,7 @@ please see themes_device_defaults.xml. <item name="yesNoPreferenceStyle">@android:style/Preference.Holo.DialogPreference.YesNoPreference</item> <item name="dialogPreferenceStyle">@android:style/Preference.Holo.DialogPreference</item> <item name="editTextPreferenceStyle">@android:style/Preference.Holo.DialogPreference.EditTextPreference</item> <item name="ringtonePreferenceStyle">@android:style/Preference.Holo.RingtonePreference</item> <item name="ringtonePreferenceStyle">@android:style/Preference.Holo.Light.RingtonePreference</item> <item name="preferenceLayoutChild">@android:layout/preference_child_holo</item> <item name="detailsElementBackground">@android:drawable/panel_bg_holo_light</item> Loading