Loading packages/SystemUI/res/values-land/bools.xml +2 −0 Original line number Diff line number Diff line Loading @@ -22,4 +22,6 @@ <!-- True when small screen (<sw600dp) is landscape. --> <bool name="is_small_screen_landscape">true</bool> <bool name="volume_dialog_ringer_drawer_should_open_to_the_side">true</bool> </resources> packages/SystemUI/res/values-sw600dp-land/bools.xml +2 −0 Original line number Diff line number Diff line Loading @@ -22,4 +22,6 @@ <!-- True when small screen (<sw600dp) is landscape. --> <bool name="is_small_screen_landscape">false</bool> <bool name="volume_dialog_ringer_drawer_should_open_to_the_side">false</bool> </resources> packages/SystemUI/res/values/bools.xml +2 −0 Original line number Diff line number Diff line Loading @@ -66,4 +66,6 @@ <!-- True when small screen (<sw600dp) is landscape. --> <bool name="is_small_screen_landscape">false</bool> <bool name="volume_dialog_ringer_drawer_should_open_to_the_side">false</bool> </resources> packages/SystemUI/src/com/android/systemui/volume/dialog/ringer/ui/binder/VolumeDialogRingerViewBinder.kt +14 −7 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.systemui.volume.dialog.ringer.ui.binder import android.animation.ArgbEvaluator import android.content.res.Configuration import android.graphics.drawable.GradientDrawable import android.view.LayoutInflater import android.view.View Loading Loading @@ -127,6 +128,16 @@ constructor( when (ringerState) { is RingerViewModelState.Available -> { val uiModel = ringerState.uiModel val orientation = if ( view.context.resources.getBoolean( R.bool.volume_dialog_ringer_drawer_should_open_to_the_side ) ) { ringerState.orientation } else { Configuration.ORIENTATION_PORTRAIT } // Set up view background and visibility drawerContainer.visibility = View.VISIBLE Loading @@ -144,7 +155,7 @@ constructor( drawerContainer.closeDrawer( ringerBackgroundView, uiModel.currentButtonIndex, ringerState.orientation, orientation, ) } is RingerDrawerState.Closed -> { Loading Loading @@ -186,7 +197,7 @@ constructor( drawerContainer.closeDrawer( ringerBackgroundView, uiModel.currentButtonIndex, ringerState.orientation, orientation, ) } } Loading @@ -206,11 +217,7 @@ constructor( } else { ringerDrawerTransitionListener.setProgressChangeEnabled(true) } updateOpenState( drawerContainer, ringerState.orientation, ringerBackgroundView, ) updateOpenState(drawerContainer, orientation, ringerBackgroundView) drawerContainer .getTransition(R.id.close_to_open_transition) .setInterpolatorInfo( Loading Loading
packages/SystemUI/res/values-land/bools.xml +2 −0 Original line number Diff line number Diff line Loading @@ -22,4 +22,6 @@ <!-- True when small screen (<sw600dp) is landscape. --> <bool name="is_small_screen_landscape">true</bool> <bool name="volume_dialog_ringer_drawer_should_open_to_the_side">true</bool> </resources>
packages/SystemUI/res/values-sw600dp-land/bools.xml +2 −0 Original line number Diff line number Diff line Loading @@ -22,4 +22,6 @@ <!-- True when small screen (<sw600dp) is landscape. --> <bool name="is_small_screen_landscape">false</bool> <bool name="volume_dialog_ringer_drawer_should_open_to_the_side">false</bool> </resources>
packages/SystemUI/res/values/bools.xml +2 −0 Original line number Diff line number Diff line Loading @@ -66,4 +66,6 @@ <!-- True when small screen (<sw600dp) is landscape. --> <bool name="is_small_screen_landscape">false</bool> <bool name="volume_dialog_ringer_drawer_should_open_to_the_side">false</bool> </resources>
packages/SystemUI/src/com/android/systemui/volume/dialog/ringer/ui/binder/VolumeDialogRingerViewBinder.kt +14 −7 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.systemui.volume.dialog.ringer.ui.binder import android.animation.ArgbEvaluator import android.content.res.Configuration import android.graphics.drawable.GradientDrawable import android.view.LayoutInflater import android.view.View Loading Loading @@ -127,6 +128,16 @@ constructor( when (ringerState) { is RingerViewModelState.Available -> { val uiModel = ringerState.uiModel val orientation = if ( view.context.resources.getBoolean( R.bool.volume_dialog_ringer_drawer_should_open_to_the_side ) ) { ringerState.orientation } else { Configuration.ORIENTATION_PORTRAIT } // Set up view background and visibility drawerContainer.visibility = View.VISIBLE Loading @@ -144,7 +155,7 @@ constructor( drawerContainer.closeDrawer( ringerBackgroundView, uiModel.currentButtonIndex, ringerState.orientation, orientation, ) } is RingerDrawerState.Closed -> { Loading Loading @@ -186,7 +197,7 @@ constructor( drawerContainer.closeDrawer( ringerBackgroundView, uiModel.currentButtonIndex, ringerState.orientation, orientation, ) } } Loading @@ -206,11 +217,7 @@ constructor( } else { ringerDrawerTransitionListener.setProgressChangeEnabled(true) } updateOpenState( drawerContainer, ringerState.orientation, ringerBackgroundView, ) updateOpenState(drawerContainer, orientation, ringerBackgroundView) drawerContainer .getTransition(R.id.close_to_open_transition) .setInterpolatorInfo( Loading