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

Commit e6a65ac4 authored by Andy Hung's avatar Andy Hung
Browse files

ServiceUtilities:UidInfo: Fix accepted uid names

Avoid looking up installer for "android." packages,
which increases boot time.

Test: atest google/perf/boottime/boottime-test
Bug: 147386133
Change-Id: I8e7461d85dd5d5cba9c77f10d35e138407a550a1
parent ee32ea42
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -416,6 +416,8 @@ mediautils::UidInfo::Info mediautils::UidInfo::getInfo(uid_t uid)
        } else if (strchr(pkg.c_str(), '.') == nullptr) {
            // not of form 'com.whatever...'; assume internal
            // so we don't need to look it up in package manager.
        } else if (strncmp(pkg.c_str(), "android.", 8) == 0) {
            // android.* packages are assumed fine
        } else if (package_mgr.get() != nullptr) {
            String16 pkgName16(pkg.c_str());
            binder::Status status = package_mgr->getInstallerForPackage(pkgName16, &installer);