diff options
7 files changed, 1 insertions, 146 deletions
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/pipeline/wifi/domain/interactor/WifiInteractorImplTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/pipeline/wifi/domain/interactor/WifiInteractorImplTest.kt index 84c728cd9412..8cf9b0f9bb47 100644 --- a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/pipeline/wifi/domain/interactor/WifiInteractorImplTest.kt +++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/pipeline/wifi/domain/interactor/WifiInteractorImplTest.kt @@ -106,48 +106,6 @@ class WifiInteractorImplTest : SysuiTestCase() { } @Test - fun ssid_isPasspointAccessPoint_outputsPasspointName() = - testScope.runTest { - wifiRepository.setWifiNetwork( - WifiNetworkModel.Active( - networkId = 1, - level = 1, - isPasspointAccessPoint = true, - passpointProviderFriendlyName = "friendly", - ) - ) - - var latest: String? = null - val job = underTest.ssid.onEach { latest = it }.launchIn(this) - runCurrent() - - assertThat(latest).isEqualTo("friendly") - - job.cancel() - } - - @Test - fun ssid_isOnlineSignUpForPasspoint_outputsPasspointName() = - testScope.runTest { - wifiRepository.setWifiNetwork( - WifiNetworkModel.Active( - networkId = 1, - level = 1, - isOnlineSignUpForPasspointAccessPoint = true, - passpointProviderFriendlyName = "friendly", - ) - ) - - var latest: String? = null - val job = underTest.ssid.onEach { latest = it }.launchIn(this) - runCurrent() - - assertThat(latest).isEqualTo("friendly") - - job.cancel() - } - - @Test fun ssid_unknownSsid_outputsNull() = testScope.runTest { wifiRepository.setWifiNetwork( @@ -238,7 +196,6 @@ class WifiInteractorImplTest : SysuiTestCase() { isValidated = true, level = 3, ssid = "AB", - passpointProviderFriendlyName = "friendly" ) wifiRepository.setWifiNetwork(wifiNetwork) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/demo/DemoWifiRepository.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/demo/DemoWifiRepository.kt index 152d181bfc16..d1ac3e92abc2 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/demo/DemoWifiRepository.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/demo/DemoWifiRepository.kt @@ -106,12 +106,6 @@ constructor( level = level ?: 0, ssid = ssid ?: DEMO_NET_SSID, hotspotDeviceType = hotspotDeviceType, - - // These fields below aren't supported in demo mode, since they aren't needed to satisfy - // the interface. - isPasspointAccessPoint = false, - isOnlineSignUpForPasspointAccessPoint = false, - passpointProviderFriendlyName = null, ) private fun FakeWifiEventModel.CarrierMerged.toCarrierMergedModel(): WifiNetworkModel = diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/prod/WifiRepositoryImpl.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/prod/WifiRepositoryImpl.kt index 5a10dfefb694..20c76681e11f 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/prod/WifiRepositoryImpl.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/prod/WifiRepositoryImpl.kt @@ -300,14 +300,6 @@ constructor( level = currentLevel, ssid = this.title, hotspotDeviceType = hotspotDeviceType, - // With WifiTrackerLib, [WifiEntry.title] will appropriately fetch the SSID for - // typical wifi networks *and* passpoint/OSU APs. So, the AP-specific values can - // always be false/null in this repository. - // TODO(b/292534484): Remove these fields from the wifi network model once this - // repository is fully enabled. - isPasspointAccessPoint = false, - isOnlineSignUpForPasspointAccessPoint = false, - passpointProviderFriendlyName = null, ) } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/domain/interactor/WifiInteractor.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/domain/interactor/WifiInteractor.kt index 110e3390e722..c0b0c4acb51a 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/domain/interactor/WifiInteractor.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/domain/interactor/WifiInteractor.kt @@ -83,8 +83,6 @@ constructor( is WifiNetworkModel.CarrierMerged -> null is WifiNetworkModel.Active -> when { - info.isPasspointAccessPoint || info.isOnlineSignUpForPasspointAccessPoint -> - info.passpointProviderFriendlyName info.hasValidSsid() -> info.ssid else -> null } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/shared/model/WifiNetworkModel.kt b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/shared/model/WifiNetworkModel.kt index 03a65483ac6e..834a6db83ab2 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/shared/model/WifiNetworkModel.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/pipeline/wifi/shared/model/WifiNetworkModel.kt @@ -57,9 +57,6 @@ sealed class WifiNetworkModel : Diffable<WifiNetworkModel> { row.logChange(COL_NUM_LEVELS, NUM_LEVELS_DEFAULT) row.logChange(COL_SSID, null) row.logChange(COL_HOTSPOT, null) - row.logChange(COL_PASSPOINT_ACCESS_POINT, false) - row.logChange(COL_ONLINE_SIGN_UP, false) - row.logChange(COL_PASSPOINT_NAME, null) } } @@ -90,9 +87,6 @@ sealed class WifiNetworkModel : Diffable<WifiNetworkModel> { row.logChange(COL_NUM_LEVELS, NUM_LEVELS_DEFAULT) row.logChange(COL_SSID, null) row.logChange(COL_HOTSPOT, null) - row.logChange(COL_PASSPOINT_ACCESS_POINT, false) - row.logChange(COL_ONLINE_SIGN_UP, false) - row.logChange(COL_PASSPOINT_NAME, null) } } @@ -118,9 +112,6 @@ sealed class WifiNetworkModel : Diffable<WifiNetworkModel> { row.logChange(COL_NUM_LEVELS, NUM_LEVELS_DEFAULT) row.logChange(COL_SSID, null) row.logChange(COL_HOTSPOT, null) - row.logChange(COL_PASSPOINT_ACCESS_POINT, false) - row.logChange(COL_ONLINE_SIGN_UP, false) - row.logChange(COL_PASSPOINT_NAME, null) } } @@ -194,9 +185,6 @@ sealed class WifiNetworkModel : Diffable<WifiNetworkModel> { row.logChange(COL_NUM_LEVELS, numberOfLevels) row.logChange(COL_SSID, null) row.logChange(COL_HOTSPOT, null) - row.logChange(COL_PASSPOINT_ACCESS_POINT, false) - row.logChange(COL_ONLINE_SIGN_UP, false) - row.logChange(COL_PASSPOINT_NAME, null) } } @@ -224,15 +212,6 @@ sealed class WifiNetworkModel : Diffable<WifiNetworkModel> { * isn't a hotspot connection. */ val hotspotDeviceType: HotspotDeviceType = WifiNetworkModel.HotspotDeviceType.NONE, - - /** See [android.net.wifi.WifiInfo.isPasspointAp]. */ - val isPasspointAccessPoint: Boolean = false, - - /** See [android.net.wifi.WifiInfo.isOsuAp]. */ - val isOnlineSignUpForPasspointAccessPoint: Boolean = false, - - /** See [android.net.wifi.WifiInfo.passpointProviderFriendlyName]. */ - val passpointProviderFriendlyName: String? = null, ) : WifiNetworkModel() { init { require(level in MIN_VALID_LEVEL..MAX_VALID_LEVEL) { @@ -267,21 +246,6 @@ sealed class WifiNetworkModel : Diffable<WifiNetworkModel> { if (prevVal.hotspotDeviceType != hotspotDeviceType) { row.logChange(COL_HOTSPOT, hotspotDeviceType.name) } - - // TODO(b/238425913): The passpoint-related values are frequently never used, so it - // would be great to not log them when they're not used. - if (prevVal.isPasspointAccessPoint != isPasspointAccessPoint) { - row.logChange(COL_PASSPOINT_ACCESS_POINT, isPasspointAccessPoint) - } - if ( - prevVal.isOnlineSignUpForPasspointAccessPoint != - isOnlineSignUpForPasspointAccessPoint - ) { - row.logChange(COL_ONLINE_SIGN_UP, isOnlineSignUpForPasspointAccessPoint) - } - if (prevVal.passpointProviderFriendlyName != passpointProviderFriendlyName) { - row.logChange(COL_PASSPOINT_NAME, passpointProviderFriendlyName) - } } override fun logFull(row: TableRowLogger) { @@ -293,29 +257,6 @@ sealed class WifiNetworkModel : Diffable<WifiNetworkModel> { row.logChange(COL_NUM_LEVELS, null) row.logChange(COL_SSID, ssid) row.logChange(COL_HOTSPOT, hotspotDeviceType.name) - row.logChange(COL_PASSPOINT_ACCESS_POINT, isPasspointAccessPoint) - row.logChange(COL_ONLINE_SIGN_UP, isOnlineSignUpForPasspointAccessPoint) - row.logChange(COL_PASSPOINT_NAME, passpointProviderFriendlyName) - } - - override fun toString(): String { - // Only include the passpoint-related values in the string if we have them. (Most - // networks won't have them so they'll be mostly clutter.) - val passpointString = - if ( - isPasspointAccessPoint || - isOnlineSignUpForPasspointAccessPoint || - passpointProviderFriendlyName != null - ) { - ", isPasspointAp=$isPasspointAccessPoint, " + - "isOnlineSignUpForPasspointAp=$isOnlineSignUpForPasspointAccessPoint, " + - "passpointName=$passpointProviderFriendlyName" - } else { - "" - } - - return "WifiNetworkModel.Active(networkId=$networkId, isValidated=$isValidated, " + - "level=$level, ssid=$ssid$passpointString)" } companion object { @@ -375,9 +316,6 @@ const val COL_LEVEL = "level" const val COL_NUM_LEVELS = "maxLevel" const val COL_SSID = "ssid" const val COL_HOTSPOT = "hotspot" -const val COL_PASSPOINT_ACCESS_POINT = "isPasspointAccessPoint" -const val COL_ONLINE_SIGN_UP = "isOnlineSignUpForPasspointAccessPoint" -const val COL_PASSPOINT_NAME = "passpointProviderFriendlyName" val LEVEL_DEFAULT: String? = null val NUM_LEVELS_DEFAULT: String? = null diff --git a/packages/SystemUI/tests/src/com/android/keyguard/CarrierTextManagerTest.java b/packages/SystemUI/tests/src/com/android/keyguard/CarrierTextManagerTest.java index a8ab922a90b9..4c872d8eec15 100644 --- a/packages/SystemUI/tests/src/com/android/keyguard/CarrierTextManagerTest.java +++ b/packages/SystemUI/tests/src/com/android/keyguard/CarrierTextManagerTest.java @@ -450,10 +450,7 @@ public class CarrierTextManagerTest extends SysuiTestCase { /* isValidated= */ false, /* level= */ 0, /* ssid= */ "", - /* hotspotDeviceType= */ WifiNetworkModel.HotspotDeviceType.NONE, - /* isPasspointAccessPoint= */ false, - /* isOnlineSignUpForPasspointAccessPoint= */ false, - /* passpointProviderFriendlyName= */ null)); + /* hotspotDeviceType= */ WifiNetworkModel.HotspotDeviceType.NONE)); assertTrue(mWifiRepository.isWifiConnectedWithValidSsid()); mKeyguardUpdateMonitor.mServiceStates = new HashMap<>(); diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/prod/WifiRepositoryImplTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/prod/WifiRepositoryImplTest.kt index f8d50f5e1ac2..9d73ad21485e 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/prod/WifiRepositoryImplTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/pipeline/wifi/data/repository/prod/WifiRepositoryImplTest.kt @@ -289,27 +289,6 @@ class WifiRepositoryImplTest : SysuiTestCase() { } @Test - fun accessPointInfo_alwaysFalse() = - testScope.runTest { - val latest by collectLastValue(underTest.wifiNetwork) - - val wifiEntry = - mock<WifiEntry>().apply { - whenever(this.isPrimaryNetwork).thenReturn(true) - whenever(this.level).thenReturn(3) - whenever(this.title).thenReturn(TITLE) - } - whenever(wifiPickerTracker.connectedWifiEntry).thenReturn(wifiEntry) - getCallback().onWifiEntriesChanged() - - assertThat(latest is WifiNetworkModel.Active).isTrue() - val latestActive = latest as WifiNetworkModel.Active - assertThat(latestActive.isPasspointAccessPoint).isFalse() - assertThat(latestActive.isOnlineSignUpForPasspointAccessPoint).isFalse() - assertThat(latestActive.passpointProviderFriendlyName).isNull() - } - - @Test fun wifiNetwork_unreachableLevel_inactiveNetwork() = testScope.runTest { val latest by collectLastValue(underTest.wifiNetwork) |