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

Commit 528308d4 authored by Suprabh Shukla's avatar Suprabh Shukla
Browse files

Use my uid to filter application info

Passing the user is a mistake and would result in using 0, 10, 11 as the
filtering uids.

The calling code already checks that the caller has requisite
permissions to report the change.

Test: atest PlatformCompatGating

Bug: 184390547
Change-Id: I351db5c222c24348b8f98db618c959348842b956
parent a7807022
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ import android.content.pm.PackageManagerInternal;
import android.net.Uri;
import android.os.Binder;
import android.os.Build;
import android.os.Process;
import android.os.RemoteException;
import android.os.UserHandle;
import android.util.Slog;
@@ -359,7 +360,7 @@ public class PlatformCompat extends IPlatformCompat.Stub {

    private ApplicationInfo getApplicationInfo(String packageName, int userId) {
        return LocalServices.getService(PackageManagerInternal.class).getApplicationInfo(
                packageName, 0, userId, userId);
                packageName, 0, Process.myUid(), userId);
    }

    private void killPackage(String packageName) {