Loading res/layout/preference_dialog_ringervolume.xml +1 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ android:paddingTop="20dip" /> <TextView android:id="@+id/ringtone_label" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/incoming_call_volume_title" Loading src/com/android/settings/RingerVolumePreference.java +9 −7 Original line number Diff line number Diff line Loading @@ -47,8 +47,9 @@ public class RingerVolumePreference extends VolumePreference implements }; private static final int[] NEED_VOICE_CAPABILITY_ID = new int[] { com.android.internal.R.id.seekbar, R.id.notification_volume_title, R.id.notification_volume_seekbar R.id.ringtone_label, com.android.internal.R.id.seekbar, R.id.same_notification_volume }; private static final int[] SEEKBAR_TYPE = new int[] { Loading Loading @@ -85,7 +86,9 @@ public class RingerVolumePreference extends VolumePreference implements mNotificationsUseRingVolumeCheckbox = (CheckBox) view.findViewById(R.id.same_notification_volume); mNotificationsUseRingVolumeCheckbox.setOnCheckedChangeListener(this); mNotificationsUseRingVolumeCheckbox.setChecked(Settings.System.getInt( mNotificationsUseRingVolumeCheckbox.setChecked( Utils.isVoiceCapable(getContext()) && Settings.System.getInt( getContext().getContentResolver(), Settings.System.NOTIFICATIONS_USE_RING_VOLUME, 1) == 1); setNotificationVolumeVisibility(!mNotificationsUseRingVolumeCheckbox.isChecked()); Loading @@ -93,8 +96,7 @@ public class RingerVolumePreference extends VolumePreference implements } private void disableSettingsThatNeedVoice(View parent) { final boolean voiceCapable = getContext().getResources() .getBoolean(com.android.internal.R.bool.config_voice_capable); final boolean voiceCapable = Utils.isVoiceCapable(getContext()); if (!voiceCapable) { for (int id : NEED_VOICE_CAPABILITY_ID) { parent.findViewById(id).setVisibility(View.GONE); Loading Loading
res/layout/preference_dialog_ringervolume.xml +1 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ android:paddingTop="20dip" /> <TextView android:id="@+id/ringtone_label" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/incoming_call_volume_title" Loading
src/com/android/settings/RingerVolumePreference.java +9 −7 Original line number Diff line number Diff line Loading @@ -47,8 +47,9 @@ public class RingerVolumePreference extends VolumePreference implements }; private static final int[] NEED_VOICE_CAPABILITY_ID = new int[] { com.android.internal.R.id.seekbar, R.id.notification_volume_title, R.id.notification_volume_seekbar R.id.ringtone_label, com.android.internal.R.id.seekbar, R.id.same_notification_volume }; private static final int[] SEEKBAR_TYPE = new int[] { Loading Loading @@ -85,7 +86,9 @@ public class RingerVolumePreference extends VolumePreference implements mNotificationsUseRingVolumeCheckbox = (CheckBox) view.findViewById(R.id.same_notification_volume); mNotificationsUseRingVolumeCheckbox.setOnCheckedChangeListener(this); mNotificationsUseRingVolumeCheckbox.setChecked(Settings.System.getInt( mNotificationsUseRingVolumeCheckbox.setChecked( Utils.isVoiceCapable(getContext()) && Settings.System.getInt( getContext().getContentResolver(), Settings.System.NOTIFICATIONS_USE_RING_VOLUME, 1) == 1); setNotificationVolumeVisibility(!mNotificationsUseRingVolumeCheckbox.isChecked()); Loading @@ -93,8 +96,7 @@ public class RingerVolumePreference extends VolumePreference implements } private void disableSettingsThatNeedVoice(View parent) { final boolean voiceCapable = getContext().getResources() .getBoolean(com.android.internal.R.bool.config_voice_capable); final boolean voiceCapable = Utils.isVoiceCapable(getContext()); if (!voiceCapable) { for (int id : NEED_VOICE_CAPABILITY_ID) { parent.findViewById(id).setVisibility(View.GONE); Loading