Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 697d9384 authored by Amith Yamasani's avatar Amith Yamasani
Browse files

Ignore the volume hard keys in Volume settings screen.

Bug: 5214785

Also brings that dialog in compliance with the new volume spec.

Change-Id: I68ce68887515193f1a73a5c8b1182dc290da05c6
parent ef283b41
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -58,7 +58,6 @@ public class RingerVolumePreference extends VolumePreference implements OnClickL
    private static final int MSG_RINGER_MODE_CHANGED = 101;

    private SeekBarVolumizer [] mSeekBarVolumizer;
    private boolean mIgnoreVolumeKeys;

    // These arrays must all match in length and order
    private static final int[] SEEKBAR_ID = new int[] {
@@ -145,7 +144,6 @@ public class RingerVolumePreference extends VolumePreference implements OnClickL
        //setDialogIcon(R.drawable.ic_settings_sound);

        mSeekBarVolumizer = new SeekBarVolumizer[SEEKBAR_ID.length];
        mIgnoreVolumeKeys = !Utils.isVoiceCapable(context);

        mAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
    }
@@ -242,11 +240,7 @@ public class RingerVolumePreference extends VolumePreference implements OnClickL
            case KeyEvent.KEYCODE_VOLUME_DOWN:
            case KeyEvent.KEYCODE_VOLUME_UP:
            case KeyEvent.KEYCODE_VOLUME_MUTE:
                if (mIgnoreVolumeKeys) {
                return true;
                } else {
                    return super.onKey(v, keyCode, event);
                }
            default:
                return false;
        }