Use the new isNetworkSupported api for wifi-only
Didn't have an API for this before so people used a hacked system property (ro.carrier) to determine if the device supported mobile data. Added new API and switching callsites. bug:5087537 Change-Id: Ibd799559be102a9e2fd552d1a23d1afbcf8f4614
This commit is contained in:
@@ -378,7 +378,7 @@ public class BatteryHistoryChart extends View {
|
||||
mNumHist = lastInteresting;
|
||||
mHaveGps = (aggrStates&HistoryItem.STATE_GPS_ON_FLAG) != 0;
|
||||
mHaveWifi = (aggrStates&HistoryItem.STATE_WIFI_RUNNING_FLAG) != 0;
|
||||
if (!com.android.settings.Utils.isWifiOnly()) {
|
||||
if (!com.android.settings.Utils.isWifiOnly(getContext())) {
|
||||
mHavePhoneSignal = true;
|
||||
}
|
||||
if (mHistEnd <= mHistStart) mHistEnd = mHistStart+1;
|
||||
|
||||
@@ -713,7 +713,7 @@ public class PowerUsageSummary extends PreferenceFragment implements Runnable {
|
||||
addBluetoothUsage(uSecNow);
|
||||
addIdleUsage(uSecNow); // Not including cellular idle power
|
||||
// Don't compute radio usage if it's a wifi-only device
|
||||
if (!com.android.settings.Utils.isWifiOnly()) {
|
||||
if (!com.android.settings.Utils.isWifiOnly(getActivity())) {
|
||||
addRadioUsage(uSecNow);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user