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

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

am db831da4: Fix permission accessing getCurrentUser

* commit 'db831da4':
  Fix permission accessing getCurrentUser
parents e116c78b db831da4
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -836,7 +836,11 @@ public class WifiService extends IWifiManager.Stub {
     */
    public List<ScanResult> getScanResults() {
        enforceAccessPermission();
        if (UserHandle.getCallingUserId() != ActivityManager.getCurrentUser()) {
        int userId = UserHandle.getCallingUserId();
        long ident = Binder.clearCallingIdentity();
        int currentUser = ActivityManager.getCurrentUser();
        Binder.restoreCallingIdentity(ident);
        if (userId != currentUser) {
            return new ArrayList<ScanResult>();
        } else {
            return mWifiStateMachine.syncGetScanResultsList();