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

Commit 3d52eb7f authored by Robert Greenwalt's avatar Robert Greenwalt Committed by Android Git Automerger
Browse files

am 14e55996: Merge "Fix Batched Scan Results to give Timestamp in uS" into klp-dev

* commit '14e55996':
  Fix Batched Scan Results to give Timestamp in uS
parents d8fcc795 14e55996
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -65,6 +65,7 @@ import android.os.PowerManager;
import android.os.Process;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.SystemClock;
import android.os.SystemProperties;
import android.os.UserHandle;
import android.os.WorkSource;
@@ -1016,7 +1017,7 @@ public class WifiStateMachine extends StateMachine {
            int dist, distSd;
            long tsf = 0;
            dist = distSd = ScanResult.UNSPECIFIED;
            long now = System.currentTimeMillis();
            long now = SystemClock.elapsedRealtime();

            while (true) {
                while (n < splitData.length) {
@@ -1064,6 +1065,7 @@ public class WifiStateMachine extends StateMachine {
                    } else if (splitData[n].startsWith(AGE)) {
                        try {
                            tsf = now - Long.parseLong(splitData[n].substring(AGE.length()));
                            tsf *= 1000; // convert mS -> uS
                        } catch (NumberFormatException e) {
                            loge("Invalid timestamp: " + splitData[n]);
                            tsf = 0;