Merge "Reduce the size of buttons in Global Actions Lite" into udc-dev

This commit is contained in:
Fabian Kozynski
2023-06-15 14:13:24 +00:00
committed by Android (Google) Code Review
3 changed files with 15 additions and 1 deletions

View File

@@ -76,4 +76,10 @@
<!-- Bouncer user switcher margins -->
<dimen name="bouncer_user_switcher_view_mode_user_switcher_bottom_margin">0dp</dimen>
<dimen name="bouncer_user_switcher_view_mode_view_flipper_bottom_margin">0dp</dimen>
<!-- Power Menu Lite -->
<!-- These values are for small screen landscape. For larger landscape screens, they are
overlaid -->
<dimen name="global_actions_button_size">72dp</dimen>
<dimen name="global_actions_button_padding">26dp</dimen>
</resources>

View File

@@ -18,4 +18,8 @@
<!-- Lock pattern view size, align sysui biometric_auth_pattern_view_size -->
<dimen name="biometric_auth_pattern_view_size">248dp</dimen>
<dimen name="biometric_auth_pattern_view_max_size">348dp</dimen>
<!-- Power Menu Lite -->
<dimen name="global_actions_button_size">96dp</dimen>
<dimen name="global_actions_button_padding">38dp</dimen>
</resources>

View File

@@ -249,6 +249,7 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene
private int mDialogPressDelay = DIALOG_PRESS_DELAY; // ms
protected Handler mMainHandler;
private int mSmallestScreenWidthDp;
private int mOrientation;
private final Optional<CentralSurfaces> mCentralSurfacesOptional;
private final KeyguardUpdateMonitor mKeyguardUpdateMonitor;
private final DialogLaunchAnimator mDialogLaunchAnimator;
@@ -391,6 +392,7 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene
mRingerModeTracker = ringerModeTracker;
mMainHandler = handler;
mSmallestScreenWidthDp = resources.getConfiguration().smallestScreenWidthDp;
mOrientation = resources.getConfiguration().orientation;
mCentralSurfacesOptional = centralSurfacesOptional;
mKeyguardUpdateMonitor = keyguardUpdateMonitor;
mDialogLaunchAnimator = dialogLaunchAnimator;
@@ -744,8 +746,10 @@ public class GlobalActionsDialogLite implements DialogInterface.OnDismissListene
@Override
public void onConfigChanged(Configuration newConfig) {
if (mDialog != null && mDialog.isShowing()
&& (newConfig.smallestScreenWidthDp != mSmallestScreenWidthDp)) {
&& (newConfig.smallestScreenWidthDp != mSmallestScreenWidthDp
|| newConfig.orientation != mOrientation)) {
mSmallestScreenWidthDp = newConfig.smallestScreenWidthDp;
mOrientation = newConfig.orientation;
mDialog.refreshDialog();
}
}