Loading packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java +9 −0 Original line number Original line Diff line number Diff line Loading @@ -43,6 +43,7 @@ public abstract class ExpandableView extends FrameLayout { private boolean mWillBeGone; private boolean mWillBeGone; private int mMinClipTopAmount = 0; private int mMinClipTopAmount = 0; private boolean mClipToActualHeight = true; private boolean mClipToActualHeight = true; private boolean mChangingPosition = false; public ExpandableView(Context context, AttributeSet attrs) { public ExpandableView(Context context, AttributeSet attrs) { super(context, attrs); super(context, attrs); Loading Loading @@ -407,6 +408,14 @@ public abstract class ExpandableView extends FrameLayout { return 0; return 0; } } public void setChangingPosition(boolean changingPosition) { mChangingPosition = changingPosition; } public boolean isChangingPosition() { return mChangingPosition; } /** /** * A listener notifying when {@link #getActualHeight} changes. * A listener notifying when {@link #getActualHeight} changes. */ */ Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java +16 −0 Original line number Original line Diff line number Diff line Loading @@ -154,9 +154,22 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene setVisibility(INVISIBLE); setVisibility(INVISIBLE); } } @Override protected void onAttachedToWindow() { super.onAttachedToWindow(); if (mEntry.row.isChangingPosition()) { if (getVisibility() == VISIBLE && mEditText.isFocusable()) { mEditText.requestFocus(); } } } @Override @Override protected void onDetachedFromWindow() { protected void onDetachedFromWindow() { super.onDetachedFromWindow(); super.onDetachedFromWindow(); if (mEntry.row.isChangingPosition()) { return; } mController.removeRemoteInput(mEntry); mController.removeRemoteInput(mEntry); } } Loading Loading @@ -229,6 +242,9 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene } } private void defocusIfNeeded() { private void defocusIfNeeded() { if (mDefocusListener.mEntry.row.isChangingPosition()) { return; } if (isFocusable() && isEnabled()) { if (isFocusable() && isEnabled()) { setInnerFocusable(false); setInnerFocusable(false); if (mDefocusListener != null) { if (mDefocusListener != null) { Loading packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +2 −0 Original line number Original line Diff line number Diff line Loading @@ -2252,8 +2252,10 @@ public class NotificationStackScrollLayout extends ViewGroup int currentIndex = indexOfChild(child); int currentIndex = indexOfChild(child); if (child != null && child.getParent() == this && currentIndex != newIndex) { if (child != null && child.getParent() == this && currentIndex != newIndex) { mChangePositionInProgress = true; mChangePositionInProgress = true; ((ExpandableView)child).setChangingPosition(true); removeView(child); removeView(child); addView(child, newIndex); addView(child, newIndex); ((ExpandableView)child).setChangingPosition(false); mChangePositionInProgress = false; mChangePositionInProgress = false; if (mIsExpanded && mAnimationsEnabled && child.getVisibility() != View.GONE) { if (mIsExpanded && mAnimationsEnabled && child.getVisibility() != View.GONE) { mChildrenChangingPositions.add(child); mChildrenChangingPositions.add(child); Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/ExpandableView.java +9 −0 Original line number Original line Diff line number Diff line Loading @@ -43,6 +43,7 @@ public abstract class ExpandableView extends FrameLayout { private boolean mWillBeGone; private boolean mWillBeGone; private int mMinClipTopAmount = 0; private int mMinClipTopAmount = 0; private boolean mClipToActualHeight = true; private boolean mClipToActualHeight = true; private boolean mChangingPosition = false; public ExpandableView(Context context, AttributeSet attrs) { public ExpandableView(Context context, AttributeSet attrs) { super(context, attrs); super(context, attrs); Loading Loading @@ -407,6 +408,14 @@ public abstract class ExpandableView extends FrameLayout { return 0; return 0; } } public void setChangingPosition(boolean changingPosition) { mChangingPosition = changingPosition; } public boolean isChangingPosition() { return mChangingPosition; } /** /** * A listener notifying when {@link #getActualHeight} changes. * A listener notifying when {@link #getActualHeight} changes. */ */ Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java +16 −0 Original line number Original line Diff line number Diff line Loading @@ -154,9 +154,22 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene setVisibility(INVISIBLE); setVisibility(INVISIBLE); } } @Override protected void onAttachedToWindow() { super.onAttachedToWindow(); if (mEntry.row.isChangingPosition()) { if (getVisibility() == VISIBLE && mEditText.isFocusable()) { mEditText.requestFocus(); } } } @Override @Override protected void onDetachedFromWindow() { protected void onDetachedFromWindow() { super.onDetachedFromWindow(); super.onDetachedFromWindow(); if (mEntry.row.isChangingPosition()) { return; } mController.removeRemoteInput(mEntry); mController.removeRemoteInput(mEntry); } } Loading Loading @@ -229,6 +242,9 @@ public class RemoteInputView extends LinearLayout implements View.OnClickListene } } private void defocusIfNeeded() { private void defocusIfNeeded() { if (mDefocusListener.mEntry.row.isChangingPosition()) { return; } if (isFocusable() && isEnabled()) { if (isFocusable() && isEnabled()) { setInnerFocusable(false); setInnerFocusable(false); if (mDefocusListener != null) { if (mDefocusListener != null) { Loading
packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +2 −0 Original line number Original line Diff line number Diff line Loading @@ -2252,8 +2252,10 @@ public class NotificationStackScrollLayout extends ViewGroup int currentIndex = indexOfChild(child); int currentIndex = indexOfChild(child); if (child != null && child.getParent() == this && currentIndex != newIndex) { if (child != null && child.getParent() == this && currentIndex != newIndex) { mChangePositionInProgress = true; mChangePositionInProgress = true; ((ExpandableView)child).setChangingPosition(true); removeView(child); removeView(child); addView(child, newIndex); addView(child, newIndex); ((ExpandableView)child).setChangingPosition(false); mChangePositionInProgress = false; mChangePositionInProgress = false; if (mIsExpanded && mAnimationsEnabled && child.getVisibility() != View.GONE) { if (mIsExpanded && mAnimationsEnabled && child.getVisibility() != View.GONE) { mChildrenChangingPositions.add(child); mChildrenChangingPositions.add(child); Loading