diff options
| author | Josh Tsuji <tsuji@google.com> | 2021-03-30 10:47:55 -0400 |
|---|---|---|
| committer | Josh Tsuji <tsuji@google.com> | 2021-03-30 10:54:28 -0400 |
| commit | 026c34f6444827dd66a828fbdce185cfcd3fcb71 (patch) | |
| tree | 4ba711e479844f6e8b3db46d96c1efa5f7c0ca87 | |
| parent | 948bd86481993faa0aefa3f276c9f5d8180e7b07 (diff) | |
Use the physical location of the power button for the power button animation.
Bug: 181020504
Test: manual
Change-Id: I8bc27b0276c680cbcabc0a853c833a7536f15a45
| -rw-r--r-- | packages/SystemUI/res/values/dimens.xml | 15 | ||||
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java | 2 |
2 files changed, 16 insertions, 1 deletions
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml index d5c6398dd719..64a71b4bee3e 100644 --- a/packages/SystemUI/res/values/dimens.xml +++ b/packages/SystemUI/res/values/dimens.xml @@ -1396,4 +1396,19 @@ <dimen name="rounded_slider_track_width">8dp</dimen> <!-- rounded_slider_track_width / 2 --> <dimen name="rounded_slider_track_corner_radius">4dp</dimen> + + <!-- Location on the screen of the center of the physical power button. This is a reasonable + default that should be overridden by device-specific overlays. --> + <dimen name="physical_power_button_center_screen_location_y">620px</dimen> + + <!-- Location on the screen of the center of the physical volume up/down buttons. This is a + reasonable default that should be overridden by device-specific overlays. --> + <dimen name="physical_volume_up_button_center_screen_location_y">950px</dimen> + <dimen name="physical_volume_down_button_center_screen_location_y">1150px</dimen> + + <!-- Location on the screen of the center of the fingerprint sensor. For devices with under + display fingerprint sensors, this directly corresponds to the fingerprint sensor's location. + For devices with sensors on the back of the device, this corresponds to the location on the + screen directly in front of the sensor. --> + <dimen name="physical_fingerprint_sensor_center_screen_location_y">610px</dimen> </resources> diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java index d581c4b6f9b7..bb9332fedf95 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java @@ -2964,7 +2964,7 @@ public class StatusBar extends SystemUI implements DemoMode, } mPowerButtonReveal = new PowerButtonReveal(mContext.getResources().getDimensionPixelSize( - R.dimen.global_actions_top_padding)); + com.android.systemui.R.dimen.physical_power_button_center_screen_location_y)); } // Visibility reporting |
