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

Commit 3bcd093f authored by Alex Buynytskyy's avatar Alex Buynytskyy Committed by Android (Google) Code Review
Browse files

Merge "Postpone AppOps call to fix deadlock." into main

parents e52b6885 13b8fd16
Loading
Loading
Loading
Loading
+11 −8
Original line number Diff line number Diff line
@@ -2860,14 +2860,17 @@ final class InstallPackageHelper {
                mPm.notifyPackageChanged(packageName, request.getAppId());
            }

            for (int userId : firstUserIds) {
            // Apply restricted settings on potentially dangerous packages. Needs to happen
            // after appOpsManager is notified of the new package
            if (request.getPackageSource() == PackageInstaller.PACKAGE_SOURCE_LOCAL_FILE
                    || request.getPackageSource()
                    == PackageInstaller.PACKAGE_SOURCE_DOWNLOADED_FILE) {
                    enableRestrictedSettings(packageName, request.getAppId(), userId);
                final int appId = request.getAppId();
                mPm.mHandler.post(() -> {
                    for (int userId : firstUserIds) {
                        enableRestrictedSettings(packageName, appId, userId);
                    }
                });
            }

            // Log current value of "unknown sources" setting