Rename keystore.{h|cpp} to KeyStore.{h|cpp}

We currently have two different keystore.h files.  This renames one of
them, and the corresponding implementation, to KeyStore.h, which
tracks the class name.

Test: runtest --path cts/tests/tests/keystore/src/android/keystore/cts
Change-Id: I910e3d60d165b65d055e7da92acd04d3ee73a6d3
diff --git a/keystore/Android.bp b/keystore/Android.bp
index b58671c..ef8bc72 100644
--- a/keystore/Android.bp
+++ b/keystore/Android.bp
@@ -21,6 +21,7 @@
 
     srcs: [
         ":IKeyAttestationApplicationIdProvider.aidl",
+        "KeyStore.cpp",
         "auth_token_table.cpp",
         "blob.cpp",
         "entropy.cpp",
@@ -28,7 +29,6 @@
         "key_store_service.cpp",
         "keyblob_utils.cpp",
         "keymaster_enforcement.cpp",
-        "keystore.cpp",
         "keystore_attestation_id.cpp",
         "keystore_main.cpp",
         "keystore_utils.cpp",
diff --git a/keystore/keystore.cpp b/keystore/KeyStore.cpp
similarity index 99%
rename from keystore/keystore.cpp
rename to keystore/KeyStore.cpp
index 331151e..6952b54 100644
--- a/keystore/keystore.cpp
+++ b/keystore/KeyStore.cpp
@@ -16,7 +16,7 @@
 
 #define LOG_TAG "keystore"
 
-#include "keystore.h"
+#include "KeyStore.h"
 
 #include <dirent.h>
 #include <fcntl.h>
diff --git a/keystore/keystore.h b/keystore/KeyStore.h
similarity index 98%
rename from keystore/keystore.h
rename to keystore/KeyStore.h
index a5ffd2f..4ffeaf2 100644
--- a/keystore/keystore.h
+++ b/keystore/KeyStore.h
@@ -17,8 +17,6 @@
 #ifndef KEYSTORE_KEYSTORE_H_
 #define KEYSTORE_KEYSTORE_H_
 
-#include "user_state.h"
-
 #include <android/hardware/keymaster/3.0/IKeymasterDevice.h>
 
 #include <utils/Vector.h>
@@ -26,6 +24,7 @@
 #include "blob.h"
 #include "grant_store.h"
 #include "include/keystore/keymaster_tags.h"
+#include "user_state.h"
 
 using ::keystore::NullOr;
 
@@ -135,9 +134,7 @@
 
     ::keystore::GrantStore mGrants;
 
-    typedef struct {
-        uint32_t version;
-    } keystore_metadata_t;
+    typedef struct { uint32_t version; } keystore_metadata_t;
 
     keystore_metadata_t mMetaData;
 
diff --git a/keystore/key_store_service.h b/keystore/key_store_service.h
index 81a0df1..0a1b8f1 100644
--- a/keystore/key_store_service.h
+++ b/keystore/key_store_service.h
@@ -21,7 +21,7 @@
 
 #include "auth_token_table.h"
 
-#include "keystore.h"
+#include "KeyStore.h"
 #include "keystore_keymaster_enforcement.h"
 #include "operation.h"
 #include "permissions.h"
diff --git a/keystore/keystore_main.cpp b/keystore/keystore_main.cpp
index e42d5a4..e048f88 100644
--- a/keystore/keystore_main.cpp
+++ b/keystore/keystore_main.cpp
@@ -26,14 +26,14 @@
 
 #include <cutils/log.h>
 
+#include "KeyStore.h"
 #include "entropy.h"
-#include "key_store_service.h"
-#include "keystore.h"
-#include "permissions.h"
-#include <android/security/IKeystoreService.h>
-#include "legacy_keymaster_device_wrapper.h"
 #include "include/keystore/keystore_hidl_support.h"
 #include "include/keystore/keystore_return_types.h"
+#include "key_store_service.h"
+#include "legacy_keymaster_device_wrapper.h"
+#include "permissions.h"
+#include <android/security/IKeystoreService.h>
 
 /* KeyStore is a secured storage for key-value pairs. In this implementation,
  * each file stores one key-value pair. Keys are encoded in file names, and
@@ -41,9 +41,9 @@
  * user-defined password. To keep things simple, buffers are always larger than
  * the maximum space we needed, so boundary checks on buffers are omitted. */
 
+using ::android::hardware::configureRpcThreadpool;
 using ::android::system::wifi::keystore::V1_0::IKeystore;
 using ::android::system::wifi::keystore::V1_0::implementation::Keystore;
-using ::android::hardware::configureRpcThreadpool;
 
 /**
  * TODO implement keystore daemon using binderized keymaster HAL.
@@ -81,14 +81,14 @@
     bool allowNewFallbackDevice = false;
 
     keystore::KeyStoreServiceReturnCode rc;
-    rc = KS_HANDLE_HIDL_ERROR(dev->getHardwareFeatures(
-            [&] (bool, bool, bool, bool supportsAttestation, bool, const hidl_string&,
-                 const hidl_string&) {
-                // Attestation support indicates the hardware is keymaster 2.0 or higher.
-                // For these devices we will not allow the fallback device for import or generation
-                // of keys. The fallback device is only used for legacy keys present on the device.
-                allowNewFallbackDevice = !supportsAttestation;
-            }));
+    rc = KS_HANDLE_HIDL_ERROR(
+        dev->getHardwareFeatures([&](bool, bool, bool, bool supportsAttestation, bool,
+                                     const hidl_string&, const hidl_string&) {
+            // Attestation support indicates the hardware is keymaster 2.0 or higher.
+            // For these devices we will not allow the fallback device for import or generation
+            // of keys. The fallback device is only used for legacy keys present on the device.
+            allowNewFallbackDevice = !supportsAttestation;
+        }));
 
     if (!rc.isOk()) {
         return -1;