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

Commit 51663f61 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Remove Service Manager Cache in Java" into main am: 16fcdb2f

parents e2db338b 16fcdb2f
Loading
Loading
Loading
Loading
+29 −20
Original line number Diff line number Diff line
@@ -2859,9 +2859,12 @@ public class ActivityManagerService extends IActivityManager.Stub
        if (isolated) {
            if (mIsolatedAppBindArgs == null) {
                mIsolatedAppBindArgs = new ArrayMap<>(1);
                // See b/79378449 about the following exemption.
                addServiceToMap(mIsolatedAppBindArgs, "package");
                if (!android.server.Flags.removeJavaServiceManagerCache()) {
                    addServiceToMap(mIsolatedAppBindArgs, "permissionmgr");
                }
            }
            return mIsolatedAppBindArgs;
        }
@@ -2871,9 +2874,8 @@ public class ActivityManagerService extends IActivityManager.Stub
            // Add common services.
            // IMPORTANT: Before adding services here, make sure ephemeral apps can access them too.
            // Enable the check in ApplicationThread.bindApplication() to make sure.
            addServiceToMap(mAppBindArgs, "package");
            if (!android.server.Flags.removeJavaServiceManagerCache()) {
                addServiceToMap(mAppBindArgs, "permissionmgr");
            addServiceToMap(mAppBindArgs, Context.WINDOW_SERVICE);
                addServiceToMap(mAppBindArgs, Context.ALARM_SERVICE);
                addServiceToMap(mAppBindArgs, Context.DISPLAY_SERVICE);
                addServiceToMap(mAppBindArgs, Context.NETWORKMANAGEMENT_SERVICE);
@@ -2893,6 +2895,13 @@ public class ActivityManagerService extends IActivityManager.Stub
                addServiceToMap(mAppBindArgs, "mount");
                addServiceToMap(mAppBindArgs, Context.PLATFORM_COMPAT_SERVICE);
            }
            // See b/79378449
            // Getting the window service and package service binder from servicemanager
            // is blocked for Apps. However they are necessary for apps.
            // TODO: remove exception
            addServiceToMap(mAppBindArgs, "package");
            addServiceToMap(mAppBindArgs, Context.WINDOW_SERVICE);
        }
        return mAppBindArgs;
    }
+8 −0
Original line number Diff line number Diff line
@@ -9,6 +9,14 @@ flag {
     bug: "324153471"
}

flag {
    name: "remove_java_service_manager_cache"
    namespace: "system_performance"
    description: "This flag turns off Java's Service Manager caching mechanism."
    bug: "333854840"
    is_fixed_read_only: true
}

flag {
     name: "remove_text_service"
     namespace: "wear_frameworks"