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

Commit 4169bb80 authored by Danesh M's avatar Danesh M Committed by Steve Kondik
Browse files

VolumePanel : Check if StreamControl is null

Avoids npe

Change-Id: Ib89ea79ce6a95ffc80b0fcc163f57b6a367ea8d4
parent c2b5be90
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -854,12 +854,18 @@ public class VolumePanel extends Handler implements DemoMode {

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

    private void expandVolumePanel() {
        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) {