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

Commit 19f22d59 authored by Makoto Onuki's avatar Makoto Onuki
Browse files

Support per-process Application class (AM and client side)

Now the <process> tag supports `android:name`, which takes a custom
Application class name. If omitted, the system defaults to the
class set in the <application> tag, or the default class which is
`android.app.Application`.

Bug: 197264681
Test: atest CtsProcessTest
Change-Id: I0650a4a7c75dc37c00875e4f0ac53656f1cbeac9
parent 236abad7
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1352,7 +1352,9 @@ public final class LoadedApk {

        Application app = null;

        String appClass = mApplicationInfo.className;
        final String myProcessName = Process.myProcessName();
        String appClass = mApplicationInfo.getCustomApplicationClassNameForProcess(
                myProcessName);
        if (forceDefaultAppClass || (appClass == null)) {
            appClass = "android.app.Application";
        }