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

Commit 3849490c authored by Irfan Sheriff's avatar Irfan Sheriff Committed by Android (Google) Code Review
Browse files

Merge "Return empty scan results for background user" into jb-mr1-dev

parents df5bdd72 330b1875
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.server;

import android.app.ActivityManager;
import android.app.AlarmManager;
import android.app.Notification;
import android.app.NotificationManager;
@@ -55,6 +56,7 @@ import android.os.Message;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.SystemProperties;
import android.os.UserHandle;
import android.os.WorkSource;
import android.provider.Settings;
import android.text.TextUtils;
@@ -834,8 +836,12 @@ public class WifiService extends IWifiManager.Stub {
     */
    public List<ScanResult> getScanResults() {
        enforceAccessPermission();
        if (UserHandle.getCallingUserId() != ActivityManager.getCurrentUser()) {
            return new ArrayList<ScanResult>();
        } else {
            return mWifiStateMachine.syncGetScanResultsList();
        }
    }

    /**
     * Tell the supplicant to persist the current list of configured networks.