am 512950a9: Merge "docs: Minor Nexus 10 fix in Device Art Generator" into jb-mr1-dev
* commit '512950a9713f79f2900c73201906436d12da8639':
docs: Minor Nexus 10 fix in Device Art Generator
diff --git a/core/java/android/net/DhcpStateMachine.java b/core/java/android/net/DhcpStateMachine.java
index 874e80a..8dc900e 100644
--- a/core/java/android/net/DhcpStateMachine.java
+++ b/core/java/android/net/DhcpStateMachine.java
@@ -351,6 +351,8 @@
DhcpInfoInternal dhcpInfoInternal = new DhcpInfoInternal();
if (dhcpAction == DhcpAction.START) {
+ /* Stop any existing DHCP daemon before starting new */
+ NetworkUtils.stopDhcp(mInterfaceName);
if (DBG) Log.d(TAG, "DHCP request on " + mInterfaceName);
success = NetworkUtils.runDhcp(mInterfaceName, dhcpInfoInternal);
mDhcpInfo = dhcpInfoInternal;
diff --git a/core/jni/android_net_wifi_Wifi.cpp b/core/jni/android_net_wifi_Wifi.cpp
index e7c4c23..9537ac4 100644
--- a/core/jni/android_net_wifi_Wifi.cpp
+++ b/core/jni/android_net_wifi_Wifi.cpp
@@ -122,9 +122,9 @@
return (jboolean)(::wifi_start_supplicant(p2pSupported) == 0);
}
-static jboolean android_net_wifi_killSupplicant(JNIEnv* env, jobject)
+static jboolean android_net_wifi_killSupplicant(JNIEnv* env, jobject, jboolean p2pSupported)
{
- return (jboolean)(::wifi_stop_supplicant() == 0);
+ return (jboolean)(::wifi_stop_supplicant(p2pSupported) == 0);
}
static jboolean android_net_wifi_connectToSupplicant(JNIEnv* env, jobject, jstring jIface)
@@ -204,7 +204,7 @@
{ "isDriverLoaded", "()Z", (void *)android_net_wifi_isDriverLoaded },
{ "unloadDriver", "()Z", (void *)android_net_wifi_unloadDriver },
{ "startSupplicant", "(Z)Z", (void *)android_net_wifi_startSupplicant },
- { "killSupplicant", "()Z", (void *)android_net_wifi_killSupplicant },
+ { "killSupplicant", "(Z)Z", (void *)android_net_wifi_killSupplicant },
{ "connectToSupplicant", "(Ljava/lang/String;)Z",
(void *)android_net_wifi_connectToSupplicant },
{ "closeSupplicantConnection", "(Ljava/lang/String;)V",
diff --git a/core/res/res/drawable-hdpi/ic_coins_l.png b/core/res/res/drawable-hdpi/ic_coins_l.png
new file mode 100644
index 0000000..e1e3e2a
--- /dev/null
+++ b/core/res/res/drawable-hdpi/ic_coins_l.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/ic_coins_l.png b/core/res/res/drawable-mdpi/ic_coins_l.png
new file mode 100644
index 0000000..a6d7abb
--- /dev/null
+++ b/core/res/res/drawable-mdpi/ic_coins_l.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/ic_coins_l.png b/core/res/res/drawable-xhdpi/ic_coins_l.png
new file mode 100644
index 0000000..84e7e72
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/ic_coins_l.png
Binary files differ
diff --git a/core/res/res/layout/sms_short_code_confirmation_dialog.xml b/core/res/res/layout/sms_short_code_confirmation_dialog.xml
index ec39d97..d82f560 100644
--- a/core/res/res/layout/sms_short_code_confirmation_dialog.xml
+++ b/core/res/res/layout/sms_short_code_confirmation_dialog.xml
@@ -30,9 +30,9 @@
style="?android:attr/textAppearanceMedium"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:paddingLeft="16dip"
- android:paddingRight="16dip"
- android:paddingTop="8dip"
+ android:paddingLeft="20dip"
+ android:paddingRight="20dip"
+ android:paddingTop="16dip"
android:paddingBottom="16dip" />
<TableLayout android:id="@+id/sms_short_code_detail_layout"
@@ -51,7 +51,7 @@
android:layout_height="wrap_content"
android:paddingLeft="8dip"
android:paddingRight="8dip"
- android:src="@null" />
+ android:src="@drawable/ic_coins_l" />
<TextView android:id="@+id/sms_short_code_detail_message"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
@@ -60,14 +60,19 @@
<TableRow
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
-
- <CheckBox android:id="@+id/sms_short_code_remember_choice_checkbox"
- android:layout_width="wrap_content"
+ <RelativeLayout android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:paddingRight="8dip" />
+ android:paddingTop="12dip"
+ android:paddingLeft="8dip" >
+ <CheckBox android:id="@+id/sms_short_code_remember_choice_checkbox"
+ android:paddingTop="11dip"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" />
+ </RelativeLayout>
<TextView android:id="@+id/sms_short_code_remember_choice_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:paddingTop="18dip"
android:text="@string/sms_short_code_remember_choice" />
</TableRow>
@@ -77,6 +82,7 @@
<Space android:layout_gravity="fill" />
<TextView android:id="@+id/sms_short_code_remember_undo_instruction"
+ android:paddingTop="10dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</TableRow>
diff --git a/wifi/java/android/net/wifi/WifiNative.java b/wifi/java/android/net/wifi/WifiNative.java
index 4c5fc5d..5e25623 100644
--- a/wifi/java/android/net/wifi/WifiNative.java
+++ b/wifi/java/android/net/wifi/WifiNative.java
@@ -61,7 +61,7 @@
/* Sends a kill signal to supplicant. To be used when we have lost connection
or when the supplicant is hung */
- public native static boolean killSupplicant();
+ public native static boolean killSupplicant(boolean p2pSupported);
private native boolean connectToSupplicant(String iface);
diff --git a/wifi/java/android/net/wifi/WifiStateMachine.java b/wifi/java/android/net/wifi/WifiStateMachine.java
index 040ff24..dafa8e8 100644
--- a/wifi/java/android/net/wifi/WifiStateMachine.java
+++ b/wifi/java/android/net/wifi/WifiStateMachine.java
@@ -1944,6 +1944,7 @@
case CMD_STOP_DRIVER:
case CMD_DELAYED_STOP_DRIVER:
case CMD_DRIVER_START_TIMED_OUT:
+ case CMD_CAPTIVE_CHECK_COMPLETE:
case CMD_START_AP:
case CMD_START_AP_SUCCESS:
case CMD_START_AP_FAILURE:
@@ -2189,6 +2190,13 @@
loge("Unable to change interface settings: " + ie);
}
+ /* Stop a running supplicant after a runtime restart
+ * Avoids issues with drivers that do not handle interface down
+ * on a running supplicant properly.
+ */
+ if (DBG) log("Kill any running supplicant");
+ mWifiNative.killSupplicant(mP2pSupported);
+
if(mWifiNative.startSupplicant(mP2pSupported)) {
if (DBG) log("Supplicant start successful");
mWifiMonitor.startMonitoring();
@@ -2384,7 +2392,7 @@
case WifiMonitor.SUP_DISCONNECTION_EVENT:
if (++mSupplicantRestartCount <= SUPPLICANT_RESTART_TRIES) {
loge("Failed to setup control channel, restart supplicant");
- mWifiNative.killSupplicant();
+ mWifiNative.killSupplicant(mP2pSupported);
transitionTo(mDriverLoadedState);
sendMessageDelayed(CMD_START_SUPPLICANT, SUPPLICANT_RESTART_INTERVAL_MSECS);
} else {
@@ -2451,7 +2459,7 @@
break;
case WifiMonitor.SUP_DISCONNECTION_EVENT: /* Supplicant connection lost */
loge("Connection lost, restart supplicant");
- mWifiNative.killSupplicant();
+ mWifiNative.killSupplicant(mP2pSupported);
mWifiNative.closeSupplicantConnection();
mNetworkInfo.setIsAvailable(false);
handleNetworkDisconnect();
@@ -2605,14 +2613,14 @@
/* Socket connection can be lost when we do a graceful shutdown
* or when the driver is hung. Ensure supplicant is stopped here.
*/
- mWifiNative.killSupplicant();
+ mWifiNative.killSupplicant(mP2pSupported);
mWifiNative.closeSupplicantConnection();
transitionTo(mDriverLoadedState);
break;
case CMD_STOP_SUPPLICANT_FAILED:
if (message.arg1 == mSupplicantStopFailureToken) {
loge("Timed out on a supplicant stop, kill and proceed");
- mWifiNative.killSupplicant();
+ mWifiNative.killSupplicant(mP2pSupported);
mWifiNative.closeSupplicantConnection();
transitionTo(mDriverLoadedState);
}