43 Commits

Author SHA1 Message Date
Mike J. Chen
3a2ce935b9 Add the ability to pass float extras to AM.
commit 43a2825a283e29c0f70100146394957af0598b0e
Author: John Grossman <johngro@google.com>
Date:   Wed Apr 27 09:03:53 2011 -0700

    Add the ability to pass float extras to AM.

    Change-Id: I970ad3f76a65bd781099204019095c73ed8c09db

Signed-off-by: Mike J. Chen <mjchen@google.com>
Signed-off-by: John Grossman <johngro@google.com>

Conflicts:

	cmds/am/src/com/android/commands/am/Am.java
2012-02-10 12:03:53 -08:00
Amith Yamasani
742a671273 Multi-user - 1st major checkin
Switching activity stacks
Cache ContentProvider per user
Long-press power to switch users (on phone)

Added ServiceMap for separating services by user
Launch PendingIntents on the correct user's uid
Fix task switching from Recents list
AppWidgetService is mostly working.

Commands added to pm and am to allow creating and switching profiles.

Change-Id: I15810e8cfbe50a04bd3323a7ef5a8ff4230870ed
2012-02-03 12:01:47 -08:00
Dianne Hackborn
f5b8671c34 Fix issue #5714517: App shortcuts can result in bad task intents
New API to let you build an Intent whose base configuration is correct,
but has an additional "selector" to pick out the specific app that you
would like launched.

Change-Id: Ide9db6dc60e2844b7696cfe09b28337fe7dd63db
2011-12-05 17:42:41 -08:00
Dianne Hackborn
d8c98fee02 Improve low memory dropbox reporting.
The msg is now constructed to try to bin these reports in
interesting ways.  We'll see.  Also change the tag name from
watchdog to lowmem, since sharkey is kindly taking care of
the back-end to handle this.

Improve how we put processes into low memory states to better
poke things like home and the previous app.

Also clean up some debug output, and add a few new am comment
options for controlling the current debug app.

Change-Id: I562a931a95244a2727bb7a6e1fd80dec259cdae2
2011-11-15 14:15:58 -08:00
Dianne Hackborn
e4d4fbc8c0 Add drop box reports of low memory.
We are tagging these as "watchdog" to make them visible in the
reporting tools.

Also new am command to kill all background processes, mostly to make
it easier to test this stuff.

Change-Id: Ib9dc4747cd8bd44156fdf11d6a087cd4272203eb
2011-11-08 15:44:34 -08:00
Dianne Hackborn
2c84cfc001 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
2011-10-31 16:52:34 -07:00
Dianne Hackborn
0bb1e9139e Small improvements to am command.
The start command can now take a package name or component name
for easier starting.  New -S option allows you to force stop an
app before starting it.

Change-Id: I5c55b34dd794783f0f5f51851dc811b8c1b39b76
2011-08-16 13:24:53 -07:00
Dianne Hackborn
62f20ecf49 Add new am option to profile the launching of an activity.
Change-Id: Ie71a8043eafe41f53a0b3dbb5170276d87acbc9b
2011-08-15 17:55:57 -07:00
Romain Guy
7eabe55db6 Add looper profiling to adb shell am
To profile the looper, run the following command:

adb shell am profile looper start <process> <file>
adb shell am profile looper stop <process>

Change-Id: I781f156e473d7bdbb6d13aaffeeaae88bc01a69f
2011-07-21 14:56:34 -07:00
Guang Zhu
8ffb0c0210 allow Uri as intent extra in am command
When composing an intent using am command line, certain extra fields
need to be added as a Uri (a Parceable in fact).

This patch adds a "--eu" parameter so that the provided value is
parsed as a Uri then added into intent's extra bundle.

Change-Id: I7110829554962d314aa58fd25083dd5041680a73
2011-07-07 22:50:54 -07:00
Dianne Hackborn
46d110329e Small cleanup of am/pm commands.
Change-Id: I5af730bc177635821a82d4dd3ec9130a5dcd525a
2011-06-24 13:22:45 -07:00
Xianzhu Wang
351f32270a Add force-stop subcommand for 'am'.
It's useful for some testing and debugging, to ensure all processes
are stopped before testing. 'kill' doesn't always work because sometimes the
system will restart the process immediately (e.g. if an app is running in
background).

Change-Id: I2c0caa38f74ee65ad6c35172fbf505227be7e7c3
2011-05-27 10:26:04 +08:00
Dianne Hackborn
7916ac65dc Add new command line option to change global screen size.
For example:

adb shell am display-size 1024x600

Change-Id: I5df462acd3323bdaaaefa3126faea7dd8595b726
2011-05-16 20:55:41 -07:00
Dianne Hackborn
0f1de9adde New compat mode front end: UI and persistence.
Adds a really crappy UI for toggling compat mode.

Persists compat mode selection across boots.

Turns on compat mode by default for newly installed apps.

Change-Id: Idc83494397bd17c41450bc9e9a05e4386c509399
2011-05-12 13:28:45 -07:00
Dianne Hackborn
e2515eebf4 Better compat mode part one: start scaling windows.
First step of improving app screen size compatibility mode.  When
running in compat mode, an application's windows are scaled up on
the screen rather than being small with 1:1 pixels.

Currently we scale the application to fill the entire screen, so
don't use an even pixel scaling.  Though this may have some
negative impact on the appearance (it looks okay to me), it has a
big benefit of allowing us to now treat these apps as normal
full-screens apps and do the normal transition animations as you
move in and out and around in them.

This introduces fun stuff in the input system to take care of
modifying pointer coordinates to account for the app window
surface scaling.  The input dispatcher is told about the scale
that is being applied to each window and, when there is one,
adjusts pointer events appropriately as they are being sent
to the transport.

Also modified is CompatibilityInfo, which has been greatly
simplified to not be so insane and incomprehendible.  It is
now simple -- when constructed it determines if the given app
is compatible with the current screen size and density, and
that is that.

There are new APIs on ActivityManagerService to put applications
that we would traditionally consider compatible with larger screens
in compatibility mode.  This is the start of a facility to have
a UI affordance for a user to switch apps in and out of
compatibility.

To test switching of modes, there is a new variation of the "am"
command to do this: am screen-compat [on|off] [package]

This mode switching has the fundamentals of restarting activities
when it is changed, though the state still needs to be persisted
and the overall mode switch cleaned up.

For the few small apps I have tested, things mostly seem to be
working well.  I know of one problem with the text selection
handles being drawn at the wrong position because at some point
the window offset is being scaled incorrectly.  There are
probably other similar issues around the interaction between
two windows because the different window coordinate spaces are
done in a hacky way instead of being formally integrated into
the window manager layout process.

Change-Id: Ie038e3746b448135117bd860859d74e360938557
2011-05-09 17:03:24 -07:00
David Deephanphongs
62f2ada64f Add missing NOTICE entries.
Add missing NOTICE block for TagSoup in general NOTICE file.
Add comment in Android.mk to help reviewers locate the NOTICE for apache-http.
Modify build rule for 'am' command to pull in the NOTICE file.

Change-Id: I43c6c1468395b70d0942b3620f12e4b6f3d9a66b
2010-10-19 16:56:02 -07:00
Dianne Hackborn
405e012681 am deaa8ff1: am a7ef18fc: Merge "Some debugging support." into gingerbread
Merge commit 'deaa8ff1b10d38add4f7c276e7be2ffc19359a14'

* commit 'deaa8ff1b10d38add4f7c276e7be2ffc19359a14':
  Some debugging support.
2010-09-24 15:58:25 -07:00
Dianne Hackborn
f123e49bf0 Some debugging support.
- New feature to "am monitor" to have it automatically launch
  gdbserv for you when a crash/ANR happens, and tell you how to
  run the client.

- Update dumpstate to match new location of binder debug logs

- Various commented out logs that are being used to track down
  issues.

Change-Id: Ia5dd0cd2df983a1fc6be697642a4590aa02a26a5
2010-09-24 13:11:55 -07:00
Dianne Hackborn
846df9f517 resolved conflicts for merge of 8952a448 to master
Change-Id: I9c752a5d10ae8d8e5ead1243b6abd4795204fc0b
2010-09-23 20:33:19 -07:00
Dianne Hackborn
287952c35e Fix issue #3022508: Crash during media scan
Don't kill processes for excessive wake lock use, even if they
are in the background, as long as they have running services.

Also fix some problems with this, such as not noting the kill
in battery stats.

And add killing of processes for cpu usage as well, along with
some optimizations to computing CPU usage.

And fix BatteryWaster to be better behaving for testing these
cases.

Add new "monitor" command to am to watch as the activity manager
does stuff (so we can catch things at the point of ANR).

Finally some miscellaneous debug output for the stuff here, as
well as in progress debugging of an ANR.

Change-Id: Ib32f55ca50fb7486b4be4eb5e695f8f60c882cd1
2010-09-23 15:59:28 -07:00
Jack Veenstra
2d1b7a2239 Add support for giving arrays of ints and longs to the "am" command.
Change-Id: Ibc4ae63fb5f8025a847bec7d37a1fce5abd81b39
2010-09-08 11:42:33 -07:00
Joe Malin
f9b5eed81d Doc Change:ActivityManager usage doc:running test package
Change-Id: I9a0c28e59f87e30c81d18162bee082b851d07a94
2010-08-30 14:10:05 -07:00
Makoto Onuki
6a69b4fbae Add --el option to am for long extras.
Change-Id: I13b92284fa4e0765620552b7d9b08d7441254389
2010-08-24 18:39:55 -07:00
Daniel Sandler
7b750542d6 Fix incorrect usage text for am.
Change-Id: I95afb3bd02ce23bb8d0797ec4c33e27a9530988e
2010-08-20 09:24:02 -04:00
Andy McFadden
824c510752 Allow "am" to initiate heap dumps.
This was mostly cloned from the "am profile" implementation.  It's
intended to replace the old "kill -10" approach used by "runhat".

We could really use a native heap dump, so I pass a "managed"
flag through that indicates whether we want to dump the native or
managed heap.  We don't currently have a native heap dump-to-file
function, so it currently just logs a warning.

(android.ddm.DdmHandleNativeHeap.getLeakInfo is a good start -- it
copies /proc/maps and then calls get_malloc_leak_info to get some
goodies.  Needs some formatting to make it human-readable.  I didn't
want to cram all that into this change.)

It would be useful if "am" didn't exit until the heap dump operation
completed, but I'm not sure how to do that.

Bug 2759474.

Change-Id: I46bc98067738d8c72ac0fc10002ca67bb4929271
2010-07-12 13:35:14 -07:00
The Android Open Source Project
d6c0bb0f0f merge from open-source master
Change-Id: I0598edad283a177a5ddcc30e20d2284503e6038e
2010-05-19 08:28:32 -07:00
Christian Mehlmauer
746a95ab71 Removed Calls to deprecated APIs
Change-Id: I3f9b6a8d3c8a050156a6cc7ea0eb9de33b82f79a
2010-05-17 21:16:20 +02:00
Jean-Baptiste Queru
69acb6b746 Unify am startservice commands.
This replaces the implementation with an equivalent one.

Change-Id: I1343ddee9414a67906cd426b8381ddbace873894
2010-04-16 12:55:48 -07:00
Anthony Newnam
d4dd85d532 Allow Am to start services
Change-Id: I31d066ae2c980cc293e55034446a63a0f42088ad
2010-04-14 14:35:11 -05:00
Dianne Hackborn
5ef402baaf Fix issue #2538228: Intents targeting browsers constantly nagging
Some applications are setting the MIME type field for an http:
intent, which is technically wrong because the recipient opening
the URI will get the MIME type from the header.  This was hitting
a bug when we compute the intent filter when setting the
preferred activity, where we have to set both the MIME type and
data URI for the intent filter.  (For file: and content: URIs
only the MIME type is needed, since these can be opened directly
through ContentResolver so everyone is presumed to be able to
handle them.)

Change-Id: Ia7025e6859e9c90997bf56c2c80f225fca7a2007
2010-03-26 17:17:25 -07:00
Dianne Hackborn
8f7f35e0cc Add new -W option to Am to wait for the start to complete. 2010-02-26 16:34:33 -08:00
Doug Zongker
6fb35fe1ac add "startservice" option to am command-line utility
Allows starting Services in addition to Activities.

Change-Id: Ib078115f6200faa8907b35909af2f64b0c563b38
2010-02-24 11:37:35 -08:00
Doug Zongker
305e1b8fe9 add --esn option to am to allow adding extra with a null value 2009-11-30 16:15:15 -08:00
Dianne Hackborn
68d881cf2d Fix issue #2166755: BroadcastReceiver trying to return result during a non-ordered broadcast
Tell the broadcast receiver whether it is getting an initial sticky value,
so it will be quiet about attempts to do ordered broadcast stuff.

Note that the original bug being reported was not actually a crash, just
an error log.  So all we are doing here is making the log quieter.

Change-Id: Iaf1b718d82093ec1197142410a64feff47eb3859
2009-10-05 15:52:32 -07:00
Dan Egnor
9f4af53561 Make intent broadcasts in "am" synchronous (they wait until exit).
Clean up error handling and reporting in "am".
Make the usage message for "am" more informative.

Make it easier to turn on logging in GoogleHttpClient.
2009-07-22 16:56:55 -07:00
Dianne Hackborn
9c8dd55a9d Fix bug 1829561 ("am profile" with bad filename kills process).
The am command is now the one that takes care of opening the target file,
handling the opened file descriptor to the process that will be profiled.
This allows you to send profile data to anywhere the shell can access, and
avoids any problems coming up from the target process trying to open the
file.
2009-06-24 16:23:14 -07:00
Marco Nelissen
c62a216a2b The '-D' option for the 'am' command appears to be optional, so reflect that in the usage. 2009-06-04 12:04:03 -07:00
Dianne Hackborn
95fc68f24a Fix issue where apps could prevent the user from going home.
Now we have a 5-second time after home is pressed, during which
only the home app (and the status bar) can switch to another app.
After that time, any start activity requests that occurred will
be executed, to allow things like alarms to be displayed.  Also
if during that time the user launches another app, the pending
starts will be executed without resuming their activities and
the one they started placed at the top and executed.
2009-05-19 18:46:53 -07:00
Dan Egnor
abc25e3679 Add intent for gservices override, and handle empty arguments properly
in the "am" utility.
2009-05-15 11:59:31 -07:00
The Android Open Source Project
f5b4b98fad auto import from //depot/cupcake/@136745 2009-03-05 20:00:43 -08:00
The Android Open Source Project
9066cfe988 auto import from //depot/cupcake/@135843 2009-03-03 19:31:44 -08:00
The Android Open Source Project
d83a98f4ce auto import from //depot/cupcake/@135843 2009-03-03 18:28:45 -08:00
The Android Open Source Project
54b6cfa9a9 Initial Contribution 2008-10-21 07:00:00 -07:00