Fix testAuthNeeded test

begin now returns OP_AUTH_REQUIRED for per operations with per op
authorization instead of NO_ERROR.

(cherry-picked from commit b0addbaaf2)

Change-Id: I1f472125f46155833e03ab30bf18363ff51b2c58
This commit is contained in:
Chad Brubaker
2015-05-07 11:31:32 -07:00
parent 6a5f85080e
commit 7a882b5d8d

View File

@@ -953,7 +953,8 @@ public class KeyStoreTest extends ActivityUnitTestCase<Activity> {
assertEquals("Generate should succeed", KeyStore.NO_ERROR, rc);
OperationResult result = mKeyStore.begin(name, KeymasterDefs.KM_PURPOSE_ENCRYPT,
true, args, null, out);
assertEquals("Begin should succeed", KeyStore.NO_ERROR, result.resultCode);
assertEquals("Begin should expect authorization", KeyStore.OP_AUTH_NEEDED,
result.resultCode);
IBinder token = result.token;
result = mKeyStore.update(token, null, new byte[] {0x01, 0x02, 0x03, 0x04});
assertEquals("Update should require authorization",