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

Commit ac49270f authored by Parth Sane's avatar Parth Sane
Browse files

Add more cachable service to libbinder cache

Adding Keystore, media_resource_monitor and
most services retrieved in
ActivityManagerService#getCommonServicesLocked

Removing some services which were incorrectly
added

Test: atest binderCacheUnitTest
Bug: 333854840
Flag: RELEASE_LIBBINDER_CLIENT_CACHE
Change-Id: I4622fd572373ddb2aabf54713e94719f1e139540
parent 69ec43c8
Loading
Loading
Loading
Loading
+18 −5
Original line number Diff line number Diff line
@@ -34,37 +34,47 @@ using AidlServiceManager = android::os::IServiceManager;
using IAccessor = android::os::IAccessor;

static const char* kStaticCachableList[] = {
        // go/keep-sorted start
        "accessibility",
        "account",
        "activity",
        "android.hardware.thermal.IThermal/default",
        "android.hardware.power.IPower/default",
        "android.frameworks.stats.IStats/default",
        "android.system.suspend.ISystemSuspend/default",
        "alarm",
        "android.system.keystore2.IKeystoreService/default",
        "appops",
        "audio",
        "batterystats",
        "carrier_config",
        "connectivity",
        "content",
        "content_capture",
        "device_policy",
        "display",
        "dropbox",
        "econtroller",
        "graphicsstats",
        "input",
        "input_method",
        "isub",
        "jobscheduler",
        "legacy_permission",
        "location",
        "media.extractor",
        "media.metrics",
        "media.player",
        "media.resource_manager",
        "media_resource_monitor",
        "mount",
        "netd_listener",
        "netstats",
        "network_management",
        "nfc",
        "notification",
        "package",
        "package_native",
        "performance_hint",
        "permission",
        "permissionmgr",
        "permission_checker",
        "permissionmgr",
        "phone",
        "platform_compat",
        "power",
@@ -76,9 +86,12 @@ static const char* kStaticCachableList[] = {
        "time_detector",
        "trust",
        "uimode",
        "user",
        "virtualdevice",
        "virtualdevice_native",
        "webviewupdate",
        "window",
        // go/keep-sorted end
};

bool BinderCacheWithInvalidation::isClientSideCachingEnabled(const std::string& serviceName) {