PasswordSlotManager: Fix incorrect string comparison.

am: d1552e36f4

Change-Id: I1cc0db44db11c163eb173ac04b9396558f954b7c
This commit is contained in:
David Anderson
2019-07-15 20:21:04 -07:00
committed by android-build-merger

View File

@@ -122,7 +122,7 @@ public class PasswordSlotManager {
*/
public void markSlotDeleted(int slot) throws RuntimeException {
ensureSlotMapLoaded();
if (mSlotMap.containsKey(slot) && mSlotMap.get(slot) != getMode()) {
if (mSlotMap.containsKey(slot) && !mSlotMap.get(slot).equals(getMode())) {
throw new RuntimeException("password slot " + slot + " cannot be deleted");
}
mSlotMap.remove(slot);