Merge "Don't show the Wi-Fi icon when Wi-Fi is off" into main

This commit is contained in:
Treehugger Robot
2024-06-14 03:58:01 +00:00
committed by Android (Google) Code Review

View File

@@ -555,6 +555,9 @@ public class WifiDetailPreferenceController2 extends AbstractPreferenceControlle
int deviceType = ((HotspotNetworkEntry) wifiEntry).getDeviceType(); int deviceType = ((HotspotNetworkEntry) wifiEntry).getDeviceType();
return mContext.getDrawable(getHotspotIconResource(deviceType)); return mContext.getDrawable(getHotspotIconResource(deviceType));
} }
if (mWifiEntry.getLevel() == WifiEntry.WIFI_LEVEL_UNREACHABLE) {
return mContext.getDrawable(R.drawable.empty_icon);
}
return mIconInjector.getIcon(wifiEntry.shouldShowXLevelIcon(), wifiEntry.getLevel()); return mIconInjector.getIcon(wifiEntry.shouldShowXLevelIcon(), wifiEntry.getLevel());
} }