summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEtan Cohen <etancohen@google.com>2019-11-26 16:52:32 -0800
committerEtan Cohen <etancohen@google.com>2019-11-27 20:09:13 -0800
commit7b13e7a87d0ed35c6f56b312b7daa8f417a5f075 (patch)
tree33f63d876f40bf2f81d88f5889dcd7e047e25296
parentba370409b87a7b59e32aa9dd835a27013201ea78 (diff)
downloadwificond-7b13e7a87d0ed35c6f56b312b7daa8f417a5f075.tar.gz
Revert "wificond: Move wifi keystore HAL service to wificond"
This reverts commit 662df2ae8947cca99d437a8b5b609b70da286db0. Change-Id: I9b31110c79596a5931bffe1cdde480797086e595
-rw-r--r--Android.bp16
-rw-r--r--main.cpp5
-rw-r--r--wifi_keystore_hal_connector.cpp50
-rw-r--r--wifi_keystore_hal_connector.h37
4 files changed, 2 insertions, 106 deletions
diff --git a/Android.bp b/Android.bp
index fda5cd8..bc8fc2c 100644
--- a/Android.bp
+++ b/Android.bp
@@ -30,29 +30,17 @@ cc_binary {
name: "wificond",
defaults: ["wificond_defaults"],
init_rc: ["wificond.rc"],
- srcs: [
- "main.cpp",
- "wifi_keystore_hal_connector.cpp"
- ],
- include_dirs: ["system/security/keystore/include"],
+ srcs: ["main.cpp"],
shared_libs: [
"libbinder",
"libbase",
"libcutils",
- "libhidlbase",
- "libkeystore_aidl",
- "libkeystore_binder",
- "libkeystore_parcelables",
"libminijail",
"libutils",
"libwifi-system-iface",
- "android.system.wifi.keystore@1.0",
- ],
- static_libs: [
- "libwificond", // Wificond daemon
- "libwifikeystorehal" // Wifi Keystore HAL service
],
+ static_libs: ["libwificond"],
}
//
diff --git a/main.cpp b/main.cpp
index 2e19c65..3ea61b8 100644
--- a/main.cpp
+++ b/main.cpp
@@ -36,11 +36,9 @@
#include "wificond/net/netlink_utils.h"
#include "wificond/scanning/scan_utils.h"
#include "wificond/server.h"
-#include "wifi_keystore_hal_connector.h"
using android::wifi_system::InterfaceTool;
using android::wificond::ipc_constants::kServiceName;
-using android::wificond::WifiKeystoreHalConnector;
using std::unique_ptr;
namespace {
@@ -129,9 +127,6 @@ int main(int argc, char** argv) {
&scan_utils));
RegisterServiceOrCrash(server.get());
- WifiKeystoreHalConnector keystore_connector;
- keystore_connector.start();
-
event_dispatcher->Poll();
LOG(INFO) << "wificond is about to exit";
return 0;
diff --git a/wifi_keystore_hal_connector.cpp b/wifi_keystore_hal_connector.cpp
deleted file mode 100644
index 271e444..0000000
--- a/wifi_keystore_hal_connector.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2019 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 <unistd.h>
-#include <sys/capability.h>
-
-#include <android-base/logging.h>
-#include <android-base/macros.h>
-#include <android/hidl/manager/1.2/IServiceManager.h>
-#include <android/system/wifi/keystore/1.0/IKeystore.h>
-#include <hidl/HidlTransportSupport.h>
-
-#include <wifikeystorehal/keystore.h>
-
-#include "wifi_keystore_hal_connector.h"
-
-using android::hardware::configureRpcThreadpool;
-using android::system::wifi::keystore::V1_0::IKeystore;
-using android::system::wifi::keystore::V1_0::implementation::Keystore;
-
-namespace android {
-namespace wificond {
-
-void WifiKeystoreHalConnector::start() {
- /**
- * Register the wifi keystore HAL service to run in passthrough mode.
- * This will spawn off a new thread which will service the HIDL
- * transactions.
- */
- configureRpcThreadpool(1, false /* callerWillJoin */);
- android::sp<IKeystore> wifiKeystoreHalService = new Keystore();
- android::status_t err = wifiKeystoreHalService->registerAsService();
- CHECK(err == android::OK) << "Cannot register wifi keystore HAL service: " << err;
-}
-} // namespace wificond
-} // namespace android
-
diff --git a/wifi_keystore_hal_connector.h b/wifi_keystore_hal_connector.h
deleted file mode 100644
index 58c026e..0000000
--- a/wifi_keystore_hal_connector.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2019 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.
- */
-
-#ifndef WIFICOND_WIFI_KEYSTORE_HAL_CONNECTOR_H_
-#define WIFICOND_WIFI_KEYSTORE_HAL_CONNECTOR_H_
-
-namespace android {
-namespace wificond {
-
-// Class for loading the wifi keystore HAL service.
-class WifiKeystoreHalConnector {
- public:
- WifiKeystoreHalConnector() = default;
- ~WifiKeystoreHalConnector() = default;
-
- void start();
-
- DISALLOW_COPY_AND_ASSIGN(WifiKeystoreHalConnector);
-};
-
-} // namespace wificond
-} // namespace android
-
-#endif // WIFICOND_WIFI_KEYSTORE_HAL_CONNECTOR_H_