summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/animation/LayoutTransition.java9
-rw-r--r--core/java/android/widget/PopupWindow.java3
-rw-r--r--core/java/com/android/internal/view/menu/ActionMenuPresenter.java6
-rw-r--r--core/java/com/android/internal/widget/ActionBarContextView.java3
-rw-r--r--core/java/com/android/internal/widget/LockPatternUtils.java29
5 files changed, 32 insertions, 18 deletions
diff --git a/core/java/android/animation/LayoutTransition.java b/core/java/android/animation/LayoutTransition.java
index f383af9..7f0ea99 100644
--- a/core/java/android/animation/LayoutTransition.java
+++ b/core/java/android/animation/LayoutTransition.java
@@ -657,6 +657,15 @@ public class LayoutTransition {
*/
private void setupChangeAnimation(final ViewGroup parent, final int changeReason,
Animator baseAnimator, final long duration, final View child) {
+
+ // If we already have a listener for this child, then we've already set up the
+ // changing animation we need. Multiple calls for a child may occur when several
+ // add/remove operations are run at once on a container; each one will trigger
+ // changes for the existing children in the container.
+ if (layoutChangeListenerMap.get(child) != null) {
+ return;
+ }
+
// Make a copy of the appropriate animation
final Animator anim = baseAnimator.clone();
diff --git a/core/java/android/widget/PopupWindow.java b/core/java/android/widget/PopupWindow.java
index 8ba7bee..5fa4ad0 100644
--- a/core/java/android/widget/PopupWindow.java
+++ b/core/java/android/widget/PopupWindow.java
@@ -1248,6 +1248,8 @@ public class PopupWindow {
*/
public void dismiss() {
if (isShowing() && mPopupView != null) {
+ mIsShowing = false;
+
unregisterForScrollChanged();
try {
@@ -1257,7 +1259,6 @@ public class PopupWindow {
((ViewGroup) mPopupView).removeView(mContentView);
}
mPopupView = null;
- mIsShowing = false;
if (mOnDismissListener != null) {
mOnDismissListener.onDismiss();
diff --git a/core/java/com/android/internal/view/menu/ActionMenuPresenter.java b/core/java/com/android/internal/view/menu/ActionMenuPresenter.java
index f25d65f..530809b 100644
--- a/core/java/com/android/internal/view/menu/ActionMenuPresenter.java
+++ b/core/java/com/android/internal/view/menu/ActionMenuPresenter.java
@@ -300,6 +300,7 @@ public class ActionMenuPresenter extends BaseMenuPresenter
public boolean hideOverflowMenu() {
if (mPostedOpenRunnable != null && mMenuView != null) {
((View) mMenuView).removeCallbacks(mPostedOpenRunnable);
+ mPostedOpenRunnable = null;
return true;
}
@@ -653,10 +654,11 @@ public class ActionMenuPresenter extends BaseMenuPresenter
public void run() {
mMenu.changeMenuMode();
- if (mPopup.tryShow()) {
+ final View menuView = (View) mMenuView;
+ if (menuView != null && menuView.getWindowToken() != null && mPopup.tryShow()) {
mOverflowPopup = mPopup;
- mPostedOpenRunnable = null;
}
+ mPostedOpenRunnable = null;
}
}
}
diff --git a/core/java/com/android/internal/widget/ActionBarContextView.java b/core/java/com/android/internal/widget/ActionBarContextView.java
index 18d45f7..ed02636 100644
--- a/core/java/com/android/internal/widget/ActionBarContextView.java
+++ b/core/java/com/android/internal/widget/ActionBarContextView.java
@@ -216,6 +216,9 @@ public class ActionBarContextView extends AbsActionBarView implements AnimatorLi
});
final MenuBuilder menu = (MenuBuilder) mode.getMenu();
+ if (mActionMenuPresenter != null) {
+ mActionMenuPresenter.dismissPopupMenus();
+ }
mActionMenuPresenter = new ActionMenuPresenter(mContext);
mActionMenuPresenter.setReserveOverflow(true);
diff --git a/core/java/com/android/internal/widget/LockPatternUtils.java b/core/java/com/android/internal/widget/LockPatternUtils.java
index d5450e4..17b8acf 100644
--- a/core/java/com/android/internal/widget/LockPatternUtils.java
+++ b/core/java/com/android/internal/widget/LockPatternUtils.java
@@ -439,17 +439,6 @@ public class LockPatternUtils {
}
/**
- * Calls back SetupFaceLock to save the temporary gallery file if this is the backup lock.
- * This doesn't have to verify that biometric is enabled because it's only called in that case
- */
- void moveTempGallery() {
- Intent intent = new Intent().setClassName("com.android.facelock",
- "com.android.facelock.SetupFaceLock");
- intent.putExtra("moveTempGallery", true);
- mContext.startActivity(intent);
- }
-
- /**
* Calls back SetupFaceLock to delete the temporary gallery file
*/
public void deleteTempGallery() {
@@ -501,8 +490,7 @@ public class LockPatternUtils {
setLong(PASSWORD_TYPE_KEY, DevicePolicyManager.PASSWORD_QUALITY_BIOMETRIC_WEAK);
setLong(PASSWORD_TYPE_ALTERNATE_KEY,
DevicePolicyManager.PASSWORD_QUALITY_SOMETHING);
- setBoolean(BIOMETRIC_WEAK_EVER_CHOSEN_KEY, true);
- moveTempGallery();
+ finishBiometricWeak();
}
dpm.setActivePasswordState(DevicePolicyManager.PASSWORD_QUALITY_SOMETHING, pattern
.size(), 0, 0, 0, 0, 0, 0);
@@ -619,8 +607,7 @@ public class LockPatternUtils {
} else {
setLong(PASSWORD_TYPE_KEY, DevicePolicyManager.PASSWORD_QUALITY_BIOMETRIC_WEAK);
setLong(PASSWORD_TYPE_ALTERNATE_KEY, Math.max(quality, computedQuality));
- setBoolean(BIOMETRIC_WEAK_EVER_CHOSEN_KEY, true);
- moveTempGallery();
+ finishBiometricWeak();
}
if (computedQuality != DevicePolicyManager.PASSWORD_QUALITY_UNSPECIFIED) {
int letters = 0;
@@ -1087,4 +1074,16 @@ public class LockPatternUtils {
}
return false;
}
+
+ private void finishBiometricWeak() {
+ setBoolean(BIOMETRIC_WEAK_EVER_CHOSEN_KEY, true);
+
+ // Launch intent to show final screen, this also
+ // moves the temporary gallery to the actual gallery
+ Intent intent = new Intent();
+ intent.setClassName("com.android.facelock",
+ "com.android.facelock.SetupEndScreen");
+ mContext.startActivity(intent);
+ }
+
}