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

Commit ba2b2a78 authored by Adam Bookatz's avatar Adam Bookatz
Browse files

Fix Wifi AccessPoint getAppLabel userId

The wrong userId was being used. We fix it.

Bug: 382527546
Test: ?
Flag: EXEMPT bugfix
Change-Id: Ic2f9947bf55be15ab83288d1fd77e9e9948f67d9
parent 441143d1
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import static android.net.wifi.WifiConfiguration.NetworkSelectionStatus.NETWORK_

import android.annotation.IntDef;
import android.annotation.MainThread;
import android.app.ActivityManager;
import android.app.AppGlobals;
import android.content.Context;
import android.content.pm.ApplicationInfo;
@@ -1643,7 +1644,7 @@ public class AccessPoint implements Comparable<AccessPoint> {
        CharSequence appLabel = "";
        ApplicationInfo appInfo = null;
        try {
            int userId = UserHandle.getUserId(UserHandle.USER_CURRENT);
            int userId = ActivityManager.getCurrentUser();
            appInfo = packageManager.getApplicationInfoAsUser(packageName, 0 /* flags */, userId);
        } catch (PackageManager.NameNotFoundException e) {
            Log.e(TAG, "Failed to get app info", e);