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

Commit a09bb0d2 authored by Jesse Wilson's avatar Jesse Wilson Committed by Android (Google) Code Review
Browse files

Merge "New update of preloaded classes for Froyo."

parents 68aea824 e9fcaa06
Loading
Loading
Loading
Loading
+705 −560

File changed.

Preview size limit exceeded, changes collapsed.

+20.7 MiB

File added.

No diff preview for this file type.

+2 −2
Original line number Diff line number Diff line
@@ -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;
                }
+6 −1
Original line number Diff line number Diff line
@@ -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"
    ));
+17 −0
Original line number Diff line number Diff line
@@ -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,
@@ -75,6 +88,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(":");