Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9a568e6f authored by Mitchell Wills's avatar Mitchell Wills
Browse files

Check if link stats are supported when reporting activity info

Bug: 23286362
Change-Id: I42c91d488acd39341a6874797788d3e5357f0270
parent fe6fd5d2
Loading
Loading
Loading
Loading
+1 −10
Original line number Diff line number Diff line
@@ -1086,17 +1086,8 @@ public class WifiManager {
    public WifiActivityEnergyInfo getControllerActivityEnergyInfo(int updateType) {
        if (mService == null) return null;
        try {
            WifiActivityEnergyInfo record;
            if (!isEnhancedPowerReportingSupported()) {
                return null;
            }
            synchronized(this) {
                record = mService.reportActivityInfo();
                if (record != null && record.isValid()) {
                    return record;
                } else {
                    return null;
                }
                return mService.reportActivityInfo();
            }
        } catch (RemoteException e) {
            Log.e(TAG, "getControllerActivityEnergyInfo: " + e);