summaryrefslogtreecommitdiffstats
path: root/core/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/com')
-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
3 files changed, 21 insertions, 17 deletions
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);
+ }
+
}