Remove wait_for_keymaster and all references

No longer needed now init listens for property changes on a
separate thread.

Bug: 186580823
Test: Cuttlefish boots successfully
Change-Id: I7dd1f85a73df6c2160ef8778703709e90309b9b4
diff --git a/Android.bp b/Android.bp
index 4f39eb1..5d67916 100644
--- a/Android.bp
+++ b/Android.bp
@@ -188,13 +188,11 @@
     static_libs: ["libvold"],
     init_rc: [
         "vold.rc",
-        "wait_for_keymaster.rc",
     ],
 
     required: [
         "mke2fs",
         "vold_prepare_subdirs",
-        "wait_for_keymaster",
     ],
 
     shared_libs: [
@@ -236,29 +234,6 @@
 }
 
 cc_binary {
-    name: "wait_for_keymaster",
-    defaults: ["vold_default_flags"],
-
-    srcs: [
-        "wait_for_keymaster.cpp",
-        "Keystore.cpp",
-    ],
-    shared_libs: [
-        "libbase",
-        "libbinder",
-        "libbinder_ndk",
-
-        "android.system.keystore2-V1-ndk_platform",
-        "android.security.maintenance-ndk_platform",
-        "libhardware",
-        "libhardware_legacy",
-        "libhidlbase",
-        "libkeymint_support",
-        "libutils",
-    ],
-}
-
-cc_binary {
     name: "secdiscard",
     defaults: ["vold_default_flags"],
 
diff --git a/wait_for_keymaster.cpp b/wait_for_keymaster.cpp
deleted file mode 100644
index c6bee5f..0000000
--- a/wait_for_keymaster.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <android-base/logging.h>
-
-#include "Keystore.h"
-
-int main(int argc, char** argv) {
-    setenv("ANDROID_LOG_TAGS", "*:v", 1);
-    if (getppid() == 1) {
-        // If init is calling us then it's during boot and we should log to kmsg
-        android::base::InitLogging(argv, &android::base::KernelLogger);
-    } else {
-        android::base::InitLogging(argv, &android::base::StderrLogger);
-    }
-    LOG(INFO) << "Waiting for Keystore to be ready";
-    android::vold::Keystore keystore;
-    LOG(INFO) << "Keystore ready";
-    return 0;
-}
diff --git a/wait_for_keymaster.rc b/wait_for_keymaster.rc
deleted file mode 100644
index 9e83a93..0000000
--- a/wait_for_keymaster.rc
+++ /dev/null
@@ -1,5 +0,0 @@
-service wait_for_keymaster /system/bin/wait_for_keymaster
-    user root
-    group root system
-    priority -20
-    ioprio rt 0