summaryrefslogtreecommitdiffstats
path: root/tools/preload
diff options
context:
space:
mode:
authorJesse Wilson <jessewilson@google.com>2010-02-23 17:06:58 -0800
committerJesse Wilson <jessewilson@google.com>2010-02-24 15:50:05 -0800
commite9fcaa0697dcb257d0288118347f721ce8806b55 (patch)
treef454ddf387fc3a299d9e06ae40fa01af3e0eb6af /tools/preload
parent4bd222f1072513b21cd66d6f983ebdccb6d9b0c8 (diff)
downloadframeworks_base-e9fcaa0697dcb257d0288118347f721ce8806b55.zip
frameworks_base-e9fcaa0697dcb257d0288118347f721ce8806b55.tar.gz
frameworks_base-e9fcaa0697dcb257d0288118347f721ce8806b55.tar.bz2
New update of preloaded classes for Froyo.
Diffstat (limited to 'tools/preload')
-rw-r--r--tools/preload/20100223.compiledbin0 -> 21723744 bytes
-rw-r--r--tools/preload/MemoryUsage.java4
-rw-r--r--tools/preload/Policy.java7
-rw-r--r--tools/preload/Record.java17
4 files changed, 25 insertions, 3 deletions
diff --git a/tools/preload/20100223.compiled b/tools/preload/20100223.compiled
new file mode 100644
index 0000000..3056388
--- /dev/null
+++ b/tools/preload/20100223.compiled
Binary files differ
diff --git a/tools/preload/MemoryUsage.java b/tools/preload/MemoryUsage.java
index bc21b6f..d8f95f4 100644
--- a/tools/preload/MemoryUsage.java
+++ b/tools/preload/MemoryUsage.java
@@ -166,7 +166,7 @@ class MemoryUsage implements Serializable {
+ ":/system/framework/loadclass.jar";
private static final String[] GET_DIRTY_PAGES = {
- "adb", "-e", "shell", "dalvikvm", CLASS_PATH, "LoadClass" };
+ "adb", "shell", "dalvikvm", CLASS_PATH, "LoadClass" };
/**
* Measures memory usage for the given class.
@@ -248,7 +248,7 @@ class MemoryUsage implements Serializable {
String line = in.readLine();
if (line == null || !line.startsWith("DECAFBAD,")) {
System.err.println("Got bad response for " + className
- + ": " + line);
+ + ": " + line + "; command was " + Arrays.toString(commands));
errorCount += 1;
return NOT_AVAILABLE;
}
diff --git a/tools/preload/Policy.java b/tools/preload/Policy.java
index a8d761d..f557365 100644
--- a/tools/preload/Policy.java
+++ b/tools/preload/Policy.java
@@ -43,9 +43,14 @@ public class Policy {
"system_server",
"com.google.process.content",
"android.process.media",
+ "com.android.bluetooth",
+ "com.android.calendar",
+ "com.android.inputmethod.latin",
"com.android.phone",
- "com.google.android.apps.maps.FriendService",
+ "com.google.android.apps.maps.FriendService", // pre froyo
+ "com.google.android.apps.maps:FriendService", // froyo
"com.google.android.apps.maps.LocationFriendService",
+ "com.google.android.deskclock",
"com.google.process.gapps",
"android.tts"
));
diff --git a/tools/preload/Record.java b/tools/preload/Record.java
index b2be4d4..9d45a26 100644
--- a/tools/preload/Record.java
+++ b/tools/preload/Record.java
@@ -19,6 +19,19 @@
*/
class Record {
+ /**
+ * The delimiter character we use, {@code :}, conflicts with some other
+ * names. In that case, manually replace the delimiter with something else.
+ */
+ private static final String[] REPLACE_CLASSES = {
+ "com.google.android.apps.maps:FriendService",
+ "com.google.android.apps.maps\\u003AFriendService",
+ "com.google.android.apps.maps:driveabout",
+ "com.google.android.apps.maps\\u003Adriveabout",
+ "com.google.android.apps.maps:LocationFriendService",
+ "com.google.android.apps.maps\\u003ALocationFriendService",
+ };
+
enum Type {
/** Start of initialization. */
START_LOAD,
@@ -74,6 +87,10 @@ class Record {
}
sourceLineNumber = lineNum;
+
+ for (int i = 0; i < REPLACE_CLASSES.length; i+= 2) {
+ line = line.replace(REPLACE_CLASSES[i], REPLACE_CLASSES[i+1]);
+ }
line = line.substring(1);
String[] parts = line.split(":");