Make AES*CipherTest explicitly use Android Keystore Provider.

The tests are supposed to request Cipher instances of Android Keystore
JCA Provider but were not doing that. As a result, some of the tests
were getting Cipher implementations backed by the highest-priority
provider offering the requested transformation.

This issue was masked on most Android devices due to a bug in
AndroidKeyStoreProvider.install which installed its Cipher
implementation at the highest priority.

Bug: 25399691
Change-Id: I0cb05764a9eec65643c107d5befc03af3b1b99d7
diff --git a/tests/tests/keystore/src/android/keystore/cts/BlockCipherTestBase.java b/tests/tests/keystore/src/android/keystore/cts/BlockCipherTestBase.java
index 197adc2..66e8093 100644
--- a/tests/tests/keystore/src/android/keystore/cts/BlockCipherTestBase.java
+++ b/tests/tests/keystore/src/android/keystore/cts/BlockCipherTestBase.java
@@ -30,6 +30,7 @@
 import java.security.Key;
 import java.security.KeyStore;
 import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
 import java.security.Provider;
 import java.security.SecureRandom;
 import java.security.Security;
@@ -50,6 +51,8 @@
 
 abstract class BlockCipherTestBase extends AndroidTestCase {
 
+    private static final String EXPECTED_PROVIDER_NAME = TestUtils.EXPECTED_CRYPTO_OP_PROVIDER_NAME;
+
     private KeyStore mAndroidKeyStore;
     private int mNextKeyId;
 
@@ -121,7 +124,7 @@
 
     public void testGetProvider() throws Exception {
         createCipher();
-        Provider expectedProvider = Security.getProvider("AndroidKeyStoreBCWorkaround");
+        Provider expectedProvider = Security.getProvider(EXPECTED_PROVIDER_NAME);
         assertSame(expectedProvider, mCipher.getProvider());
     }
 
@@ -1247,8 +1250,8 @@
     }
 
     protected void createCipher() throws NoSuchAlgorithmException,
-            NoSuchPaddingException  {
-        mCipher = Cipher.getInstance(getTransformation());
+            NoSuchPaddingException, NoSuchProviderException  {
+        mCipher = Cipher.getInstance(getTransformation(), EXPECTED_PROVIDER_NAME);
     }
 
     private String getKeyAlgorithm() {