Remove unused driver management JNI calls
wificond does this work for us now.
Bug: 30041062
Change-Id: Ie4c8e6d8b55b9495102f92db6772d382cc3e7c07
diff --git a/service/java/com/android/server/wifi/WifiNative.java b/service/java/com/android/server/wifi/WifiNative.java
index 75f5915..7c20dd6 100644
--- a/service/java/com/android/server/wifi/WifiNative.java
+++ b/service/java/com/android/server/wifi/WifiNative.java
@@ -174,29 +174,8 @@
/*
- * Driver and Supplicant management
+ * Supplicant management
*/
- private native static boolean loadDriverNative();
- public boolean loadDriver() {
- synchronized (sLock) {
- return loadDriverNative();
- }
- }
-
- private native static boolean isDriverLoadedNative();
- public boolean isDriverLoaded() {
- synchronized (sLock) {
- return isDriverLoadedNative();
- }
- }
-
- private native static boolean unloadDriverNative();
- public boolean unloadDriver() {
- synchronized (sLock) {
- return unloadDriverNative();
- }
- }
-
private native static boolean startSupplicantNative(boolean p2pSupported);
public boolean startSupplicant(boolean p2pSupported) {
synchronized (sLock) {
@@ -434,7 +413,7 @@
// an FQDN stored as a plain string. If such a value is encountered, the JSONObject
// constructor will thrown a JSONException and the method will return null.
final JSONObject json = new JSONObject(URLDecoder.decode(encoded, "UTF-8"));
- final Map<String, String> values = new HashMap<String, String>();
+ final Map<String, String> values = new HashMap<>();
final Iterator<?> it = json.keys();
while (it.hasNext()) {
final String key = (String) it.next();
@@ -1206,7 +1185,7 @@
[persistent] [join|auth] [go_intent=<0..15>] [freq=<in MHz>] */
public String p2pConnect(WifiP2pConfig config, boolean joinExistingGroup) {
if (config == null) return null;
- List<String> args = new ArrayList<String>();
+ List<String> args = new ArrayList<>();
WpsInfo wps = config.wps;
args.add(config.deviceAddress);
diff --git a/service/jni/com_android_server_wifi_WifiNative.cpp b/service/jni/com_android_server_wifi_WifiNative.cpp
index 1467503..8297392 100644
--- a/service/jni/com_android_server_wifi_WifiNative.cpp
+++ b/service/jni/com_android_server_wifi_WifiNative.cpp
@@ -115,21 +115,6 @@
return env->NewStringUTF(reply);
}
-static jboolean android_net_wifi_isDriverLoaded(JNIEnv* env, jclass)
-{
- return (::is_wifi_driver_loaded() == 1);
-}
-
-static jboolean android_net_wifi_loadDriver(JNIEnv* env, jclass)
-{
- return (::wifi_load_driver() == 0);
-}
-
-static jboolean android_net_wifi_unloadDriver(JNIEnv* env, jclass)
-{
- return (::wifi_unload_driver() == 0);
-}
-
static jboolean android_net_wifi_startSupplicant(JNIEnv* env, jclass, jboolean p2pSupported)
{
return (wifi_system::wifi_start_supplicant(p2pSupported) == 0);
@@ -2487,9 +2472,6 @@
static JNINativeMethod gWifiMethods[] = {
/* name, signature, funcPtr */
- { "loadDriverNative", "()Z", (void *)android_net_wifi_loadDriver },
- { "isDriverLoadedNative", "()Z", (void *)android_net_wifi_isDriverLoaded },
- { "unloadDriverNative", "()Z", (void *)android_net_wifi_unloadDriver },
{ "startSupplicantNative", "(Z)Z", (void *)android_net_wifi_startSupplicant },
{ "killSupplicantNative", "(Z)Z", (void *)android_net_wifi_killSupplicant },
{ "connectToSupplicantNative", "()Z", (void *)android_net_wifi_connectToSupplicant },