Loading packages/SystemUI/src/com/android/systemui/stackdivider/Divider.java +3 −0 Original line number Original line Diff line number Diff line Loading @@ -91,6 +91,9 @@ public class Divider extends SystemUI { } } private void removeDivider() { private void removeDivider() { if (mView != null) { mView.onDividerRemoved(); } mWindowManager.remove(); mWindowManager.remove(); } } Loading packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java +12 −0 Original line number Original line Diff line number Diff line Loading @@ -162,6 +162,9 @@ public class DividerView extends FrameLayout implements OnTouchListener, private DividerState mState; private DividerState mState; private final SurfaceFlingerVsyncChoreographer mSfChoreographer; private final SurfaceFlingerVsyncChoreographer mSfChoreographer; // The view is removed or in the process of been removed from the system. private boolean mRemoved; private final Handler mHandler = new Handler() { private final Handler mHandler = new Handler() { @Override @Override public void handleMessage(Message msg) { public void handleMessage(Message msg) { Loading Loading @@ -323,6 +326,11 @@ public class DividerView extends FrameLayout implements OnTouchListener, EventBus.getDefault().unregister(this); EventBus.getDefault().unregister(this); } } void onDividerRemoved() { mRemoved = true; mHandler.removeMessages(MSG_RESIZE_STACK); } @Override @Override public WindowInsets onApplyWindowInsets(WindowInsets insets) { public WindowInsets onApplyWindowInsets(WindowInsets insets) { if (mStableInsets.left != insets.getStableInsetLeft() if (mStableInsets.left != insets.getStableInsetLeft() Loading Loading @@ -927,6 +935,10 @@ public class DividerView extends FrameLayout implements OnTouchListener, } } public void resizeStack(int position, int taskPosition, SnapTarget taskSnapTarget) { public void resizeStack(int position, int taskPosition, SnapTarget taskSnapTarget) { if (mRemoved) { // This divider view has been removed so shouldn't have any additional influence. return; } calculateBoundsForPosition(position, mDockSide, mDockedRect); calculateBoundsForPosition(position, mDockSide, mDockedRect); if (mDockedRect.equals(mLastResizeRect) && !mEntranceAnimationRunning) { if (mDockedRect.equals(mLastResizeRect) && !mEntranceAnimationRunning) { Loading Loading
packages/SystemUI/src/com/android/systemui/stackdivider/Divider.java +3 −0 Original line number Original line Diff line number Diff line Loading @@ -91,6 +91,9 @@ public class Divider extends SystemUI { } } private void removeDivider() { private void removeDivider() { if (mView != null) { mView.onDividerRemoved(); } mWindowManager.remove(); mWindowManager.remove(); } } Loading
packages/SystemUI/src/com/android/systemui/stackdivider/DividerView.java +12 −0 Original line number Original line Diff line number Diff line Loading @@ -162,6 +162,9 @@ public class DividerView extends FrameLayout implements OnTouchListener, private DividerState mState; private DividerState mState; private final SurfaceFlingerVsyncChoreographer mSfChoreographer; private final SurfaceFlingerVsyncChoreographer mSfChoreographer; // The view is removed or in the process of been removed from the system. private boolean mRemoved; private final Handler mHandler = new Handler() { private final Handler mHandler = new Handler() { @Override @Override public void handleMessage(Message msg) { public void handleMessage(Message msg) { Loading Loading @@ -323,6 +326,11 @@ public class DividerView extends FrameLayout implements OnTouchListener, EventBus.getDefault().unregister(this); EventBus.getDefault().unregister(this); } } void onDividerRemoved() { mRemoved = true; mHandler.removeMessages(MSG_RESIZE_STACK); } @Override @Override public WindowInsets onApplyWindowInsets(WindowInsets insets) { public WindowInsets onApplyWindowInsets(WindowInsets insets) { if (mStableInsets.left != insets.getStableInsetLeft() if (mStableInsets.left != insets.getStableInsetLeft() Loading Loading @@ -927,6 +935,10 @@ public class DividerView extends FrameLayout implements OnTouchListener, } } public void resizeStack(int position, int taskPosition, SnapTarget taskSnapTarget) { public void resizeStack(int position, int taskPosition, SnapTarget taskSnapTarget) { if (mRemoved) { // This divider view has been removed so shouldn't have any additional influence. return; } calculateBoundsForPosition(position, mDockSide, mDockedRect); calculateBoundsForPosition(position, mDockSide, mDockedRect); if (mDockedRect.equals(mLastResizeRect) && !mEntranceAnimationRunning) { if (mDockedRect.equals(mLastResizeRect) && !mEntranceAnimationRunning) { Loading