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

Commit e542e0cb authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Set installed flag of all users if system app is installed later" into nyc-dev

parents 52036c74 ea3064a5
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -718,6 +718,21 @@ final class Settings {
                    // let's log a message about it.
                    Slog.i(PackageManagerService.TAG, "Package " + name + " codePath changed from "
                            + p.codePath + " to " + codePath + "; Retaining data and using new");

                    // The owner user's installed flag is set false
                    // when the application was installed by other user
                    // and the installed flag is not updated
                    // when the application is appended as system app later.
                    if ((pkgFlags & ApplicationInfo.FLAG_SYSTEM) != 0 &&
                            getDisabledSystemPkgLPr(name) == null) {
                        List<UserInfo> allUserInfos = getAllUsers();
                        if (allUserInfos != null) {
                            for (UserInfo userInfo : allUserInfos) {
                                p.setInstalled(true, userInfo.id);
                            }
                        }
                    }

                    /*
                     * Since we've changed paths, we need to prefer the new
                     * native library path over the one stored in the