Loading packages/SystemUI/res/layout/rotate_suggestion.xml +14 −11 Original line number Diff line number Diff line Loading @@ -14,16 +14,19 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License --> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" > <com.android.systemui.navigationbar.buttons.KeyButtonView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/rotate_suggestion" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="0" android:scaleType="center" android:visibility="invisible" android:layout_width="@dimen/floating_rotation_button_diameter" android:layout_height="@dimen/floating_rotation_button_diameter" android:contentDescription="@string/accessibility_rotate_button" android:paddingStart="@dimen/navigation_key_padding" android:paddingEnd="@dimen/navigation_key_padding" /> No newline at end of file android:layout_gravity="bottom|left" android:scaleType="center" android:visibility="invisible" /> </FrameLayout> No newline at end of file packages/SystemUI/res/values/dimens.xml +3 −1 Original line number Diff line number Diff line Loading @@ -62,7 +62,9 @@ <item name="navigation_luminance_change_threshold" type="dimen" format="float">0.05</item> <dimen name="floating_rotation_button_diameter">40dp</dimen> <dimen name="floating_rotation_button_min_margin">4dp</dimen> <dimen name="floating_rotation_button_min_margin">20dp</dimen> <dimen name="floating_rotation_button_taskbar_left_margin">20dp</dimen> <dimen name="floating_rotation_button_taskbar_bottom_margin">10dp</dimen> <!-- Height of notification icons in the status bar --> <dimen name="status_bar_icon_size">@*android:dimen/status_bar_icon_size</dimen> Loading packages/SystemUI/shared/src/com/android/systemui/shared/recents/ISystemUiProxy.aidl +4 −1 Original line number Diff line number Diff line Loading @@ -140,5 +140,8 @@ interface ISystemUiProxy { /** Notifies that a swipe-up gesture has started */ oneway void notifySwipeUpGestureStarted() = 46; // Next id = 47 /** Notifies when taskbar status updated */ oneway void notifyTaskbarStatus(boolean visible, boolean stashed) = 47; // Next id = 48 } packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java +7 −0 Original line number Diff line number Diff line Loading @@ -383,6 +383,13 @@ public class NavigationBar implements View.OnAttachStateChangeListener, mNavigationBarView.getRotationButtonController().setSkipOverrideUserLockPrefsOnce(); } @Override public void onTaskbarStatusUpdated(boolean visible, boolean stashed) { mNavigationBarView .getFloatingRotationButton() .onTaskbarStateChanged(visible, stashed); } @Override public void onToggleRecentApps() { // The same case as onOverviewShown but only for 3-button navigation. Loading packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java +18 −8 Original line number Diff line number Diff line Loading @@ -69,6 +69,7 @@ import com.android.systemui.Dependency; import com.android.systemui.R; import com.android.systemui.animation.Interpolators; import com.android.systemui.model.SysUiState; import com.android.systemui.navigationbar.RotationButton.RotationButtonUpdatesCallback; import com.android.systemui.navigationbar.buttons.ButtonDispatcher; import com.android.systemui.navigationbar.buttons.ContextualButton; import com.android.systemui.navigationbar.buttons.ContextualButtonGroup; Loading Loading @@ -275,13 +276,22 @@ public class NavigationBarView extends FrameLayout implements false /* inScreen */, false /* useNearestRegion */)); }; private final Consumer<Boolean> mRotationButtonListener = (visible) -> { private final RotationButtonUpdatesCallback mRotationButtonListener = new RotationButtonUpdatesCallback() { @Override public void onVisibilityChanged(boolean visible) { if (visible) { // If the button will actually become visible and the navbar is about to hide, // tell the statusbar to keep it around for longer // If the button will actually become visible and the navbar is about // to hide, tell the statusbar to keep it around for longer mAutoHideController.touchAutoHide(); } notifyActiveTouchRegions(); } @Override public void onPositionChanged() { notifyActiveTouchRegions(); } }; private final Consumer<Boolean> mNavbarOverlayVisibilityChangeCallback = (visible) -> { Loading Loading
packages/SystemUI/res/layout/rotate_suggestion.xml +14 −11 Original line number Diff line number Diff line Loading @@ -14,16 +14,19 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License --> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" > <com.android.systemui.navigationbar.buttons.KeyButtonView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/rotate_suggestion" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="0" android:scaleType="center" android:visibility="invisible" android:layout_width="@dimen/floating_rotation_button_diameter" android:layout_height="@dimen/floating_rotation_button_diameter" android:contentDescription="@string/accessibility_rotate_button" android:paddingStart="@dimen/navigation_key_padding" android:paddingEnd="@dimen/navigation_key_padding" /> No newline at end of file android:layout_gravity="bottom|left" android:scaleType="center" android:visibility="invisible" /> </FrameLayout> No newline at end of file
packages/SystemUI/res/values/dimens.xml +3 −1 Original line number Diff line number Diff line Loading @@ -62,7 +62,9 @@ <item name="navigation_luminance_change_threshold" type="dimen" format="float">0.05</item> <dimen name="floating_rotation_button_diameter">40dp</dimen> <dimen name="floating_rotation_button_min_margin">4dp</dimen> <dimen name="floating_rotation_button_min_margin">20dp</dimen> <dimen name="floating_rotation_button_taskbar_left_margin">20dp</dimen> <dimen name="floating_rotation_button_taskbar_bottom_margin">10dp</dimen> <!-- Height of notification icons in the status bar --> <dimen name="status_bar_icon_size">@*android:dimen/status_bar_icon_size</dimen> Loading
packages/SystemUI/shared/src/com/android/systemui/shared/recents/ISystemUiProxy.aidl +4 −1 Original line number Diff line number Diff line Loading @@ -140,5 +140,8 @@ interface ISystemUiProxy { /** Notifies that a swipe-up gesture has started */ oneway void notifySwipeUpGestureStarted() = 46; // Next id = 47 /** Notifies when taskbar status updated */ oneway void notifyTaskbarStatus(boolean visible, boolean stashed) = 47; // Next id = 48 }
packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java +7 −0 Original line number Diff line number Diff line Loading @@ -383,6 +383,13 @@ public class NavigationBar implements View.OnAttachStateChangeListener, mNavigationBarView.getRotationButtonController().setSkipOverrideUserLockPrefsOnce(); } @Override public void onTaskbarStatusUpdated(boolean visible, boolean stashed) { mNavigationBarView .getFloatingRotationButton() .onTaskbarStateChanged(visible, stashed); } @Override public void onToggleRecentApps() { // The same case as onOverviewShown but only for 3-button navigation. Loading
packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java +18 −8 Original line number Diff line number Diff line Loading @@ -69,6 +69,7 @@ import com.android.systemui.Dependency; import com.android.systemui.R; import com.android.systemui.animation.Interpolators; import com.android.systemui.model.SysUiState; import com.android.systemui.navigationbar.RotationButton.RotationButtonUpdatesCallback; import com.android.systemui.navigationbar.buttons.ButtonDispatcher; import com.android.systemui.navigationbar.buttons.ContextualButton; import com.android.systemui.navigationbar.buttons.ContextualButtonGroup; Loading Loading @@ -275,13 +276,22 @@ public class NavigationBarView extends FrameLayout implements false /* inScreen */, false /* useNearestRegion */)); }; private final Consumer<Boolean> mRotationButtonListener = (visible) -> { private final RotationButtonUpdatesCallback mRotationButtonListener = new RotationButtonUpdatesCallback() { @Override public void onVisibilityChanged(boolean visible) { if (visible) { // If the button will actually become visible and the navbar is about to hide, // tell the statusbar to keep it around for longer // If the button will actually become visible and the navbar is about // to hide, tell the statusbar to keep it around for longer mAutoHideController.touchAutoHide(); } notifyActiveTouchRegions(); } @Override public void onPositionChanged() { notifyActiveTouchRegions(); } }; private final Consumer<Boolean> mNavbarOverlayVisibilityChangeCallback = (visible) -> { Loading