WiFi: Replace -1 with LINK_SPEED_UNKNOWN constant
Defined constant LINK_SPEED_UNKNOWN = -1 in WiFiInfo for unknown link speeds. So replacing -1 with this new macro. Bug: 124302657 Test: Connect STA to AP and verify the link speeds in network details. Change-Id: Ie21069984adb02420ca55b08a8cb161aaad2b7b3
This commit is contained in:
@@ -429,7 +429,7 @@ public class WifiDetailPreferenceControllerTest {
|
||||
|
||||
@Test
|
||||
public void linkSpeedPref_shouldNotShowIfNotSet() {
|
||||
when(mockWifiInfo.getTxLinkSpeedMbps()).thenReturn(-1);
|
||||
when(mockWifiInfo.getTxLinkSpeedMbps()).thenReturn(WifiInfo.LINK_SPEED_UNKNOWN);
|
||||
|
||||
displayAndResume();
|
||||
|
||||
@@ -447,7 +447,7 @@ public class WifiDetailPreferenceControllerTest {
|
||||
|
||||
@Test
|
||||
public void rxLinkSpeedPref_shouldNotShowIfNotSet() {
|
||||
when(mockWifiInfo.getRxLinkSpeedMbps()).thenReturn(-1);
|
||||
when(mockWifiInfo.getRxLinkSpeedMbps()).thenReturn(WifiInfo.LINK_SPEED_UNKNOWN);
|
||||
|
||||
displayAndResume();
|
||||
|
||||
|
Reference in New Issue
Block a user