diff options
author | Roshan Pius <rpius@google.com> | 2020-04-23 06:07:18 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-04-23 06:07:18 +0000 |
commit | 6d3b675cbbb3f8311c0cbcbb796a70a369f211dc (patch) | |
tree | 04aa9828bd0c4c6bb76381b62e416f1dade1bfaf /service | |
parent | 62ac6292b7b34964caa507a35d99386058d667fd (diff) | |
parent | a8098810059b46dde92c68632b72c4f195eb0ac3 (diff) |
Merge changes I8373e0f2,I873f179c into rvc-dev am: a809881005
Change-Id: Idd7b41305a57f3d2607ce434e90cfde0550bfc46
Diffstat (limited to 'service')
-rw-r--r-- | service/java/com/android/server/wifi/SavedNetworkNominator.java | 7 | ||||
-rw-r--r-- | service/java/com/android/server/wifi/WifiServiceImpl.java | 8 |
2 files changed, 7 insertions, 8 deletions
diff --git a/service/java/com/android/server/wifi/SavedNetworkNominator.java b/service/java/com/android/server/wifi/SavedNetworkNominator.java index 2d91881a0..a3039096e 100644 --- a/service/java/com/android/server/wifi/SavedNetworkNominator.java +++ b/service/java/com/android/server/wifi/SavedNetworkNominator.java @@ -97,7 +97,6 @@ public class SavedNetworkNominator implements WifiNetworkSelector.NetworkNominat // One ScanResult can be associated with more than one network, hence we calculate all // the scores and use the highest one as the ScanResult's score. - // TODO(b/112196799): this has side effects, rather not do that in a nominator WifiConfiguration network = mWifiConfigManager.getConfiguredNetworkForScanDetailAndCache(scanDetail); @@ -117,20 +116,21 @@ public class SavedNetworkNominator implements WifiNetworkSelector.NetworkNominat // Ignore networks that the user has disallowed auto-join for. if (!network.allowAutojoin) { + localLog("Ignoring auto join disabled SSID: " + network.SSID); continue; } WifiConfiguration.NetworkSelectionStatus status = network.getNetworkSelectionStatus(); - // TODO (b/112196799): another side effect status.setSeenInLastQualifiedNetworkSelection(true); if (mWifiConfigManager.isNetworkTemporarilyDisabledByUser(network.SSID)) { - mLocalLog.log("Ignoring user disabled SSID: " + network.SSID); + localLog("Ignoring user disabled SSID: " + network.SSID); continue; } if (!status.isNetworkEnabled()) { + localLog("Ignoring network selection disabled SSID: " + network.SSID); continue; } if (network.BSSID != null && !network.BSSID.equals("any") @@ -143,6 +143,7 @@ public class SavedNetworkNominator implements WifiNetworkSelector.NetworkNominat continue; } if (isNetworkSimBasedCredential(network) && !isSimBasedNetworkAbleToAutoJoin(network)) { + localLog("Ignoring SIM auto join disabled SSID: " + network.SSID); continue; } diff --git a/service/java/com/android/server/wifi/WifiServiceImpl.java b/service/java/com/android/server/wifi/WifiServiceImpl.java index e6e5f2b36..37f34639e 100644 --- a/service/java/com/android/server/wifi/WifiServiceImpl.java +++ b/service/java/com/android/server/wifi/WifiServiceImpl.java @@ -735,10 +735,10 @@ public class WifiServiceImpl extends BaseWifiService { private boolean isTargetSdkLessThanQOrPrivileged(String packageName, int pid, int uid) { return mWifiPermissionsUtil.isTargetSdkLessThan(packageName, Build.VERSION_CODES.Q, uid) || isPrivileged(pid, uid) - // DO/PO apps should be able to add/modify saved networks. || isDeviceOrProfileOwner(uid, packageName) - // TODO: Remove this system app bypass once Q is released. - || isSystem(packageName, uid); + || isSystem(packageName, uid) + // TODO(b/140540984): Remove this bypass. + || mWifiPermissionsUtil.checkSystemAlertWindowPermission(uid, packageName); } /** @@ -749,9 +749,7 @@ public class WifiServiceImpl extends BaseWifiService { private boolean isTargetSdkLessThanROrPrivileged(String packageName, int pid, int uid) { return mWifiPermissionsUtil.isTargetSdkLessThan(packageName, Build.VERSION_CODES.R, uid) || isPrivileged(pid, uid) - // DO/PO apps should be able to add/modify saved networks. || isDeviceOrProfileOwner(uid, packageName) - // TODO: Remove this system app bypass once R is released. || isSystem(packageName, uid); } |