summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Roshan Pius <rpius@google.com> 2018-08-10 07:36:39 -0700
committer Roshan Pius <rpius@google.com> 2018-08-10 07:44:33 -0700
commiteaf8dee36741417779fbd0af725381dff1ee67dd (patch)
treeb3c4b7c6efb343baa88704dc36c6790e0e2076d1
parent64e99ef26d93b851ba9bbcc3983f75fbba64ccd0 (diff)
NetworkAgent: Send primitive integer in explicitlySelected
|Boolean| object is not parcelable and hences crashes when the binder call crosses a process boundary. Using a primitive integer instead to represent the boolean value. Bug: 112358948 Test: Device boots up and able to make wifi connection. Change-Id: Iac69fd302e1f1338ed0da1446105ffc5855451cc
-rw-r--r--core/java/android/net/NetworkAgent.java2
-rw-r--r--services/core/java/com/android/server/ConnectivityService.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/core/java/android/net/NetworkAgent.java b/core/java/android/net/NetworkAgent.java
index 081d8d1290ac..e6b3fa81777e 100644
--- a/core/java/android/net/NetworkAgent.java
+++ b/core/java/android/net/NetworkAgent.java
@@ -387,7 +387,7 @@ public abstract class NetworkAgent extends Handler {
* {@link #saveAcceptUnvalidated} to respect the user's choice.
*/
public void explicitlySelected(boolean acceptUnvalidated) {
- queueOrSendMessage(EVENT_SET_EXPLICITLY_SELECTED, acceptUnvalidated);
+ queueOrSendMessage(EVENT_SET_EXPLICITLY_SELECTED, acceptUnvalidated ? 1 : 0, 0);
}
/**
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java
index 23bf92f2ff34..20bf9966c8ad 100644
--- a/services/core/java/com/android/server/ConnectivityService.java
+++ b/services/core/java/com/android/server/ConnectivityService.java
@@ -2105,7 +2105,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
loge("ERROR: already-connected network explicitly selected.");
}
nai.networkMisc.explicitlySelected = true;
- nai.networkMisc.acceptUnvalidated = (boolean) msg.obj;
+ nai.networkMisc.acceptUnvalidated = msg.arg1 == 1;
break;
}
case NetworkAgent.EVENT_PACKET_KEEPALIVE: {