Another refactor, deleting AbstractFactoryRegistry.

I should have known better than to make these singletons to begin
with.  Globals create problems.  This undoes that mistake.

Change-Id: Idf61d5f72e3c34b5c4ddb27cc94b05f506561743
diff --git a/ec_keymaster0_key.cpp b/ec_keymaster0_key.cpp
index d171d58..9ed0a74 100644
--- a/ec_keymaster0_key.cpp
+++ b/ec_keymaster0_key.cpp
@@ -18,9 +18,8 @@
 
 #include <memory>
 
-#define LOG_TAG "EcKeymaster0Key"
-#include <cutils/log.h>
-
+#include <keymaster/android_keymaster_utils.h>
+#include <keymaster/logger.h>
 #include <keymaster/soft_keymaster_context.h>
 
 #include "keymaster0_engine.h"
@@ -38,7 +37,7 @@
 keymaster_error_t EcdsaKeymaster0KeyFactory::GenerateKey(const AuthorizationSet& key_description,
                                                          KeymasterKeyBlob* key_blob,
                                                          AuthorizationSet* hw_enforced,
-                                                         AuthorizationSet* sw_enforced) {
+                                                         AuthorizationSet* sw_enforced) const {
     if (!key_blob || !hw_enforced || !sw_enforced)
         return KM_ERROR_OUTPUT_PARAMETER_NULL;
 
@@ -67,7 +66,7 @@
 keymaster_error_t EcdsaKeymaster0KeyFactory::ImportKey(
     const AuthorizationSet& key_description, keymaster_key_format_t input_key_material_format,
     const KeymasterKeyBlob& input_key_material, KeymasterKeyBlob* output_key_blob,
-    AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) {
+    AuthorizationSet* hw_enforced, AuthorizationSet* sw_enforced) const {
     if (!output_key_blob || !hw_enforced || !sw_enforced)
         return KM_ERROR_OUTPUT_PARAMETER_NULL;
 
@@ -98,7 +97,7 @@
 keymaster_error_t EcdsaKeymaster0KeyFactory::LoadKey(const KeymasterKeyBlob& key_material,
                                                      const AuthorizationSet& hw_enforced,
                                                      const AuthorizationSet& sw_enforced,
-                                                     UniquePtr<Key>* key) {
+                                                     UniquePtr<Key>* key) const {
     if (!key)
         return KM_ERROR_OUTPUT_PARAMETER_NULL;