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
This commit is contained in:
@@ -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";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user