Skip to content

Commit 70aa528

Browse files
author
Winson Chung
committed
Fixing some regressions in tablet reordering/deleting.
Change-Id: Ib3e48fa2606c0259603f6daf3b2ef72e1c8e292d
1 parent 8f22514 commit 70aa528

File tree

3 files changed

+18
-7
lines changed

3 files changed

+18
-7
lines changed

policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewStateManager.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,13 @@ public boolean isChallengeShowing() {
5858
return false;
5959
}
6060

61+
public boolean isChallengeOverlapping() {
62+
if (mChallengeLayout != null) {
63+
return mChallengeLayout.isChallengeOverlapping();
64+
}
65+
return false;
66+
}
67+
6168
public void setSecurityViewContainer(KeyguardSecurityView container) {
6269
mKeyguardSecurityContainer = container;
6370
}

policy/src/com/android/internal/policy/impl/keyguard/KeyguardWidgetPager.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,9 @@ public float getChildrenOutlineAlpha() {
589589
@Override
590590
public boolean onLongClick(View v) {
591591
// Disallow long pressing to reorder if the challenge is showing
592-
if (!mViewStateManager.isChallengeShowing() && startReordering()) {
592+
boolean isChallengeOverlapping = mViewStateManager.isChallengeShowing() &&
593+
mViewStateManager.isChallengeOverlapping();
594+
if (!isChallengeOverlapping && startReordering()) {
593595
return true;
594596
}
595597
return false;

policy/src/com/android/internal/policy/impl/keyguard/PagedView.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2072,15 +2072,15 @@ void endReordering() {
20722072

20732073
// If we haven't flung-to-delete the current child, then we just animate the drag view
20742074
// back into position
2075+
final Runnable onCompleteRunnable = new Runnable() {
2076+
@Override
2077+
public void run() {
2078+
onEndReordering();
2079+
}
2080+
};
20752081
if (!mIsFlingingToDelete) {
20762082
mPostReorderingPreZoomInRunnable = new Runnable() {
20772083
public void run() {
2078-
Runnable onCompleteRunnable = new Runnable() {
2079-
@Override
2080-
public void run() {
2081-
onEndReordering();
2082-
}
2083-
};
20842084
zoomIn(onCompleteRunnable);
20852085
};
20862086
};
@@ -2091,6 +2091,8 @@ public void run() {
20912091
snapToPage(indexOfChild(mDragView), 0);
20922092
// Animate the drag view back to the front position
20932093
animateDragViewToOriginalPosition();
2094+
} else {
2095+
zoomIn(onCompleteRunnable);
20942096
}
20952097
}
20962098

0 commit comments

Comments
 (0)