diff options
| author | 2012-03-27 16:17:10 -0400 | |
|---|---|---|
| committer | 2012-03-30 14:59:37 -0400 | |
| commit | 574e49ee16c1ab9a83bb6506870a7be540fa1434 (patch) | |
| tree | bc1a1e16595aa12cd8b809a63c43b5f98e4bd6fc | |
| parent | 5eeee5e0bbf5aba0097a510b3e9dbb286b2b30cd (diff) | |
Fix 6238404: Changed deleteGallery and deleteTempGallery to use broadcasts
Previously since these were starting an activity, if it was called from
outside an activity (for example when calling resetPassword() in
DevicePolicyManager) it throws a run time exception. Since these don't
need UI, they have been changed to be broadcasts.
Change-Id: Id87e3dc868a01f0eed901e8e8007f91f74cd51fe
| -rw-r--r-- | core/java/com/android/internal/widget/LockPatternUtils.java | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/core/java/com/android/internal/widget/LockPatternUtils.java b/core/java/com/android/internal/widget/LockPatternUtils.java index 5a7d5195d0d9..93f90f6fa175 100644 --- a/core/java/com/android/internal/widget/LockPatternUtils.java +++ b/core/java/com/android/internal/widget/LockPatternUtils.java @@ -438,10 +438,9 @@ public class LockPatternUtils { * Calls back SetupFaceLock to delete the temporary gallery file */ public void deleteTempGallery() { - Intent intent = new Intent().setClassName("com.android.facelock", - "com.android.facelock.SetupFaceLock"); + Intent intent = new Intent().setAction("com.android.facelock.DELETE_GALLERY"); intent.putExtra("deleteTempGallery", true); - mContext.startActivity(intent); + mContext.sendBroadcast(intent); } /** @@ -449,10 +448,9 @@ public class LockPatternUtils { */ void deleteGallery() { if(usingBiometricWeak()) { - Intent intent = new Intent().setClassName("com.android.facelock", - "com.android.facelock.SetupFaceLock"); + Intent intent = new Intent().setAction("com.android.facelock.DELETE_GALLERY"); intent.putExtra("deleteGallery", true); - mContext.startActivity(intent); + mContext.sendBroadcast(intent); } } |