Add argument to binder call to check key types

Before there was only one key type supported, so we didn't need to query
a key type. Now there is DSA, EC, and RSA, so there needs to be another
argument.

(cherry picked from commit 1b0e3933900c7ea21189704d5db64e7346aee7af)

Bug: 10600582
Change-Id: I52418ade881d053229dd3c1d0cf438823468b51b
diff --git a/keystore/IKeystoreService.cpp b/keystore/IKeystoreService.cpp
index 21dce27..727e746 100644
--- a/keystore/IKeystoreService.cpp
+++ b/keystore/IKeystoreService.cpp
@@ -542,10 +542,11 @@
         return ret;
     }
 
-    virtual int32_t is_hardware_backed()
+    virtual int32_t is_hardware_backed(const String16& keyType)
     {
         Parcel data, reply;
         data.writeInterfaceToken(IKeystoreService::getInterfaceDescriptor());
+        data.writeString16(keyType);
         status_t status = remote()->transact(BnKeystoreService::IS_HARDWARE_BACKED, data, &reply);
         if (status != NO_ERROR) {
             ALOGD("is_hardware_backed() could not contact remote: %d\n", status);
@@ -860,7 +861,8 @@
         } break;
         case IS_HARDWARE_BACKED: {
             CHECK_INTERFACE(IKeystoreService, data, reply);
-            int32_t ret = is_hardware_backed();
+            String16 keyType = data.readString16();
+            int32_t ret = is_hardware_backed(keyType);
             reply->writeNoException();
             reply->writeInt32(ret);
             return NO_ERROR;