From 00ef96bc0e2e9649b3b78a09d5f17b9d6a9e391f Mon Sep 17 00:00:00 2001 From: Roshan Pius Date: Fri, 10 Aug 2018 07:36:39 -0700 Subject: [PATCH] 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 --- core/java/android/net/NetworkAgent.java | 2 +- services/core/java/com/android/server/ConnectivityService.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/java/android/net/NetworkAgent.java b/core/java/android/net/NetworkAgent.java index 081d8d1290..e6b3fa8177 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 23bf92f2ff..20bf9966c8 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: {