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
This commit is contained in:
Roshan Pius
2018-08-10 07:36:39 -07:00
parent d594290fd9
commit 00ef96bc0e
2 changed files with 2 additions and 2 deletions

View File

@@ -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);
}
/**

View File

@@ -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: {