Kill ConfirmDeviceCredentialBaseActivity when it is no longer visible

The problem is because ConfirmDeviceCredentialActivity is not created
again when the new intent is fired. Add no history flag to kill it once
it is not visible. We have the exclude from recent flag anyway, so
finishing it should be fine.

Bug: 27564634
Change-Id: I2e22f3d7a108f8fbad5f27894b1a92f19d25bcda
diff --git a/src/com/android/settings/ChooseLockSettingsHelper.java b/src/com/android/settings/ChooseLockSettingsHelper.java
index dda8da2..b23b41a 100644
--- a/src/com/android/settings/ChooseLockSettingsHelper.java
+++ b/src/com/android/settings/ChooseLockSettingsHelper.java
@@ -246,6 +246,7 @@
         // TODO: Remove once that bug is fixed.
         if (intentSender != null || taskId != -1) {
             outIntent.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
+            outIntent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
         }
     }
 }