File tree Expand file tree Collapse file tree
packages/SystemUI/src/com/android/systemui/volume Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -244,7 +244,11 @@ public void destroy() {
244244 private void initDialog () {
245245
246246 // Gravitate various views left/right depending on panel placement setting.
247- final int panelGravity = mVolumePanelOnLeft ? Gravity .LEFT : Gravity .RIGHT ;
247+ int panelGravity =
248+ mContext .getResources ().getInteger (R .integer .volume_dialog_gravity );
249+ if (!mShowActiveStreamOnly ) {
250+ panelGravity = mVolumePanelOnLeft ? Gravity .LEFT : Gravity .RIGHT ;
251+ }
248252
249253 mConfigurableTexts = new ConfigurableTexts (mContext );
250254 mHovering = false ;
@@ -291,7 +295,8 @@ private void initDialog() {
291295
292296 FrameLayout .LayoutParams dialogViewLP =
293297 (FrameLayout .LayoutParams ) mDialogView .getLayoutParams ();
294- dialogViewLP .gravity = Gravity .CENTER_VERTICAL ;
298+ dialogViewLP .gravity = mShowActiveStreamOnly ? panelGravity
299+ : Gravity .CENTER_VERTICAL ;
295300 mDialogView .setLayoutParams (dialogViewLP );
296301
297302 mDialogMainView = mDialog .findViewById (R .id .main );
You can’t perform that action at this time.
0 commit comments