Skip to content

Commit b39c8bc

Browse files
committed
Clear failed password log after successful entry.
Change-Id: I0bf7c2c8b500e1b9459084a21a445d7ae2bd90a5
1 parent 440e780 commit b39c8bc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

app/src/main/java/com/afwsamples/testdpc/DeviceAdminReceiver.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,11 @@ public void onPasswordFailed(Context context, Intent intent) {
416416
nm.notify(PASSWORD_FAILED_NOTIFICATION_ID, warn.getNotification());
417417
}
418418

419+
@Override
420+
public void onPasswordSucceeded(Context context, Intent intent) {
421+
logFile(context).delete();
422+
}
423+
419424
private static File logFile(Context context) {
420425
File parent = context.getDir(LOGS_DIR, Context.MODE_PRIVATE);
421426
return new File(parent, FAILED_PASSWORD_LOG_FILE);

0 commit comments

Comments
 (0)