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

Commit 629fed4e authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "[PM] Fix the profile issue for PIA V2" into main

parents c892ddf1 1fdf0843
Loading
Loading
Loading
Loading
+11 −8
Original line number Diff line number Diff line
@@ -144,8 +144,10 @@ class UninstallRepository(private val context: Context) {
        if (uninstalledUser == null) {
            uninstalledUser = Process.myUserHandle()
        } else {
            val profiles = userManager!!.userProfiles
            if (!profiles.contains(uninstalledUser)) {
            if (uninstalledUser!! != Process.myUserHandle()) {
                val isCurrentUserProfileOwner =
                    Process.myUserHandle() == userManager!!.getProfileParent(uninstalledUser!!)
                if (!isCurrentUserProfileOwner) {
                    Log.e(
                        LOG_TAG,
                        "User " + Process.myUserHandle() + " can't request uninstall " +
@@ -154,6 +156,7 @@ class UninstallRepository(private val context: Context) {
                    return UninstallAborted(UninstallAborted.ABORT_REASON_USER_NOT_ALLOWED)
                }
            }
        }

        callback = intent.getParcelableExtra(
            PackageInstaller.EXTRA_CALLBACK, PackageManager.UninstallCompleteCallback::class.java