Merge "Block and wait for /dev/block/loop<N> to appear in case it was created asynchronously." am: ee5eb39169 am: 5973b8cf00 am: 4d0dadb629
am: b8150885e3

Change-Id: I9d5b0b46d11ba4b75073812b9ff71b061a694d34
diff --git a/Android.bp b/Android.bp
index f565732..a4cbd88 100644
--- a/Android.bp
+++ b/Android.bp
@@ -230,6 +230,7 @@
         "libhidlbase",
         "libhwbinder",
         "libkeymaster4support",
+        "libutils",
     ],
 }
 
diff --git a/Keymaster.h b/Keymaster.h
index 42a2b5d..9a0616d 100644
--- a/Keymaster.h
+++ b/Keymaster.h
@@ -115,7 +115,7 @@
     bool isSecure();
 
   private:
-    std::unique_ptr<KmDevice> mDevice;
+    sp<KmDevice> mDevice;
     DISALLOW_COPY_AND_ASSIGN(Keymaster);
     static bool hmacKeyGenerated;
 };