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

Commit d529cfe0 authored by Arian's avatar Arian Committed by Bruno Martins
Browse files

VolumeDialog: Show the notification stream when unlinked



Change-Id: I0e6d0dda5c0f57181ea94f4b249465fe42e5fb02
Signed-off-by: default avatarJesse Chan <jc@lineageos.org>
parent ab272fa2
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -539,6 +539,11 @@ public class VolumeDialogImpl implements VolumeDialog,
        }
    }

    private boolean isNotificationVolumeLinked() {
        ContentResolver cr = mContext.getContentResolver();
        return Settings.Secure.getInt(cr, Settings.Secure.VOLUME_LINK_NOTIFICATION, 1) == 1;
    }

    private static boolean isBluetoothA2dpConnected() {
        BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
        return mBluetoothAdapter != null && mBluetoothAdapter.isEnabled()
@@ -575,6 +580,10 @@ public class VolumeDialogImpl implements VolumeDialog,
                rescheduleTimeoutH();
                Util.setVisOrGone(findRow(AudioManager.STREAM_RING).view, !mExpanded);
                Util.setVisOrGone(findRow(STREAM_ALARM).view, !mExpanded);
                if (!isNotificationVolumeLinked()) {
                    Util.setVisOrGone(
                            findRow(AudioManager.STREAM_NOTIFICATION).view, !mExpanded);
                }

                if (mExpanded) mController.setActiveStream(AudioManager.STREAM_MUSIC);
                mExpandRows.setExpanded(!mExpanded);