1044 Commits

Author SHA1 Message Date
Jamie Gennis
6ad0452e63 Disable tracing from Zygote
This change disables all atrace tracing in Zygote immediately after it is
initialized.  This is necessary because Zygote has no way to receive
notifications that the enabled trace tags have been changed.  Tracing is
re-enabled when other processes fork from Zygote.

Change-Id: If2983858fb0c4890ba9ab041849b1c4d98f66c13
2013-04-16 22:15:21 +00:00
Craig Mautner
967212cb54 Implement stack splitting and task movement.
Split stacks and move tasks between them. Layout the windows
according to the new stack split.

After layout content rectangles are known split the available area
between all stack boxes. Then use those values for future layout.

Provide stack contents to ActivityManager.

Change-Id: I9746e6185445633810d506be514d0b7b540a7f99
2013-04-15 13:46:47 -07:00
Jeff Brown
1467991f8c am 38bfe9ec: am a9574e33: Add touchnavigation to input debugging command.
* commit '38bfe9eca0134dd5f66dafeeb6fa10558f9f4394':
  Add touchnavigation to input debugging command.
2013-04-10 03:26:36 -07:00
Jeff Brown
a9574e3361 Add touchnavigation to input debugging command.
Bug: 8583760
Change-Id: I9b150133e3d9ca9fe970550f5c0d7c18e6c7b558
2013-04-10 03:01:37 -07:00
Ying Wang
28af35e8cd resolved conflicts for merge of a976bddd to master
Change-Id: I64e1cbfb0eee891ce4d1eee40eefdcedcc501f7f
2013-04-09 23:21:42 -07:00
Ying Wang
d685894212 Add liblog
Bug: 8580410
Change-Id: I746aa8258866508c3a725d0773faf4518096548f
2013-04-09 21:54:12 -07:00
Dianne Hackborn
e6bec854d5 am 3793b928: am bc948101: Merge "Have audio service clean up new receivers in crashing processes." into jb-mr2-dev
* commit '3793b92816d940b265468e9f2f071fbf35db534d':
  Have audio service clean up new receivers in crashing processes.
2013-04-08 13:24:28 -07:00
Dianne Hackborn
79f7ec70eb Have audio service clean up new receivers in crashing processes.
The new media button receiver with only a pending intent (no
component name) could be left hanging if the process that
registered it went away.  These semantically need to be tied
to the calling process's lifetime; we now clean them up when
the calling process goes away.

Also added some additional cleanup of media button receivers
when packages change (updated, cleared).

And on top of that, a new "media" command for doing media
things.  Currently lets you send media keys and monitor
remote display data.

Oh and finally added a new BaseCommand base class for
implementing these command line utilities.

Change-Id: Iba1d56f10bab1eec4a94a7bb1d1c2ae614c8bcf5
2013-04-08 13:08:37 -07:00
Kenny Root
faa262cb10 am 960650c6: am 7ba6470f: am 4224a4ca: am 3864aa39: Merge "Add interrupter library to simulate EINTR"
* commit '960650c6e3504c85f9e22210621f0317880f723b':
  Add interrupter library to simulate EINTR
2013-03-27 17:51:11 -07:00
Kenny Root
7ba6470f4a am 4224a4ca: am 3864aa39: Merge "Add interrupter library to simulate EINTR"
* commit '4224a4ca85a4e7ba3f4e543ee52c643405464164':
  Add interrupter library to simulate EINTR
2013-03-27 17:45:21 -07:00
Kenny Root
3864aa3944 Merge "Add interrupter library to simulate EINTR" 2013-03-28 00:16:31 +00:00
Dianne Hackborn
d734b4f285 am 6b8e7b35: am bf20aa76: Merge "Keep track of who has disabled applications." into jb-mr2-dev
* commit '6b8e7b35ef763d29a30c87a5a95ef941d39a8ee9':
  Keep track of who has disabled applications.
2013-03-27 16:40:49 -07:00
Dianne Hackborn
3fa3c28a35 Keep track of who has disabled applications.
Change-Id: I2640d3dc2200b589e2beb42a43cc93efd090f06e
2013-03-27 12:01:52 -07:00
Dianne Hackborn
5ab6d90578 am a4820789: am 5871b258: Merge "Change wm commands to return size and density info." into jb-mr2-dev
* commit 'a4820789136c814e1e9ae26d5a0712e1c7fd4dd5':
  Change wm commands to return size and density info.
2013-03-26 17:28:16 -07:00
Dianne Hackborn
672cf45de7 Change wm commands to return size and density info.
Change-Id: Id25722fe5f0cd9470d04d657f067e5ad29927c98
2013-03-26 15:24:24 -07:00
rpcraig
1e0c8e6989 Proper security labeling of multi-user data directories.
This patch covers 2 cases. When an app is installed
and the resulting data directory is created for all
existing users. And when a new user is created and
all existing app data directories are created for
the new user.

Change-Id: Iacaba6d9d18d5337e65713960d14efe32006b330
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
2013-03-25 14:35:00 +00:00
Robert Craig
d3f8d0333c Add seinfo parsing to PackageManagerService.
This patch set allows the PMS to parse the
mac_permissions.xml file which contains the
seinfo values. Each package that is installed
on the device will be assigned an seinfo value
based on policy. This seinfo value will help label
the app process and data directory.  Modifications
include adjustments to ApplicationInfo.java
to store the seinfo tag per package as well as
adjustments to installd to communicate the seinfo
tag to libselinux.

Change-Id: I61ad1ea12fb6a9a6d0b108ec163bc4bf4c954b58
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
2013-03-25 06:33:03 -04:00
Mathias Agopian
1aa089cef2 am 3f6c9bae: am 921113d5: Merge "use the bitmap stride when encoding a screenshot as PNG" into jb-mr2-dev
* commit '3f6c9bae6302983d37b3a00523b8c8066fd3caa9':
  use the bitmap stride when encoding a screenshot as PNG
2013-03-22 04:51:13 +00:00
Mathias Agopian
a79fd4ca31 use the bitmap stride when encoding a screenshot as PNG
Bug: 8444808
Change-Id: I47b74c22c940b40bd02634e9cd9dbff39b29a99f
2013-03-21 21:44:49 -07:00
Mathias Agopian
550a058976 am 88dd3464: am 7e55414f: Merge "make sure screencap\'s data stream matches what adb expects" into jb-mr2-dev
* commit '88dd3464b072bdae72b07605dd0b94786e36b253':
  make sure screencap's data stream matches what adb expects
2013-03-21 00:14:50 +00:00
Mathias Agopian
0137fb8937 make sure screencap's data stream matches what adb expects
adb assumes the stride is always equal to the width, so
we make sure it's actually the case (screenshot don't
always have this guarantee).

Change-Id: I643b909f6542b7493a611afc6e3c86955b984352
2013-03-20 15:40:45 -07:00
Mathias Agopian
036f43723c am 3cbd626c: am b936b774: Merge "make sure to start the binder thread pool" into jb-mr2-dev
* commit '3cbd626c6e09aee02ddbfc08341db95b2345b76d':
  make sure to start the binder thread pool
2013-03-20 21:10:23 +00:00
Dan Morrill
51dce9f651 Merge "Removing from userdebug builds by default." 2013-03-20 16:59:17 +00:00
Mathias Agopian
0678a8c250 make sure to start the binder thread pool
Change-Id: I5c125a001936797489ebdcd0d4ccbde23adba282
2013-03-19 20:56:00 -07:00
Guang Zhu
62aad7f66f add reboot and shutdown to svc power command
a runtime shutdown will be performed first, then device will
reboot with the provided reason or power off.

Change-Id: I44cfbae19626c46147fad3bc8e91434970daa5d5
2013-03-18 18:22:30 -07:00
Nick Kralevich
fdc62ee609 am 57eed5b4: am 38bfb5a7: Merge "app_process: don\'t pollute the environment"
* commit '57eed5b416bd72d4111a0aead2f5c71f24fde07b':
  app_process: don't pollute the environment
2013-03-15 14:39:08 -07:00
Nick Kralevich
9a9350550a app_process: don't pollute the environment
Give a hoot — don't pollute!

Change-Id: I30d6c05cecab483f0e9d8063907f7bc0ef2bb104
2013-03-15 13:14:52 -07:00
Nick Kralevich
fe57f62cd8 am 9c322c75: am f7ec4e61: Merge "Never call app_main more than once"
* commit '9c322c756276a9b22b05fd9c8bd67f2edfb50324':
  Never call app_main more than once
2013-03-15 12:19:00 -07:00
Nick Kralevich
1fe21bd1b6 Never call app_main more than once
Different kernels seem to handle ADDR_COMPAT_LAYOUT differently,
sometimes passing it to its children, sometimes not. If it's not
passed to its child successfully, we can end up in a restart loop.

Instead of testing for the presence of ADDR_COMPAT_LAYOUT, use an
environment variable instead, which is handled more predictably.

Bug: 8392487
Change-Id: Ia531dd2abb4e1cd46f3430d844e644f53581f530
2013-03-15 11:59:03 -07:00
Nick Kralevich
fd31ee4996 am 6098579a: am 1ae6ae20: Merge "Don\'t use ADDR_COMPAT_LAYOUT on the emulator"
* commit '6098579a205848339cf6886f5c6d476ccf40e6fe':
  Don't use ADDR_COMPAT_LAYOUT on the emulator
2013-03-14 17:21:38 -07:00
Nick Kralevich
5fa1ee779e Don't use ADDR_COMPAT_LAYOUT on the emulator
For the emulator, we want people to see memory as it
actually is, not how we're hacking around buggy apps. Don't
set ADDR_COMPAT_LAYOUT on the emulator.

For reasons that I don't understand, personality(ADDR_COMPAT_LAYOUT)
does not persist across an exec on the emulator. app_main gets
into a tight loop restarting itself because of this. This change
also works around that bug.

Change-Id: Ia73a7d2d623c25cf39d248145d97307945d554da
2013-03-14 16:31:34 -07:00
Nick Kralevich
8a0a929422 Respawn app_main if ADDR_COMPAT_LAYOUT is not set
Bug: 8358800
Change-Id: Id81aa26d74dfd16a49f0ee5926ea2cdb3c2106d8
2013-03-14 15:21:12 -07:00
Nick Kralevich
c6ec540153 Merge "Respawn app_main if ADDR_COMPAT_LAYOUT is not set" into jb-mr2-dev 2013-03-14 21:45:40 +00:00
Nick Kralevich
db95ad6dd4 Respawn app_main if ADDR_COMPAT_LAYOUT is not set
Bug: 8358800
Change-Id: Id81aa26d74dfd16a49f0ee5926ea2cdb3c2106d8
2013-03-14 13:23:52 -07:00
Jeff Sharkey
02ffba940c Handle finished bugreports, share from private.
Show notification when a bugreport is finished, letting the user
launch a SEND_MULTIPLE intent to share them.  Add dialog that warns
user about contents before sharing.  Since bugreports are now stored
in private app data of the Shell app, use FileProvider to build Uris
that we can grant others access to.

Define BUGREPORT_FINISHED as being a protected broadcast.  Delete
older bugreports automatically to reclaim disk space.  Migrate any
Intent extras to ClipData when building PendingIntents.

Add --receiver-permission support to am shell command.

Bug: 7005318
Change-Id: If6c607dbcf137362d5887eac482ff7391563890f
2013-03-13 16:42:38 -07:00
Christopher Tate
294b512eca DO NOT MERGE - Full backup/restore now handles OBBs sensibly
OBB backup/ restore is no longer handled within the target app
process.  This is done to avoid having to require that OBB-using
apps have full read/write permission for external storage.

The new OBB backup service is a new component running in the
same app as the already-existing shared storage backup agent.
The backup infrastructure delegates backup/restore of apps'
OBB contents to this component (because the system process
may not itself read/write external storage).

From the command line, OBB backup is enabled by using new
-obb / -noobb flags with adb backup.  The default is noobb.

Finally, a couple of nit fixes:

- buffer-size mismatch between the writer and reader of chunked
  file data has been corrected; now the reading side won't be
  issuing an extra pipe read per chunk.

- bu now explicitly closes the transport socket fd after
  adopting it. This was benign but triggered a logged
  warning about leaked fds.

(Cherrypicked)

Change-Id: I471f6348abcccb7bf1e1710b7beda9f23de53e14
2013-03-08 15:08:10 -08:00
Christopher Tate
a83cab0001 Do not hang in pm clear on an invalid package name
The Activity Manager was not properly informing the observer that
the operation had concluded (unsuccessfully).

Bug 8222595

Change-Id: I8234e32d8edf4112c8c7a5e20e341d0b41e23014
2013-03-07 17:50:11 -08:00
Dan Morrill
9044dee06d Removing from userdebug builds by default.
Change-Id: I5579e96437648193ee1ad1573584e5ec8f5e5ade
2013-03-07 17:28:37 -08:00
Amith Yamasani
67df64b3a4 Shared accounts and sharing of apps
API and preliminary implementation for sharing primary user accounts with a secondary user.
AbstractAccountAuthenticator has new methods to retrieve and apply a bundle of credentials
to clone an account from the primary to a restricted secondary user. The AccountManagerService
initiates the account clone when it starts up the user and detects that the user has
a shared account registered that hasn't been converted to a real account.

AccountManager also has new hidden APIs to add/remove/get shared accounts. There might be
further improvements to this API to make shared accounts hidden/visible to select apps.

AccountManagerService has a new table to store the shared account information.

Added ability in PackageManager to install and uninstall packages for a secondary user. This
is required when the primary user selects a few apps to share with a restricted user.

Remove shared accounts from secondary users when primary user removes the account.

Change-Id: I9378ed0d8c1cc66baf150a4bec0ede56f6f8b06b
2013-03-06 09:49:44 -08:00
Nick Kralevich
848b4c9a97 installd: use correct header file.
Change-Id: I035524b857a04f8400e96468310d88abf247e582
2013-02-28 16:43:23 -08:00
Kenny Root
c2235472da am f7497c9e: am 755205ad: Merge "Fix spelling error s/SORT_OREDER/SORT_ORDER/ in "content --help""
* commit 'f7497c9e551dd3bcbb7438211f5022cc6341c527':
  Fix spelling error s/SORT_OREDER/SORT_ORDER/ in "content --help"
2013-02-26 18:04:33 +00:00
Martin Olsson
64d0b3f918 Fix spelling error s/SORT_OREDER/SORT_ORDER/ in "content --help"
Change-Id: I8f869c9d2243ae8ff414399b7d6835c7ca74d500
Signed-off-by: Martin Olsson <martin@minimum.se>
2013-02-26 17:54:39 +01:00
Ying Wang
33c29b0e16 Use BUILD_PREBUILT to install the shell script
NOTICE files will be picked up automatically.

Change-Id: Ia4938aff013f1c010cbbfceacf5685722c86c39a
2013-02-19 16:42:16 -08:00
Dianne Hackborn
c652de8141 Implement display overscan support.
The window manager now keeps track of the overscan of
each display, with an API to set it.  The overscan impacts
how it positions windows in the display.  There is a new set
of APIs for windows to say they would like to go into the
overscan region.  There is a call into the window manager to
set the overscan region for a display, and it now has a
concept of display settings that it stores presistently.

Also added a new "wm" command, moving the window manager
specific commands from the "am" command to there and adding
a new now to set the overscan region.

Change-Id: Id2c8092db64fd0a982274fedac7658d82f30f9ff
2013-02-19 12:08:58 -08:00
Dianne Hackborn
50707cc820 Fix issue #8133857: Tracking ANR in Gallery
Reworking the locking in resources so that we never hold the
state lock while calling in to potential long running operations.
This means the mTmpValue can no longer be final (since we need
to use it while the lock isn't held), so a new field needs to
be added as the lock and everything that touches mTmpValue must
deal with it being null, restoring the value in there when
possible, etc.

Change-Id: Ie5ffd0f66e5f2d0e869a62d72e7a55b1c74fe872
2013-02-08 17:18:03 -08:00
Dianne Hackborn
f51f61269a App ops: new operations for SMS.
Implementation required a new framework feature
to associate an app op with a broadcast.

Change-Id: I4ff41a52f7ad4ee8fd80cbf7b394f04d6c4315b3
2013-02-05 11:56:12 -08:00
Dianne Hackborn
f265ea9d83 App ops: vibration, neighboring cells, dialing, etc.
Improve handling of vibration op, so that apps are
better blamed (there is now a hidden vibrator API that
supplies the app to blame, and the system now uses this
when vibrating on behalf of an app).

Add operation for retrieving neighboring cell information.

Add a new op for calling a phone number.  This required
plumbing information about the launching package name through
the activity manager, which required changing the internal
startActivity class, which required hitting a ton of code that
uses those internal APIs.

Change-Id: I3f8015634fdb296558f07fe654fb8d53e5c94d07
2013-02-01 15:14:29 -08:00
Daniel Sandler
6fc736971a Merge "Implement support for method calls in the content tool." 2013-01-29 20:52:44 +00:00
Daniel Sandler
d2c0c1021e Implement support for method calls in the content tool.
$ content call
    --uri content://com.example
    --method methodname
    [--arg optional_string_arg]
    [--extra name:s:foo --extra value:i:0]

The URI is just used to resolve the provider. --extra has
the same syntax as --bind.

Change-Id: I98cb89f0174a00e7c29ca0d8c8d809d453de3623
2013-01-29 14:27:21 -05:00
Svetoslav Ganov
d0fd54648c Merge "Adding UI test automation APIs." 2013-01-29 03:16:40 +00:00