Loading packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java +39 −41 Original line number Diff line number Diff line Loading @@ -940,12 +940,12 @@ public class NavigationBar extends ViewController<NavigationBarView> implements private void orientSecondaryHomeHandle() { if (!canShowSecondaryHandle()) { if (mStartingQuickSwitchRotation == -1) { resetSecondaryHandle(); } return; } if (mStartingQuickSwitchRotation == -1) { resetSecondaryHandle(); } else { int deltaRotation = deltaRotation(mCurrentRotation, mStartingQuickSwitchRotation); if (mStartingQuickSwitchRotation == -1 || deltaRotation == -1) { // Curious if starting quickswitch can change between the if check and our delta Loading @@ -958,13 +958,11 @@ public class NavigationBar extends ViewController<NavigationBarView> implements Rect dispSize = mWindowManager.getCurrentWindowMetrics().getBounds(); mOrientationHandle.setDeltaRotation(deltaRotation); switch (deltaRotation) { case Surface.ROTATION_90: case Surface.ROTATION_270: case Surface.ROTATION_90, Surface.ROTATION_270: height = dispSize.height(); width = mView.getHeight(); break; case Surface.ROTATION_180: case Surface.ROTATION_0: case Surface.ROTATION_180, Surface.ROTATION_0: // TODO(b/152683657): Need to determine best UX for this if (!mShowOrientedHandleForImmersiveMode) { resetSecondaryHandle(); Loading @@ -984,7 +982,6 @@ public class NavigationBar extends ViewController<NavigationBarView> implements mView.setVisibility(View.GONE); mOrientationHandle.setVisibility(View.VISIBLE); } } private void resetSecondaryHandle() { if (mOrientationHandle != null) { Loading Loading @@ -1786,7 +1783,8 @@ public class NavigationBar extends ViewController<NavigationBarView> implements } private boolean canShowSecondaryHandle() { return mNavBarMode == NAV_BAR_MODE_GESTURAL && mOrientationHandle != null; return mNavBarMode == NAV_BAR_MODE_GESTURAL && mOrientationHandle != null && mStartingQuickSwitchRotation != -1; } private final UserTracker.Callback mUserChangedCallback = Loading Loading
packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java +39 −41 Original line number Diff line number Diff line Loading @@ -940,12 +940,12 @@ public class NavigationBar extends ViewController<NavigationBarView> implements private void orientSecondaryHomeHandle() { if (!canShowSecondaryHandle()) { if (mStartingQuickSwitchRotation == -1) { resetSecondaryHandle(); } return; } if (mStartingQuickSwitchRotation == -1) { resetSecondaryHandle(); } else { int deltaRotation = deltaRotation(mCurrentRotation, mStartingQuickSwitchRotation); if (mStartingQuickSwitchRotation == -1 || deltaRotation == -1) { // Curious if starting quickswitch can change between the if check and our delta Loading @@ -958,13 +958,11 @@ public class NavigationBar extends ViewController<NavigationBarView> implements Rect dispSize = mWindowManager.getCurrentWindowMetrics().getBounds(); mOrientationHandle.setDeltaRotation(deltaRotation); switch (deltaRotation) { case Surface.ROTATION_90: case Surface.ROTATION_270: case Surface.ROTATION_90, Surface.ROTATION_270: height = dispSize.height(); width = mView.getHeight(); break; case Surface.ROTATION_180: case Surface.ROTATION_0: case Surface.ROTATION_180, Surface.ROTATION_0: // TODO(b/152683657): Need to determine best UX for this if (!mShowOrientedHandleForImmersiveMode) { resetSecondaryHandle(); Loading @@ -984,7 +982,6 @@ public class NavigationBar extends ViewController<NavigationBarView> implements mView.setVisibility(View.GONE); mOrientationHandle.setVisibility(View.VISIBLE); } } private void resetSecondaryHandle() { if (mOrientationHandle != null) { Loading Loading @@ -1786,7 +1783,8 @@ public class NavigationBar extends ViewController<NavigationBarView> implements } private boolean canShowSecondaryHandle() { return mNavBarMode == NAV_BAR_MODE_GESTURAL && mOrientationHandle != null; return mNavBarMode == NAV_BAR_MODE_GESTURAL && mOrientationHandle != null && mStartingQuickSwitchRotation != -1; } private final UserTracker.Callback mUserChangedCallback = Loading