diff options
3 files changed, 0 insertions, 67 deletions
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/recents/IOverviewProxy.aidl b/packages/SystemUI/shared/src/com/android/systemui/shared/recents/IOverviewProxy.aidl index 7088829bd2a3..d191a3c3f28b 100644 --- a/packages/SystemUI/shared/src/com/android/systemui/shared/recents/IOverviewProxy.aidl +++ b/packages/SystemUI/shared/src/com/android/systemui/shared/recents/IOverviewProxy.aidl @@ -20,7 +20,6 @@ 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; // Next ID: 29 @@ -99,11 +98,6 @@ oneway interface IOverviewProxy { void enterStageSplitFromRunningApp(boolean leftOrTop) = 25; /** - * Sent when the surface for navigation bar is created or changed - */ - void onNavigationBarSurface(in SurfaceControl surface) = 26; - - /** * Sent when the task bar stash state is toggled. */ void onTaskbarToggled() = 27; diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java index 0a72a2f15e95..068e5fd61ea4 100644 --- a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java +++ b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java @@ -504,24 +504,6 @@ 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(); - } - }; - private boolean mScreenPinningActive = false; private final TaskStackChangeListener mTaskStackListener = new TaskStackChangeListener() { @Override @@ -787,8 +769,6 @@ public class NavigationBar extends ViewController<NavigationBarView> implements mView.getViewTreeObserver().addOnComputeInternalInsetsListener( mOnComputeInternalInsetsListener); - mView.getViewRootImpl().addSurfaceChangedCallback(mSurfaceChangedCallback); - notifyNavigationBarSurface(); mPipOptional.ifPresent(mView::addPipExclusionBoundsChangeListener); mBackAnimation.ifPresent(mView::registerBackAnimation); @@ -860,13 +840,8 @@ 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; - notifyNavigationBarSurface(); } // TODO: Remove this when we update nav bar recreation @@ -1026,17 +1001,6 @@ public class NavigationBar extends ViewController<NavigationBarView> implements } } - private void notifyNavigationBarSurface() { - ViewRootImpl viewRoot = mView.getViewRootImpl(); - SurfaceControl surface = mView.getParent() != null - && viewRoot != null - && viewRoot.getSurfaceControl() != null - && viewRoot.getSurfaceControl().isValid() - ? viewRoot.getSurfaceControl() - : null; - mOverviewProxyService.onNavigationBarSurfaceChanged(surface); - } - private int deltaRotation(int oldRotation, int newRotation) { int delta = newRotation - oldRotation; if (delta < 0) delta += 4; diff --git a/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java b/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java index fd53423e7f22..cc53aabfcd25 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java +++ b/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java @@ -169,7 +169,6 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis private final DisplayTracker mDisplayTracker; private Region mActiveNavBarRegion; - private SurfaceControl mNavigationBarSurface; private IOverviewProxy mOverviewProxy; private int mConnectionBackoffAttempts; @@ -488,7 +487,6 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis Log.e(TAG_OPS, "Failed to call onInitialize()", e); } dispatchNavButtonBounds(); - dispatchNavigationBarSurface(); // Force-update the systemui state flags updateSystemUiStateFlags(); @@ -679,28 +677,6 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis .commitUpdate(mContext.getDisplayId()); } - /** - * Called when the navigation bar surface is created or changed - */ - public void onNavigationBarSurfaceChanged(SurfaceControl navbarSurface) { - mNavigationBarSurface = navbarSurface; - dispatchNavigationBarSurface(); - } - - private void dispatchNavigationBarSurface() { - try { - if (mOverviewProxy != null) { - // Catch all for cases where the surface is no longer valid - if (mNavigationBarSurface != null && !mNavigationBarSurface.isValid()) { - mNavigationBarSurface = null; - } - mOverviewProxy.onNavigationBarSurface(mNavigationBarSurface); - } - } catch (RemoteException e) { - Log.e(TAG_OPS, "Failed to notify back action", e); - } - } - private void updateEnabledAndBinding() { updateEnabledState(); startConnectionToCurrentUser(); @@ -1075,7 +1051,6 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis pw.print(" mInputFocusTransferStartY="); pw.println(mInputFocusTransferStartY); pw.print(" mInputFocusTransferStartMillis="); pw.println(mInputFocusTransferStartMillis); pw.print(" mActiveNavBarRegion="); pw.println(mActiveNavBarRegion); - pw.print(" mNavigationBarSurface="); pw.println(mNavigationBarSurface); pw.print(" mNavBarMode="); pw.println(mNavBarMode); mSysUiState.dump(pw, args); } |