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);
|
||||
}
|
||||
|
||||
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 },
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user