Loading packages/SystemUI/res/values/dimens.xml +3 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,9 @@ <dimen name="navigation_handle_bottom">10dp</dimen> <dimen name="navigation_handle_sample_horizontal_margin">10dp</dimen> <dimen name="navigation_home_handle_width">108dp</dimen> <!-- Used while animating the navbar during a long press. --> <dimen name="navigation_home_handle_additional_width_for_animation">20dp</dimen> <dimen name="navigation_home_handle_additional_height_for_animation">4dp</dimen> <!-- Size of the nav bar edge panels, should be greater to the edge sensitivity + the drag threshold --> Loading packages/SystemUI/shared/src/com/android/systemui/shared/recents/ISystemUiProxy.aidl +11 −1 Original line number Diff line number Diff line Loading @@ -144,5 +144,15 @@ interface ISystemUiProxy { */ oneway void onStatusBarTrackpadEvent(in MotionEvent event) = 52; // Next id = 54 /** * Animate the nav bar being long-pressed. * * @param isTouchDown {@code true} if the button is starting to be pressed ({@code false} if * released or canceled) * @param durationMs how long the animation should take (for the {@code isTouchDown} case, this * should be the same as the amount of time to trigger a long-press) */ oneway void animateNavBarLongPress(boolean isTouchDown, long durationMs) = 54; // Next id = 55 } packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java +6 −1 Original line number Diff line number Diff line Loading @@ -112,7 +112,6 @@ import com.android.internal.statusbar.LetterboxDetails; import com.android.internal.util.LatencyTracker; import com.android.internal.view.AppearanceRegion; import com.android.systemui.Gefingerpoken; import com.android.systemui.res.R; import com.android.systemui.assist.AssistManager; import com.android.systemui.dagger.qualifiers.Background; import com.android.systemui.dagger.qualifiers.DisplayId; Loading @@ -130,6 +129,7 @@ import com.android.systemui.navigationbar.gestural.QuickswitchOrientedNavHandle; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.recents.OverviewProxyService; import com.android.systemui.recents.Recents; import com.android.systemui.res.R; import com.android.systemui.settings.DisplayTracker; import com.android.systemui.settings.UserContextProvider; import com.android.systemui.settings.UserTracker; Loading Loading @@ -398,6 +398,11 @@ public class NavigationBar extends ViewController<NavigationBarView> implements mAssistManagerLazy.get().setAssistantOverridesRequested(invocationTypes); } @Override public void animateNavBarLongPress(boolean isTouchDown, long durationMs) { mView.getHomeHandle().animateLongPress(isTouchDown, durationMs); } @Override public void onHomeRotationEnabled(boolean enabled) { mView.getRotationButtonController().setHomeRotationEnabled(enabled); Loading packages/SystemUI/src/com/android/systemui/navigationbar/buttons/ButtonDispatcher.java +8 −0 Original line number Diff line number Diff line Loading @@ -247,6 +247,14 @@ public class ButtonDispatcher { } } public void animateLongPress(boolean isTouchDown, long durationMs) { for (int i = 0; i < mViews.size(); i++) { if (mViews.get(i) instanceof ButtonInterface) { ((ButtonInterface) mViews.get(i)).animateLongPress(isTouchDown, durationMs); } } } public void setLongClickable(boolean isLongClickable) { mLongClickable = isLongClickable; final int N = mViews.size(); Loading packages/SystemUI/src/com/android/systemui/navigationbar/buttons/ButtonInterface.java +10 −0 Original line number Diff line number Diff line Loading @@ -30,4 +30,14 @@ public interface ButtonInterface { void setDarkIntensity(float intensity); void setDelayTouchFeedback(boolean shouldDelay); /** * Animate the button being long-pressed. * * @param isTouchDown {@code true} if the button is starting to be pressed ({@code false} if * released or canceled) * @param durationMs how long the animation should take (for the {@code isTouchDown} case, this * should be the same as the amount of time to trigger a long-press) */ default void animateLongPress(boolean isTouchDown, long durationMs) {} } Loading
packages/SystemUI/res/values/dimens.xml +3 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,9 @@ <dimen name="navigation_handle_bottom">10dp</dimen> <dimen name="navigation_handle_sample_horizontal_margin">10dp</dimen> <dimen name="navigation_home_handle_width">108dp</dimen> <!-- Used while animating the navbar during a long press. --> <dimen name="navigation_home_handle_additional_width_for_animation">20dp</dimen> <dimen name="navigation_home_handle_additional_height_for_animation">4dp</dimen> <!-- Size of the nav bar edge panels, should be greater to the edge sensitivity + the drag threshold --> Loading
packages/SystemUI/shared/src/com/android/systemui/shared/recents/ISystemUiProxy.aidl +11 −1 Original line number Diff line number Diff line Loading @@ -144,5 +144,15 @@ interface ISystemUiProxy { */ oneway void onStatusBarTrackpadEvent(in MotionEvent event) = 52; // Next id = 54 /** * Animate the nav bar being long-pressed. * * @param isTouchDown {@code true} if the button is starting to be pressed ({@code false} if * released or canceled) * @param durationMs how long the animation should take (for the {@code isTouchDown} case, this * should be the same as the amount of time to trigger a long-press) */ oneway void animateNavBarLongPress(boolean isTouchDown, long durationMs) = 54; // Next id = 55 }
packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java +6 −1 Original line number Diff line number Diff line Loading @@ -112,7 +112,6 @@ import com.android.internal.statusbar.LetterboxDetails; import com.android.internal.util.LatencyTracker; import com.android.internal.view.AppearanceRegion; import com.android.systemui.Gefingerpoken; import com.android.systemui.res.R; import com.android.systemui.assist.AssistManager; import com.android.systemui.dagger.qualifiers.Background; import com.android.systemui.dagger.qualifiers.DisplayId; Loading @@ -130,6 +129,7 @@ import com.android.systemui.navigationbar.gestural.QuickswitchOrientedNavHandle; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.recents.OverviewProxyService; import com.android.systemui.recents.Recents; import com.android.systemui.res.R; import com.android.systemui.settings.DisplayTracker; import com.android.systemui.settings.UserContextProvider; import com.android.systemui.settings.UserTracker; Loading Loading @@ -398,6 +398,11 @@ public class NavigationBar extends ViewController<NavigationBarView> implements mAssistManagerLazy.get().setAssistantOverridesRequested(invocationTypes); } @Override public void animateNavBarLongPress(boolean isTouchDown, long durationMs) { mView.getHomeHandle().animateLongPress(isTouchDown, durationMs); } @Override public void onHomeRotationEnabled(boolean enabled) { mView.getRotationButtonController().setHomeRotationEnabled(enabled); Loading
packages/SystemUI/src/com/android/systemui/navigationbar/buttons/ButtonDispatcher.java +8 −0 Original line number Diff line number Diff line Loading @@ -247,6 +247,14 @@ public class ButtonDispatcher { } } public void animateLongPress(boolean isTouchDown, long durationMs) { for (int i = 0; i < mViews.size(); i++) { if (mViews.get(i) instanceof ButtonInterface) { ((ButtonInterface) mViews.get(i)).animateLongPress(isTouchDown, durationMs); } } } public void setLongClickable(boolean isLongClickable) { mLongClickable = isLongClickable; final int N = mViews.size(); Loading
packages/SystemUI/src/com/android/systemui/navigationbar/buttons/ButtonInterface.java +10 −0 Original line number Diff line number Diff line Loading @@ -30,4 +30,14 @@ public interface ButtonInterface { void setDarkIntensity(float intensity); void setDelayTouchFeedback(boolean shouldDelay); /** * Animate the button being long-pressed. * * @param isTouchDown {@code true} if the button is starting to be pressed ({@code false} if * released or canceled) * @param durationMs how long the animation should take (for the {@code isTouchDown} case, this * should be the same as the amount of time to trigger a long-press) */ default void animateLongPress(boolean isTouchDown, long durationMs) {} }