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

Commit f1acb2dd authored by Robert Greenwalt's avatar Robert Greenwalt
Browse files

Add a little logging to diagnose wifi cycle bug

Hiroshi approved (with serious code review).
bug: 2171575
parent febb94cd
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -1702,6 +1702,8 @@ public class WifiService extends IWifiManager.Stub {
    }

    private boolean acquireWifiLockLocked(WifiLock wifiLock) {
        Log.d(TAG, "acquireWifiLockLocked: " + wifiLock);

        mLocks.addLock(wifiLock);

        int uid = Binder.getCallingUid();
@@ -1737,6 +1739,9 @@ public class WifiService extends IWifiManager.Stub {
        boolean hadLock;

        WifiLock wifiLock = mLocks.removeLock(lock);

        Log.d(TAG, "releaseWifiLockLocked: " + wifiLock);

        hadLock = (wifiLock != null);

        if (hadLock) {
@@ -1758,7 +1763,7 @@ public class WifiService extends IWifiManager.Stub {
                Binder.restoreCallingIdentity(ident);
            }
        }
        
        // TODO - should this only happen if you hadLock?
        updateWifiState();
        return hadLock;
    }