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

Commit 115f09b2 authored by Jorge Ruesga's avatar Jorge Ruesga
Browse files

base: fix volumen panel traslucent after stream icon click

Change-Id: I290ecb07106198882739a5b734f4d6a89d3eb5fb
JIRA: CYAN-4487
Issue: https://jira.cyanogenmod.org/browse/CYAN-4487


Signed-off-by: default avatarJorge Ruesga <jorge@ruesga.com>
parent 9d99ab5b
Loading
Loading
Loading
Loading
+11 −7
Original line number Diff line number Diff line
@@ -1181,18 +1181,22 @@ public class VolumePanel extends Handler implements OnSeekBarChangeListener, Vie
    }

    public void onClick(View v) {
        if (mTranslucentDialog && mShouldRunDropTranslucentAnimation) {
            startRemoveTranslucentAnimation();
        }
        if (v == mMoreButton) {
            expand();
        } else if (v instanceof ImageView) {
        boolean moreButton = v == mMoreButton;
        if (v instanceof ImageView && !moreButton) {
            Intent volumeSettings = new Intent(android.provider.Settings.ACTION_SOUND_SETTINGS);
            volumeSettings.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
            volumeSettings.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
                    | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);
            forceTimeout();
            mContext.startActivity(volumeSettings);
            return;
        }

        if (mTranslucentDialog && mShouldRunDropTranslucentAnimation) {
            startRemoveTranslucentAnimation();
        }
        if (moreButton) {
            expand();
        }
        resetTimeout();
    }