Merge "Use seperate config file for p2p"

This commit is contained in:
Irfan Sheriff
2011-08-29 15:22:58 -07:00
committed by Android (Google) Code Review
3 changed files with 10 additions and 2 deletions

View File

@@ -124,6 +124,11 @@ static jboolean android_net_wifi_startSupplicant(JNIEnv* env, jobject)
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)
{
return doBooleanCommand("OK", "TERMINATE");
@@ -581,6 +586,7 @@ static JNINativeMethod gWifiMethods[] = {
{ "isDriverLoaded", "()Z", (void *)android_net_wifi_isDriverLoaded},
{ "unloadDriver", "()Z", (void *)android_net_wifi_unloadDriver },
{ "startSupplicant", "()Z", (void *)android_net_wifi_startSupplicant },
{ "startP2pSupplicant", "()Z", (void *)android_net_wifi_startP2pSupplicant },
{ "stopSupplicant", "()Z", (void*) android_net_wifi_stopSupplicant },
{ "killSupplicant", "()Z", (void *)android_net_wifi_killSupplicant },
{ "connectToSupplicant", "()Z", (void *)android_net_wifi_connectToSupplicant },

View File

@@ -60,7 +60,9 @@ public class WifiNative {
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
* for a graceful stop and a mild-sounding "stop" interface

View File

@@ -514,7 +514,7 @@ public class WifiP2pService extends IWifiP2pManager.Stub {
if (DBG) Slog.w(TAG, "Unable to bring down wlan interface: " + e);
}
if (WifiNative.startSupplicant()) {
if (WifiNative.startP2pSupplicant()) {
mWifiMonitor.startMonitoring();
transitionTo(mP2pEnablingState);
} else {