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

Commit 2c84cfc0 authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

Various performance and other work.

- IME service now switches between visible and perceptible depending on
  whether it is being showm, allowing us to more aggressively free its
  memory when not shown.

- The activity display time is no longer delayed by the activity
  transition animation.

- New -R (repeat) option for launching activities with the am command.

- Improved some documentation on Loader to be clear about some methods
  that apps should not normally call.

- FrameworkPerf test now allows you to select individual tests to run.

Change-Id: Id1f73de66dc93d63212183958a72119ad174318b
parent dd79b4c8
Loading
Loading
Loading
Loading

api/15.txt

0 → 100644
+46591 −0

File added.

Preview size limit exceeded, changes collapsed.

+1 −1
Original line number Diff line number Diff line
@@ -5087,7 +5087,7 @@ package android.content {
    field public static final java.lang.String ALARM_SERVICE = "alarm";
    field public static final java.lang.String AUDIO_SERVICE = "audio";
    field public static final int BIND_ABOVE_CLIENT = 8; // 0x8
    field public static final int BIND_ADJUST_WITH_ACTIVITY = 64; // 0x40
    field public static final int BIND_ADJUST_WITH_ACTIVITY = 128; // 0x80
    field public static final int BIND_ALLOW_OOM_MANAGEMENT = 16; // 0x10
    field public static final int BIND_AUTO_CREATE = 1; // 0x1
    field public static final int BIND_DEBUG_UNBIND = 2; // 0x2
+137 −123
Original line number Diff line number Diff line
@@ -60,6 +60,8 @@ public class Am {
    private boolean mWaitOption = false;
    private boolean mStopOption = false;

    private int mRepeat = 0;

    private String mProfileFile;
    private boolean mProfileAutoStop;

@@ -133,6 +135,7 @@ public class Am {
        mDebugOption = false;
        mWaitOption = false;
        mStopOption = false;
        mRepeat = 0;
        mProfileFile = null;
        Uri data = null;
        String type = null;
@@ -263,6 +266,8 @@ public class Am {
            } else if (opt.equals("--start-profiler")) {
                mProfileFile = nextArgRequired();
                mProfileAutoStop = false;
            } else if (opt.equals("-R")) {
                mRepeat = Integer.parseInt(nextArgRequired());
            } else if (opt.equals("-S")) {
                mStopOption = true;
            } else {
@@ -335,6 +340,7 @@ public class Am {
            mimeType = mAm.getProviderMimeType(intent.getData());
        }

        do {
            if (mStopOption) {
                String packageName;
                if (intent.getComponent() != null) {
@@ -467,6 +473,11 @@ public class Am {
                }
                System.out.println("Complete");
            }
            mRepeat--;
            if (mRepeat > 1) {
                mAm.unhandledBack();
            }
        } while (mRepeat > 1);
    }

    private void runForceStop() throws Exception {
@@ -1164,7 +1175,8 @@ public class Am {
    private static void showUsage() {
        System.err.println(
                "usage: am [subcommand] [options]\n" +
                "usage: am start [-D] [-W] [-P <FILE>] [--start-profiler <FILE>] [-S] <INTENT>\n" +
                "usage: am start [-D] [-W] [-P <FILE>] [--start-profiler <FILE>]\n" +
                "               [--R COUNT] [-S] <INTENT>\n" +
                "       am startservice <INTENT>\n" +
                "       am force-stop <PACKAGE>\n" +
                "       am broadcast <INTENT>\n" +
@@ -1182,6 +1194,8 @@ public class Am {
                "    -W: wait for launch to complete\n" +
                "    --start-profiler <FILE>: start profiler and send results to <FILE>\n" +
                "    -P <FILE>: like above, but profiling stops when app goes idle\n" +
                "    -R: repeat the activity launch <COUNT> times.  Prior to each repeat,\n" +
                "        the top activity will be finished.\n" +
                "    -S: force stop the target app before starting the activity\n" +
                "\n" +
                "am startservice: start a Service.\n" +
+8 −1
Original line number Diff line number Diff line
@@ -185,7 +185,14 @@ public abstract class Context {
     * used to reduce the amount that the client process's overall importance
     * is used to impact it.
     */
    public static final int BIND_ADJUST_WITH_ACTIVITY = 0x0040;
    public static final int BIND_ADJUST_WITH_ACTIVITY = 0x0080;

    /**
     * Flag for {@link #bindService}: Don't consider the bound service to be
     * visible, even if the caller is visible.
     * @hide
     */
    public static final int BIND_NOT_VISIBLE = 0x40000000;

    /** Return an AssetManager instance for your application's package. */
    public abstract AssetManager getAssets();
+25 −1
Original line number Diff line number Diff line
@@ -183,6 +183,12 @@ public class Loader<D> {
    }

    /**
     * This function will normally be called for you automatically by
     * {@link android.app.LoaderManager} when the associated fragment/activity
     * is being started.  When using a Loader with {@link android.app.LoaderManager},
     * you <em>must not</em> call this method yourself, or you will conflict
     * with its management of the Loader.
     *
     * Starts an asynchronous load of the Loader's data. When the result
     * is ready the callbacks will be called on the process's main thread.
     * If a previous load has been completed and is still valid
@@ -232,7 +238,13 @@ public class Loader<D> {
    }

    /**
     * Stops delivery of updates until the next time {@link #startLoading()} is called.
     * This function will normally be called for you automatically by
     * {@link android.app.LoaderManager} when the associated fragment/activity
     * is being stopped.  When using a Loader with {@link android.app.LoaderManager},
     * you <em>must not</em> call this method yourself, or you will conflict
     * with its management of the Loader.
     *
     * <p>Stops delivery of updates until the next time {@link #startLoading()} is called.
     * Implementations should <em>not</em> invalidate their data at this point --
     * clients are still free to use the last data the loader reported.  They will,
     * however, typically stop reporting new data if the data changes; they can
@@ -260,6 +272,12 @@ public class Loader<D> {
    }

    /**
     * This function will normally be called for you automatically by
     * {@link android.app.LoaderManager} when restarting a Loader.  When using
     * a Loader with {@link android.app.LoaderManager},
     * you <em>must not</em> call this method yourself, or you will conflict
     * with its management of the Loader.
     *
     * Tell the Loader that it is being abandoned.  This is called prior
     * to {@link #reset} to have it retain its current data but not report
     * any new data.
@@ -282,6 +300,12 @@ public class Loader<D> {
    }
    
    /**
     * This function will normally be called for you automatically by
     * {@link android.app.LoaderManager} when destroying a Loader.  When using
     * a Loader with {@link android.app.LoaderManager},
     * you <em>must not</em> call this method yourself, or you will conflict
     * with its management of the Loader.
     *
     * Resets the state of the Loader.  The Loader should at this point free
     * all of its resources, since it may never be called again; however, its
     * {@link #startLoading()} may later be called at which point it must be
Loading