KeyMint: CreateKeyMintDevice retruns shared_ptr.

Fix reference counting by creating AndroidKeyMintDevice using
ndk::SharedRefBase::make instead of new.

Bug: 219791936
Test: atest keystore2_km_compat_test_cpp does not crash any more.
Change-Id: I4dfc9e8703ae5f51de5e8944d74157e9818bfe40
diff --git a/ng/AndroidKeyMintDevice.cpp b/ng/AndroidKeyMintDevice.cpp
index 373ec03..9d2cc69 100644
--- a/ng/AndroidKeyMintDevice.cpp
+++ b/ng/AndroidKeyMintDevice.cpp
@@ -492,8 +492,8 @@
     return kmError2ScopedAStatus(KM_ERROR_UNIMPLEMENTED);
 }
 
-IKeyMintDevice* CreateKeyMintDevice(SecurityLevel securityLevel) {
-    return ::new AndroidKeyMintDevice(securityLevel);
+std::shared_ptr<IKeyMintDevice> CreateKeyMintDevice(SecurityLevel securityLevel) {
+    return ndk::SharedRefBase::make<AndroidKeyMintDevice>(securityLevel);
 }
 
 }  // namespace aidl::android::hardware::security::keymint