diff options
author | 2020-06-11 17:09:03 +0800 | |
---|---|---|
committer | 2020-06-11 11:37:55 +0000 | |
commit | 23ceefbf8bdacd8bca2acf321588f00507569cb9 (patch) | |
tree | c541ada266245556f93e4be8167ed20fe9fdd172 | |
parent | 7e1ceb2f604ae7928e4353680a61af0d99a1a500 (diff) |
Overlay navigation_bar_gesture_height with highest order
1) One handed mode will overlay navigation_bar_gesture_height
2) RRO priority attribute only design for static overlay packages
3) Use setHighestPriority() bring OneHandedModeGesturalOverlay to top
4) Integrate 2Button & 3Button mode with values-land dimen
Mode | Orientation | Before | After
--------------------------------------------
NO_BUTTON | Portrait | 32dp | 32dp
NO_BUTTON | Landscape | 32dp | 32dp
2 BUTTON | Portrait | 48dp | 48dp
2 BUTTON | Landscape | 48dp | 48dp
3 BUTTON | Portrait | 48dp | 48dp
3 BUTTON | Landscape | 48dp | 48dp
--------------------------------------------
OneHanded | Portrait | 32dp | *80dp
OneHanded | Landscape | 32dp | 32dp
Test: atest WindowInsetsBehaviorTests
Test: atest com.android.systemui.onehanded
Bug: 157958539
Change-Id: I956c90a436dbdc86ca3fb23354cb3a82394ed718
4 files changed, 68 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedUI.java b/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedUI.java index 3c1b33ef3770..0f4e6be76721 100644 --- a/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedUI.java +++ b/packages/SystemUI/src/com/android/systemui/onehanded/OneHandedUI.java @@ -169,6 +169,8 @@ public class OneHandedUI extends SystemUI implements CommandQueue.Callbacks, Dum OverlayInfo info = null; try { + // TODO(b/157958539) migrate new RRO config file after S+ + mOverlayManager.setHighestPriority(ONE_HANDED_MODE_GESTURAL_OVERLAY, USER_CURRENT); info = mOverlayManager.getOverlayInfo(ONE_HANDED_MODE_GESTURAL_OVERLAY, USER_CURRENT); } catch (RemoteException e) { /* Do nothing */ } diff --git a/packages/overlays/NavigationBarMode2ButtonOverlay/res/values-land/dimens.xml b/packages/overlays/NavigationBarMode2ButtonOverlay/res/values-land/dimens.xml new file mode 100644 index 000000000000..623ff043090a --- /dev/null +++ b/packages/overlays/NavigationBarMode2ButtonOverlay/res/values-land/dimens.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/** + * Copyright (c) 2020, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +--> +<resources> + <!-- The height of the bottom navigation gesture area. --> + <dimen name="navigation_bar_gesture_height">@*android:dimen/navigation_bar_frame_height</dimen> +</resources> diff --git a/packages/overlays/NavigationBarMode3ButtonOverlay/res/values-land/dimens.xml b/packages/overlays/NavigationBarMode3ButtonOverlay/res/values-land/dimens.xml new file mode 100644 index 000000000000..623ff043090a --- /dev/null +++ b/packages/overlays/NavigationBarMode3ButtonOverlay/res/values-land/dimens.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/** + * Copyright (c) 2020, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +--> +<resources> + <!-- The height of the bottom navigation gesture area. --> + <dimen name="navigation_bar_gesture_height">@*android:dimen/navigation_bar_frame_height</dimen> +</resources> diff --git a/packages/overlays/NavigationBarModeGesturalOverlay/res/values-land/dimens.xml b/packages/overlays/NavigationBarModeGesturalOverlay/res/values-land/dimens.xml new file mode 100644 index 000000000000..1f5834d72dd0 --- /dev/null +++ b/packages/overlays/NavigationBarModeGesturalOverlay/res/values-land/dimens.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/** + * Copyright (c) 2019, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +--> +<resources> + <!-- The height of the bottom navigation gesture area. --> + <dimen name="navigation_bar_gesture_height">32dp</dimen> +</resources> |