Volumes panel shouldn't depend on Silent mode setting.
Otherwise it wont be possible to adjust alarm and music volumes. Also fixes an inconsistent state when screen is turned off and on. Bug: 5128528 Bug: 5128850 Change-Id: I3bfae44956de291b086905b9f43ca4ff5c7b9bbf
This commit is contained in:
@@ -21,7 +21,6 @@
|
|||||||
|
|
||||||
<com.android.settings.RingerVolumePreference
|
<com.android.settings.RingerVolumePreference
|
||||||
android:key="ring_volume"
|
android:key="ring_volume"
|
||||||
android:dependency="silent"
|
|
||||||
android:title="@string/all_volume_title"
|
android:title="@string/all_volume_title"
|
||||||
android:dialogTitle="@string/all_volume_title"
|
android:dialogTitle="@string/all_volume_title"
|
||||||
android:persistent="false"
|
android:persistent="false"
|
||||||
@@ -37,7 +36,7 @@
|
|||||||
android:key="silent"
|
android:key="silent"
|
||||||
android:title="@string/silent_mode_title"
|
android:title="@string/silent_mode_title"
|
||||||
android:persistent="false"
|
android:persistent="false"
|
||||||
android:disableDependentsState="true" />
|
/>
|
||||||
|
|
||||||
<Preference
|
<Preference
|
||||||
android:key="musicfx"
|
android:key="musicfx"
|
||||||
|
@@ -182,8 +182,8 @@ public class RingerVolumePreference extends VolumePreference implements OnClickL
|
|||||||
public void onReceive(Context context, Intent intent) {
|
public void onReceive(Context context, Intent intent) {
|
||||||
final String action = intent.getAction();
|
final String action = intent.getAction();
|
||||||
if (AudioManager.RINGER_MODE_CHANGED_ACTION.equals(action)) {
|
if (AudioManager.RINGER_MODE_CHANGED_ACTION.equals(action)) {
|
||||||
mHandler.sendMessage(mHandler.obtainMessage(MSG_RINGER_MODE_CHANGED,
|
mHandler.sendMessage(mHandler.obtainMessage(MSG_RINGER_MODE_CHANGED, intent
|
||||||
intent.getIntExtra(AudioManager.EXTRA_RINGER_MODE, -1), 0));
|
.getIntExtra(AudioManager.EXTRA_RINGER_MODE, -1), 0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -222,7 +222,10 @@ public class RingerVolumePreference extends VolumePreference implements OnClickL
|
|||||||
@Override
|
@Override
|
||||||
public void onActivityStop() {
|
public void onActivityStop() {
|
||||||
super.onActivityStop();
|
super.onActivityStop();
|
||||||
cleanup();
|
|
||||||
|
for (SeekBarVolumizer vol : mSeekBarVolumizer) {
|
||||||
|
if (vol != null) vol.stopSample();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Reference in New Issue
Block a user