From 3d3e2bcb051ddb98acec07156ef5c69e31c6c482 Mon Sep 17 00:00:00 2001 From: Roshan Pius Date: Tue, 28 Apr 2020 10:01:38 -0700 Subject: AvailableNetworkNotifier: Use SYSTEM_UID for ONA connection WIFI_UID does not have NETWORK_SETTINGS permission. So, use SYSTEM_UID which is probably more apt anyway since this is what settings app uses (User clicking on the notification is meant to simulate connecting to the network from wifi picker). Bug: 155116995 Test: atest com.android.server.wifi Test: Manual verification of connection using ONA notification. Change-Id: I5f87f2d14a8180f02a50269515702809426a81ff --- service/java/com/android/server/wifi/AvailableNetworkNotifier.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'service') diff --git a/service/java/com/android/server/wifi/AvailableNetworkNotifier.java b/service/java/com/android/server/wifi/AvailableNetworkNotifier.java index 1ec6fba4a..7243193cd 100644 --- a/service/java/com/android/server/wifi/AvailableNetworkNotifier.java +++ b/service/java/com/android/server/wifi/AvailableNetworkNotifier.java @@ -438,7 +438,7 @@ public class AvailableNetworkNotifier { mWifiMetrics.setNominatorForNetwork(result.netId, mNominatorId); ConnectActionListener connectActionListener = new ConnectActionListener(); mClientModeImpl.connect(null, result.netId, new Binder(), connectActionListener, - connectActionListener.hashCode(), Process.WIFI_UID); + connectActionListener.hashCode(), Process.SYSTEM_UID); addNetworkToBlacklist(mRecommendedNetwork.SSID); } -- cgit v1.2.3