Loading packages/SystemUI/shared/src/com/android/systemui/shared/recents/IOverviewProxy.aidl +6 −13 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.graphics.Rect; import android.graphics.Region; import android.os.Bundle; import android.view.MotionEvent; import android.view.SurfaceControl; import com.android.systemui.shared.recents.ISystemUiProxy; oneway interface IOverviewProxy { Loading @@ -43,12 +44,6 @@ oneway interface IOverviewProxy { */ void onOverviewHidden(boolean triggeredFromAltTab, boolean triggeredFromHomeKey) = 8; /** * Sent when there was an action on one of the onboarding tips view. * TODO: Move this implementation to SystemUI completely */ void onTip(int actionType, int viewType) = 10; /** * Sent when device assistant changes its default assistant whether it is available or not. */ Loading @@ -59,13 +54,6 @@ oneway interface IOverviewProxy { */ void onAssistantVisibilityChanged(float visibility) = 14; /** * Sent when back is triggered. * TODO: Move this implementation to SystemUI completely */ void onBackAction(boolean completed, int downX, int downY, boolean isButton, boolean gestureSwipeLeft) = 15; /** * Sent when some system ui state changes. */ Loading Loading @@ -115,4 +103,9 @@ oneway interface IOverviewProxy { * Sent when split keyboard shortcut is triggered to enter stage split. */ void enterStageSplitFromRunningApp(boolean leftOrTop) = 25; /** * Sent when the surface for navigation bar is created or changed */ void onNavigationBarSurface(in SurfaceControl surface) = 26; } packages/SystemUI/shared/src/com/android/systemui/shared/recents/ISystemUiProxy.aidl +0 −3 Original line number Diff line number Diff line Loading @@ -106,9 +106,6 @@ interface ISystemUiProxy { /** Sets home rotation enabled. */ void setHomeRotationEnabled(boolean enabled) = 45; /** Notifies that a swipe-up gesture has started */ oneway void notifySwipeUpGestureStarted() = 46; /** Notifies when taskbar status updated */ oneway void notifyTaskbarStatus(boolean visible, boolean stashed) = 47; Loading packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java +34 −9 Original line number Diff line number Diff line Loading @@ -85,7 +85,11 @@ import android.view.InsetsVisibilities; import android.view.KeyEvent; import android.view.MotionEvent; import android.view.Surface; import android.view.SurfaceControl; import android.view.SurfaceControl.Transaction; import android.view.View; import android.view.ViewRootImpl; import android.view.ViewRootImpl.SurfaceChangedCallback; import android.view.ViewTreeObserver; import android.view.ViewTreeObserver.InternalInsetsInfo; import android.view.ViewTreeObserver.OnComputeInternalInsetsListener; Loading Loading @@ -353,15 +357,6 @@ public class NavigationBar extends ViewController<NavigationBarView> implements updateScreenPinningGestures(); } @Override public void onQuickStepStarted() { // Use navbar dragging as a signal to hide the rotate button mView.getRotationButtonController().setRotateSuggestionButtonState(false); // Hide the notifications panel when quick step starts mShadeController.collapsePanel(true /* animate */); } @Override public void onPrioritizedRotation(@Surface.Rotation int rotation) { mStartingQuickSwitchRotation = rotation; Loading Loading @@ -475,6 +470,24 @@ public class NavigationBar extends ViewController<NavigationBarView> implements } }; private final ViewRootImpl.SurfaceChangedCallback mSurfaceChangedCallback = new SurfaceChangedCallback() { @Override public void surfaceCreated(Transaction t) { notifyNavigationBarSurface(); } @Override public void surfaceDestroyed() { notifyNavigationBarSurface(); } @Override public void surfaceReplaced(Transaction t) { notifyNavigationBarSurface(); } }; @Inject NavigationBar( NavigationBarView navigationBarView, Loading Loading @@ -701,6 +714,8 @@ public class NavigationBar extends ViewController<NavigationBarView> implements mView.getViewTreeObserver().addOnComputeInternalInsetsListener( mOnComputeInternalInsetsListener); mView.getViewRootImpl().addSurfaceChangedCallback(mSurfaceChangedCallback); notifyNavigationBarSurface(); mNavBarHelper.registerNavTaskStateUpdater(mNavbarTaskbarStateUpdater); Loading Loading @@ -779,6 +794,10 @@ public class NavigationBar extends ViewController<NavigationBarView> implements mHandler.removeCallbacks(mEnableLayoutTransitions); mNavBarHelper.removeNavTaskStateUpdater(mNavbarTaskbarStateUpdater); mPipOptional.ifPresent(mView::removePipExclusionBoundsChangeListener); ViewRootImpl viewRoot = mView.getViewRootImpl(); if (viewRoot != null) { viewRoot.removeSurfaceChangedCallback(mSurfaceChangedCallback); } mFrame = null; mOrientationHandle = null; } Loading Loading @@ -932,6 +951,12 @@ public class NavigationBar extends ViewController<NavigationBarView> implements } } private void notifyNavigationBarSurface() { ViewRootImpl viewRoot = mView.getViewRootImpl(); SurfaceControl surface = viewRoot != null ? viewRoot.getSurfaceControl() : null; mOverviewProxyService.onNavigationBarSurfaceChanged(surface); } private int deltaRotation(int oldRotation, int newRotation) { int delta = newRotation - oldRotation; if (delta < 0) delta += 4; Loading packages/SystemUI/src/com/android/systemui/navigationbar/buttons/KeyButtonView.java +0 −4 Original line number Diff line number Diff line Loading @@ -412,10 +412,6 @@ public class KeyButtonView extends ImageView implements ButtonInterface { logSomePresses(action, flags); if (mCode == KeyEvent.KEYCODE_BACK && flags != KeyEvent.FLAG_LONG_PRESS) { Log.i(TAG, "Back button event: " + KeyEvent.actionToString(action)); if (action == MotionEvent.ACTION_UP) { mOverviewProxyService.notifyBackAction((flags & KeyEvent.FLAG_CANCELED) == 0, -1, -1, true /* isButton */, false /* gestureSwipeLeft */); } } final int repeatCount = (flags & KeyEvent.FLAG_LONG_PRESS) != 0 ? 1 : 0; final KeyEvent ev = new KeyEvent(mDownTime, when, action, mCode, repeatCount, Loading packages/SystemUI/src/com/android/systemui/navigationbar/gestural/EdgeBackGestureHandler.java +0 −7 Original line number Diff line number Diff line Loading @@ -287,8 +287,6 @@ public class EdgeBackGestureHandler extends CurrentUserTracker mBackAnimation.setTriggerBack(true); } mOverviewProxyService.notifyBackAction(true, (int) mDownPoint.x, (int) mDownPoint.y, false /* isButton */, !mIsOnLeftEdge); logGesture(mInRejectedExclusion ? SysUiStatsLog.BACK_GESTURE__TYPE__COMPLETED_REJECTED : SysUiStatsLog.BACK_GESTURE__TYPE__COMPLETED); Loading @@ -300,8 +298,6 @@ public class EdgeBackGestureHandler extends CurrentUserTracker mBackAnimation.setTriggerBack(false); } logGesture(SysUiStatsLog.BACK_GESTURE__TYPE__INCOMPLETE); mOverviewProxyService.notifyBackAction(false, (int) mDownPoint.x, (int) mDownPoint.y, false /* isButton */, !mIsOnLeftEdge); } @Override Loading Loading @@ -785,9 +781,6 @@ public class EdgeBackGestureHandler extends CurrentUserTracker if (mExcludeRegion.contains(x, y)) { if (withinRange) { // Log as exclusion only if it is in acceptable range in the first place. mOverviewProxyService.notifyBackAction( false /* completed */, -1, -1, false /* isButton */, !mIsOnLeftEdge); // We don't have the end point for logging purposes. mEndPoint.x = -1; mEndPoint.y = -1; Loading Loading
packages/SystemUI/shared/src/com/android/systemui/shared/recents/IOverviewProxy.aidl +6 −13 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.graphics.Rect; import android.graphics.Region; import android.os.Bundle; import android.view.MotionEvent; import android.view.SurfaceControl; import com.android.systemui.shared.recents.ISystemUiProxy; oneway interface IOverviewProxy { Loading @@ -43,12 +44,6 @@ oneway interface IOverviewProxy { */ void onOverviewHidden(boolean triggeredFromAltTab, boolean triggeredFromHomeKey) = 8; /** * Sent when there was an action on one of the onboarding tips view. * TODO: Move this implementation to SystemUI completely */ void onTip(int actionType, int viewType) = 10; /** * Sent when device assistant changes its default assistant whether it is available or not. */ Loading @@ -59,13 +54,6 @@ oneway interface IOverviewProxy { */ void onAssistantVisibilityChanged(float visibility) = 14; /** * Sent when back is triggered. * TODO: Move this implementation to SystemUI completely */ void onBackAction(boolean completed, int downX, int downY, boolean isButton, boolean gestureSwipeLeft) = 15; /** * Sent when some system ui state changes. */ Loading Loading @@ -115,4 +103,9 @@ oneway interface IOverviewProxy { * Sent when split keyboard shortcut is triggered to enter stage split. */ void enterStageSplitFromRunningApp(boolean leftOrTop) = 25; /** * Sent when the surface for navigation bar is created or changed */ void onNavigationBarSurface(in SurfaceControl surface) = 26; }
packages/SystemUI/shared/src/com/android/systemui/shared/recents/ISystemUiProxy.aidl +0 −3 Original line number Diff line number Diff line Loading @@ -106,9 +106,6 @@ interface ISystemUiProxy { /** Sets home rotation enabled. */ void setHomeRotationEnabled(boolean enabled) = 45; /** Notifies that a swipe-up gesture has started */ oneway void notifySwipeUpGestureStarted() = 46; /** Notifies when taskbar status updated */ oneway void notifyTaskbarStatus(boolean visible, boolean stashed) = 47; Loading
packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java +34 −9 Original line number Diff line number Diff line Loading @@ -85,7 +85,11 @@ import android.view.InsetsVisibilities; import android.view.KeyEvent; import android.view.MotionEvent; import android.view.Surface; import android.view.SurfaceControl; import android.view.SurfaceControl.Transaction; import android.view.View; import android.view.ViewRootImpl; import android.view.ViewRootImpl.SurfaceChangedCallback; import android.view.ViewTreeObserver; import android.view.ViewTreeObserver.InternalInsetsInfo; import android.view.ViewTreeObserver.OnComputeInternalInsetsListener; Loading Loading @@ -353,15 +357,6 @@ public class NavigationBar extends ViewController<NavigationBarView> implements updateScreenPinningGestures(); } @Override public void onQuickStepStarted() { // Use navbar dragging as a signal to hide the rotate button mView.getRotationButtonController().setRotateSuggestionButtonState(false); // Hide the notifications panel when quick step starts mShadeController.collapsePanel(true /* animate */); } @Override public void onPrioritizedRotation(@Surface.Rotation int rotation) { mStartingQuickSwitchRotation = rotation; Loading Loading @@ -475,6 +470,24 @@ public class NavigationBar extends ViewController<NavigationBarView> implements } }; private final ViewRootImpl.SurfaceChangedCallback mSurfaceChangedCallback = new SurfaceChangedCallback() { @Override public void surfaceCreated(Transaction t) { notifyNavigationBarSurface(); } @Override public void surfaceDestroyed() { notifyNavigationBarSurface(); } @Override public void surfaceReplaced(Transaction t) { notifyNavigationBarSurface(); } }; @Inject NavigationBar( NavigationBarView navigationBarView, Loading Loading @@ -701,6 +714,8 @@ public class NavigationBar extends ViewController<NavigationBarView> implements mView.getViewTreeObserver().addOnComputeInternalInsetsListener( mOnComputeInternalInsetsListener); mView.getViewRootImpl().addSurfaceChangedCallback(mSurfaceChangedCallback); notifyNavigationBarSurface(); mNavBarHelper.registerNavTaskStateUpdater(mNavbarTaskbarStateUpdater); Loading Loading @@ -779,6 +794,10 @@ public class NavigationBar extends ViewController<NavigationBarView> implements mHandler.removeCallbacks(mEnableLayoutTransitions); mNavBarHelper.removeNavTaskStateUpdater(mNavbarTaskbarStateUpdater); mPipOptional.ifPresent(mView::removePipExclusionBoundsChangeListener); ViewRootImpl viewRoot = mView.getViewRootImpl(); if (viewRoot != null) { viewRoot.removeSurfaceChangedCallback(mSurfaceChangedCallback); } mFrame = null; mOrientationHandle = null; } Loading Loading @@ -932,6 +951,12 @@ public class NavigationBar extends ViewController<NavigationBarView> implements } } private void notifyNavigationBarSurface() { ViewRootImpl viewRoot = mView.getViewRootImpl(); SurfaceControl surface = viewRoot != null ? viewRoot.getSurfaceControl() : null; mOverviewProxyService.onNavigationBarSurfaceChanged(surface); } private int deltaRotation(int oldRotation, int newRotation) { int delta = newRotation - oldRotation; if (delta < 0) delta += 4; Loading
packages/SystemUI/src/com/android/systemui/navigationbar/buttons/KeyButtonView.java +0 −4 Original line number Diff line number Diff line Loading @@ -412,10 +412,6 @@ public class KeyButtonView extends ImageView implements ButtonInterface { logSomePresses(action, flags); if (mCode == KeyEvent.KEYCODE_BACK && flags != KeyEvent.FLAG_LONG_PRESS) { Log.i(TAG, "Back button event: " + KeyEvent.actionToString(action)); if (action == MotionEvent.ACTION_UP) { mOverviewProxyService.notifyBackAction((flags & KeyEvent.FLAG_CANCELED) == 0, -1, -1, true /* isButton */, false /* gestureSwipeLeft */); } } final int repeatCount = (flags & KeyEvent.FLAG_LONG_PRESS) != 0 ? 1 : 0; final KeyEvent ev = new KeyEvent(mDownTime, when, action, mCode, repeatCount, Loading
packages/SystemUI/src/com/android/systemui/navigationbar/gestural/EdgeBackGestureHandler.java +0 −7 Original line number Diff line number Diff line Loading @@ -287,8 +287,6 @@ public class EdgeBackGestureHandler extends CurrentUserTracker mBackAnimation.setTriggerBack(true); } mOverviewProxyService.notifyBackAction(true, (int) mDownPoint.x, (int) mDownPoint.y, false /* isButton */, !mIsOnLeftEdge); logGesture(mInRejectedExclusion ? SysUiStatsLog.BACK_GESTURE__TYPE__COMPLETED_REJECTED : SysUiStatsLog.BACK_GESTURE__TYPE__COMPLETED); Loading @@ -300,8 +298,6 @@ public class EdgeBackGestureHandler extends CurrentUserTracker mBackAnimation.setTriggerBack(false); } logGesture(SysUiStatsLog.BACK_GESTURE__TYPE__INCOMPLETE); mOverviewProxyService.notifyBackAction(false, (int) mDownPoint.x, (int) mDownPoint.y, false /* isButton */, !mIsOnLeftEdge); } @Override Loading Loading @@ -785,9 +781,6 @@ public class EdgeBackGestureHandler extends CurrentUserTracker if (mExcludeRegion.contains(x, y)) { if (withinRange) { // Log as exclusion only if it is in acceptable range in the first place. mOverviewProxyService.notifyBackAction( false /* completed */, -1, -1, false /* isButton */, !mIsOnLeftEdge); // We don't have the end point for logging purposes. mEndPoint.x = -1; mEndPoint.y = -1; Loading