summaryrefslogtreecommitdiff
path: root/tools/preload/Policy.java
diff options
context:
space:
mode:
Diffstat (limited to 'tools/preload/Policy.java')
-rw-r--r--tools/preload/Policy.java56
1 files changed, 14 insertions, 42 deletions
diff --git a/tools/preload/Policy.java b/tools/preload/Policy.java
index 554966b88731..ade889e3e44b 100644
--- a/tools/preload/Policy.java
+++ b/tools/preload/Policy.java
@@ -24,47 +24,32 @@ import java.util.Set;
public class Policy {
/**
- * This location (in the build system) of the preloaded-classes file.
- */
- private static final String PRELOADED_CLASS_FILE = "frameworks/base/preloaded-classes";
-
- /**
- * The internal process name of the system process. Note, this also shows up as
- * "system_process", e.g. in ddms.
+ * No constructor - use static methods only
*/
- private static final String SYSTEM_SERVER_PROCESS_NAME = "system_server";
+ private Policy() {}
- /**
- * Names of non-application processes - these will not be checked for preloaded classes.
- *
- * TODO: Replace this hardcoded list with a walk up the parent chain looking for zygote.
+ /**
+ * This location (in the build system) of the preloaded-classes file.
*/
- private static final Set<String> NOT_FROM_ZYGOTE = new HashSet<String>(Arrays.asList(
- "zygote",
- "dexopt",
- "unknown",
- SYSTEM_SERVER_PROCESS_NAME,
- "com.android.development",
- "app_process" // am & other shell commands
- ));
+ private static final String PRELOADED_CLASS_FILE
+ = "frameworks/base/preloaded-classes";
- /**
- * Long running services. These are restricted in their contribution to the preloader
- * because their launch time is less critical.
+ /**
+ * Long running services. These are restricted in their contribution to the
+ * preloader because their launch time is less critical.
*/
private static final Set<String> SERVICES = new HashSet<String>(Arrays.asList(
- SYSTEM_SERVER_PROCESS_NAME,
- "com.android.acore",
- // Commented out to make sure DefaultTimeZones gets preloaded.
- // "com.android.phone",
+ "system_server",
"com.google.process.content",
- "android.process.media"
+ "android.process.media",
+ "com.google.process.gapps"
));
/**
* Classes which we shouldn't load from the Zygote.
*/
- private static final Set<String> EXCLUDED_CLASSES = new HashSet<String>(Arrays.asList(
+ private static final Set<String> EXCLUDED_CLASSES
+ = new HashSet<String>(Arrays.asList(
// Binders
"android.app.AlarmManager",
"android.app.SearchManager",
@@ -75,15 +60,9 @@ public class Policy {
"android.os.AsyncTask",
"android.pim.ContactsAsyncHelper",
"java.lang.ProcessManager"
-
));
/**
- * No constructor - use static methods only
- */
- private Policy() {}
-
- /**
* Returns the path/file name of the preloaded classes file that will be written
* by WritePreloadedClassFile.
*/
@@ -92,13 +71,6 @@ public class Policy {
}
/**
- * Reports if a given process name was created from zygote
- */
- public static boolean isFromZygote(String processName) {
- return !NOT_FROM_ZYGOTE.contains(processName);
- }
-
- /**
* Reports if the given process name is a "long running" process or service
*/
public static boolean isService(String processName) {