Do update signal icon for -1 level in AddAppNetworksFragment
The level of a WifiEntry may be -1 (WIFI_LEVEL_UNREACHABLE) due to race conditions. Thus, only update the signal icon if the level is a valid value [0, 4] Bug: 213477566 Test: m Change-Id: I87f1c108d262bb5a7575c9ad434d2cfb953134af
This commit is contained in:
@@ -414,6 +414,9 @@ public class AddAppNetworksFragment extends InstrumentedFragment implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void updateSingleNetworkSignalIcon(int level) {
|
private void updateSingleNetworkSignalIcon(int level) {
|
||||||
|
if (level == WifiEntry.WIFI_LEVEL_UNREACHABLE) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// TODO: Check level of the network to show signal icon.
|
// TODO: Check level of the network to show signal icon.
|
||||||
final Drawable wifiIcon = mActivity.getDrawable(
|
final Drawable wifiIcon = mActivity.getDrawable(
|
||||||
Utils.getWifiIconResource(level)).mutate();
|
Utils.getWifiIconResource(level)).mutate();
|
||||||
|
Reference in New Issue
Block a user