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

Commit b832c0df authored by Danesh M's avatar Danesh M Committed by Adnan Begovic
Browse files

VolumePanel : Check if StreamControl is null

Avoids npe

Change-Id: Ib89ea79ce6a95ffc80b0fcc163f57b6a367ea8d4
parent 674bd13d
Loading
Loading
Loading
Loading
+8 −2
Original line number Original line Diff line number Diff line
@@ -799,12 +799,18 @@ public class VolumePanel extends Handler {


    private void hideVolumePanel() {
    private void hideVolumePanel() {
        diappearVolumePanel();
        diappearVolumePanel();
        mStreamControls.get(mActiveStreamType).expandPanel.setVisibility(View.VISIBLE);
        StreamControl sc = mStreamControls.get(mActiveStreamType);
        if (sc != null) {
            sc.expandPanel.setVisibility(View.VISIBLE);
        }
    }
    }


    private void expandVolumePanel() {
    private void expandVolumePanel() {
        showVolumePanel();
        showVolumePanel();
        mStreamControls.get(mActiveStreamType).expandPanel.setVisibility(View.GONE);
        StreamControl sc = mStreamControls.get(mActiveStreamType);
        if (sc != null) {
            sc.expandPanel.setVisibility(View.GONE);
        }
    }
    }


    private void updateSliderProgress(StreamControl sc, int progress) {
    private void updateSliderProgress(StreamControl sc, int progress) {