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

Commit 0f0e58cc authored by Irfan Sheriff's avatar Irfan Sheriff Committed by Android Git Automerger
Browse files

am 1fa0aa29: am 89c82814: Merge "Add restoreCallingIdentity under finally" into jb-mr1-dev

* commit '1fa0aa29':
  Add restoreCallingIdentity under finally
parents 00c4b0c0 1fa0aa29
Loading
Loading
Loading
Loading
+14 −8
Original line number Diff line number Diff line
@@ -640,8 +640,11 @@ public class WifiService extends IWifiManager.Stub {
         */

        long ident = Binder.clearCallingIdentity();
        try {
            handleWifiToggled(enable);
        } finally {
            Binder.restoreCallingIdentity(ident);
        }

        if (enable) {
            if (!mIsReceiverRegistered) {
@@ -838,13 +841,16 @@ public class WifiService extends IWifiManager.Stub {
        enforceAccessPermission();
        int userId = UserHandle.getCallingUserId();
        long ident = Binder.clearCallingIdentity();
        try {
            int currentUser = ActivityManager.getCurrentUser();
        Binder.restoreCallingIdentity(ident);
            if (userId != currentUser) {
                return new ArrayList<ScanResult>();
            } else {
                return mWifiStateMachine.syncGetScanResultsList();
            }
        } finally {
            Binder.restoreCallingIdentity(ident);
        }
    }

    /**