From bb6bacc130073be13cccc7aa5907bd17c17073ab Mon Sep 17 00:00:00 2001 From: Lorenzo Colitti Date: Wed, 20 Feb 2019 21:34:01 +0900 Subject: [PATCH] Ensure handleUpdateLinkProperties runs on the CS handler thread. In its own change for ease of rollbacks due to the risk of possibly crashing existing codepaths. Bug: 65674744 Test: atest FrameworksNetTests Test: builds, boots. Wifi, cell data, private DNS work Change-Id: I2c0acc1c7b8367803f17b4a12c1df0fdfbc29691 --- services/core/java/com/android/server/ConnectivityService.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java index 6efa5c1090..9806ca0fb9 100644 --- a/services/core/java/com/android/server/ConnectivityService.java +++ b/services/core/java/com/android/server/ConnectivityService.java @@ -5558,6 +5558,8 @@ public class ConnectivityService extends IConnectivityManager.Stub } public void handleUpdateLinkProperties(NetworkAgentInfo nai, LinkProperties newLp) { + ensureRunningOnConnectivityServiceThread(); + if (getNetworkAgentInfoForNetId(nai.network.netId) != nai) { // Ignore updates for disconnected networks return;