From 59b12b9a3029cb42bed1fbf6d53308d9c4c5a33f Mon Sep 17 00:00:00 2001 From: Robert Berry Date: Thu, 1 Mar 2018 13:21:07 +0000 Subject: [PATCH] Remove calls to setAccount and getAccount in test This param is now deprecated. Test: runtest frameworks-services -p \ com.android.server.locksettings.recoverablekeystore Change-Id: I318edba915cb15280b884181ae868b4b07a35098 --- .../storage/PersistentKeyChainSnapshotTest.java | 7 ------- 1 file changed, 7 deletions(-) diff --git a/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/storage/PersistentKeyChainSnapshotTest.java b/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/storage/PersistentKeyChainSnapshotTest.java index 17a4d3481f76..180345c808e9 100644 --- a/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/storage/PersistentKeyChainSnapshotTest.java +++ b/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/storage/PersistentKeyChainSnapshotTest.java @@ -27,7 +27,6 @@ import android.security.keystore.recovery.KeyChainProtectionParams; import android.support.test.filters.SmallTest; import android.support.test.runner.AndroidJUnit4; -import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; @@ -45,7 +44,6 @@ public class PersistentKeyChainSnapshotTest { .getBytes(StandardCharsets.UTF_8); private static final byte[] KEY_MATERIAL = "app_key_data".getBytes(StandardCharsets.UTF_8); private static final byte[] PUBLIC_KEY = "public_key_data".getBytes(StandardCharsets.UTF_8); - private static final byte[] ACCOUNT = "test_account".getBytes(StandardCharsets.UTF_8); private static final byte[] SALT = "salt".getBytes(StandardCharsets.UTF_8); private static final int SNAPSHOT_VERSION = 2; private static final int MAX_ATTEMPTS = 10; @@ -130,7 +128,6 @@ public class PersistentKeyChainSnapshotTest { WrappedApplicationKey entry = new WrappedApplicationKey.Builder() .setAlias(ALIAS) .setEncryptedKeyMaterial(KEY_MATERIAL) - .setAccount(ACCOUNT) .build(); writer.writeKeyEntry(entry); @@ -142,7 +139,6 @@ public class PersistentKeyChainSnapshotTest { WrappedApplicationKey copy = reader.readKeyEntry(); assertThat(copy.getAlias()).isEqualTo(ALIAS); assertThat(copy.getEncryptedKeyMaterial()).isEqualTo(KEY_MATERIAL); - assertThat(copy.getAccount()).isEqualTo(ACCOUNT); assertThrows( IOException.class, @@ -194,7 +190,6 @@ public class PersistentKeyChainSnapshotTest { appKeysList.add(new WrappedApplicationKey.Builder() .setAlias(ALIAS) .setEncryptedKeyMaterial(KEY_MATERIAL) - .setAccount(ACCOUNT) .build()); KeyChainSnapshot snapshot = new KeyChainSnapshot.Builder() @@ -256,12 +251,10 @@ public class PersistentKeyChainSnapshotTest { appKeysList.add(new WrappedApplicationKey.Builder() .setAlias(ALIAS) .setEncryptedKeyMaterial(KEY_MATERIAL) - .setAccount(ACCOUNT) .build()); appKeysList.add(new WrappedApplicationKey.Builder() .setAlias(ALIAS2) .setEncryptedKeyMaterial(KEY_MATERIAL) - .setAccount(ACCOUNT) .build()); -- 2.11.0