Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 574e49ee authored by Danielle Millett's avatar Danielle Millett
Browse files

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
parent 5eeee5e0
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -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);
        }
    }