Merge "Use seperate config file for p2p"
This commit is contained in:
committed by
Android (Google) Code Review
commit
335e40c0f1
@@ -124,6 +124,11 @@ static jboolean android_net_wifi_startSupplicant(JNIEnv* env, jobject)
|
|||||||
return (jboolean)(::wifi_start_supplicant() == 0);
|
return (jboolean)(::wifi_start_supplicant() == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static jboolean android_net_wifi_startP2pSupplicant(JNIEnv* env, jobject)
|
||||||
|
{
|
||||||
|
return (jboolean)(::wifi_start_p2p_supplicant() == 0);
|
||||||
|
}
|
||||||
|
|
||||||
static jboolean android_net_wifi_stopSupplicant(JNIEnv* env, jobject)
|
static jboolean android_net_wifi_stopSupplicant(JNIEnv* env, jobject)
|
||||||
{
|
{
|
||||||
return doBooleanCommand("OK", "TERMINATE");
|
return doBooleanCommand("OK", "TERMINATE");
|
||||||
@@ -581,6 +586,7 @@ static JNINativeMethod gWifiMethods[] = {
|
|||||||
{ "isDriverLoaded", "()Z", (void *)android_net_wifi_isDriverLoaded},
|
{ "isDriverLoaded", "()Z", (void *)android_net_wifi_isDriverLoaded},
|
||||||
{ "unloadDriver", "()Z", (void *)android_net_wifi_unloadDriver },
|
{ "unloadDriver", "()Z", (void *)android_net_wifi_unloadDriver },
|
||||||
{ "startSupplicant", "()Z", (void *)android_net_wifi_startSupplicant },
|
{ "startSupplicant", "()Z", (void *)android_net_wifi_startSupplicant },
|
||||||
|
{ "startP2pSupplicant", "()Z", (void *)android_net_wifi_startP2pSupplicant },
|
||||||
{ "stopSupplicant", "()Z", (void*) android_net_wifi_stopSupplicant },
|
{ "stopSupplicant", "()Z", (void*) android_net_wifi_stopSupplicant },
|
||||||
{ "killSupplicant", "()Z", (void *)android_net_wifi_killSupplicant },
|
{ "killSupplicant", "()Z", (void *)android_net_wifi_killSupplicant },
|
||||||
{ "connectToSupplicant", "()Z", (void *)android_net_wifi_connectToSupplicant },
|
{ "connectToSupplicant", "()Z", (void *)android_net_wifi_connectToSupplicant },
|
||||||
|
|||||||
@@ -60,7 +60,9 @@ public class WifiNative {
|
|||||||
|
|
||||||
public native static boolean startSupplicant();
|
public native static boolean startSupplicant();
|
||||||
|
|
||||||
/* Does a graceful shutdown of supplicant.
|
public native static boolean startP2pSupplicant();
|
||||||
|
|
||||||
|
/* Does a graceful shutdown of supplicant. Is a common stop function for both p2p and sta.
|
||||||
*
|
*
|
||||||
* Note that underneath we use a harsh-sounding "terminate" supplicant command
|
* Note that underneath we use a harsh-sounding "terminate" supplicant command
|
||||||
* for a graceful stop and a mild-sounding "stop" interface
|
* for a graceful stop and a mild-sounding "stop" interface
|
||||||
|
|||||||
@@ -514,7 +514,7 @@ public class WifiP2pService extends IWifiP2pManager.Stub {
|
|||||||
if (DBG) Slog.w(TAG, "Unable to bring down wlan interface: " + e);
|
if (DBG) Slog.w(TAG, "Unable to bring down wlan interface: " + e);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (WifiNative.startSupplicant()) {
|
if (WifiNative.startP2pSupplicant()) {
|
||||||
mWifiMonitor.startMonitoring();
|
mWifiMonitor.startMonitoring();
|
||||||
transitionTo(mP2pEnablingState);
|
transitionTo(mP2pEnablingState);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user