1383 Commits

Author SHA1 Message Date
Elliott Hughes
f4567f0c50 am 56cc5ba7: am 8d47f23e: am dbb0de21: Merge "Fix a typo in an assertion."
* commit '56cc5ba79bdf75a73281dc73f13169a409d96c28':
  Fix a typo in an assertion.
2014-04-24 15:43:24 +00:00
Elliott Hughes
56cc5ba79b am 8d47f23e: am dbb0de21: Merge "Fix a typo in an assertion."
* commit '8d47f23e43760dcbf051aaeffff668c3c6340276':
  Fix a typo in an assertion.
2014-04-24 09:01:44 +00:00
Elliott Hughes
6bd762289b Fix a typo in an assertion.
Change-Id: I3e97bb3cb8070c0ec0c6b97769f1da3e7b4ef8f5
2014-04-23 16:54:33 -07:00
Jeff Sharkey
846318a325 Allow prefix-based Uri permission grants.
Define new FLAG_GRANT_PREFIX_URI_PERMISSION which indicates that a
Uri permission grant should also apply to any other Uris that have
matching scheme, authority, and path segments.  For example, a prefix
grant for /foo/ would allow /foo/bar/ but not /foo2/.

Allow persistable and prefix grants to be issued directly through
grantUriPermission().  Relaxing persistable is fine, since it still
requires the receiver to actively take the permission.

Since exact- and prefix-match grants for the same Uri can coexist,
we track them separately using a new UriGrant key.  (Consider the
case where an app separately extends READ|PREFIX and WRITE for
the same Uri: we can't let that become READ|WRITE|PREFIX.)

Fix revoke to always take away persisted permissions.  Move prefix
matching logic to Uri and add tests.  Add new flags to "am" tool, and
various internal uses around Intent and Context.  Switch some lagging
users to ArraySet.

Bug: 10607375
Change-Id: Ia8ce2b88421ff9f2fe5a979a27a026fc445d46f1
2014-04-22 21:06:49 -07:00
John Spurlock
cee823e4d4 Add 'read' subcommand to the 'content' tool.
Access raw content exposed by content provider
openFile uris.

Bug:14079104
Change-Id: I9ef0e19f9354fa12408df1583b211a8d8a2e9fdb
2014-04-15 19:28:08 -04:00
Narayan Kamath
db8b130a19 am 96457004: am 549ae327: am aa19a2f6: Merge "Don\'t compare String8s to NULL."
* commit '964570044ef6b5d721a1372b2bb65c4585947353':
  Don't compare String8s to NULL.
2014-04-14 15:49:25 +00:00
Narayan Kamath
964570044e am 549ae327: am aa19a2f6: Merge "Don\'t compare String8s to NULL."
* commit '549ae327245a844862065dc9bb0562544e8c3beb':
  Don't compare String8s to NULL.
2014-04-14 08:46:17 +00:00
Narayan Kamath
90c75cf02e Don't compare String8s to NULL.
Use String8::isEmpty instead. Note that this code path is hit
only if the zygote calls ::exit, and that never happens unless
the VM invocation fails.

Change-Id: I0e7d3a86a79b12b2174ca3bf0dbe1904e33c041a
2014-04-12 12:25:50 +01:00
Narayan Kamath
26ad3af74d am c3255ae0: am de442781: am 909a6a0e: Merge "Dual zygote cleanup."
* commit 'c3255ae04c8bec36f6701b92bf645323558e23c1':
  Dual zygote cleanup.
2014-04-11 10:02:17 +00:00
Narayan Kamath
c3255ae04c am de442781: am 909a6a0e: Merge "Dual zygote cleanup."
* commit 'de442781cd4f7404e8aaa3f7ca5d1d3fc28cccc6':
  Dual zygote cleanup.
2014-04-11 09:57:27 +00:00
Narayan Kamath
d35d3e5d39 Dual zygote cleanup.
- Use different process names for the 32 / 64 bit zygote.
- Pass command line arguments correctly. The first unmatched
  argument must be passed through to the java main class.

Change-Id: I952ebbdbba941f118d992354b9bd0ada2dade417
2014-04-10 12:15:39 +01:00
Narayan Kamath
7be06900a8 am 9f777008: am 05f980d4: am d4b64409: Merge "Make zygotes aware of their supported ABIs."
* commit '9f777008eaead3cb9cee80d0c00e5a3d55de9de7':
  Make zygotes aware of their supported ABIs.
2014-04-09 14:06:14 +00:00
Narayan Kamath
8ee0b48d60 am 97175deb: am 3856a219: am cecfb94f: Merge "Clean up argc / argv processing for runtime args."
* commit '97175deb446cdaca7f3910b71940cb443bda3cc4':
  Clean up argc / argv processing for runtime args.
2014-04-09 14:06:10 +00:00
Narayan Kamath
9f777008ea am 05f980d4: am d4b64409: Merge "Make zygotes aware of their supported ABIs."
* commit '05f980d42d4926ab2130cdcf9e646eb610a7080b':
  Make zygotes aware of their supported ABIs.
2014-04-09 14:02:18 +00:00
Narayan Kamath
97175deb44 am 3856a219: am cecfb94f: Merge "Clean up argc / argv processing for runtime args."
* commit '3856a219fa414ee53c5ef3a0c35dae35e2ca80b1':
  Clean up argc / argv processing for runtime args.
2014-04-09 14:02:08 +00:00
Narayan Kamath
c41638cb75 Make zygotes aware of their supported ABIs.
Query system properties for the list of ABIs and pass
it as a command line argument to ZygoteInit.

Also add a new Zygote command that returns this list of
ABIs to peers.

Change-Id: I68034c6f63fa626911122579a011a0a25a8cda94
2014-04-09 13:41:15 +01:00
Narayan Kamath
22ec1eefa4 Clean up argc / argv processing for runtime args.
- Make copies of argc, argv before argv is potentially
  overwritten with the process name.
- Allow multiple command line arguments to be passed to
  ZygoteInit (this is required for some of the 64 bit
  zygote work).
- Add an explanatory comment about how these argments
  are processed.

Change-Id: I752be69c5c0f97ed17d1a3dded19f46ee00929b0
2014-04-09 13:39:41 +01:00
Narayan Kamath
c6f6ba3265 am 71ae2bd4: am f87b3a25: am 374db6c3: Merge "Remove ProcessState::mArgc,mArgV,mArgLen"
* commit '71ae2bd42be21de6d25d1f8c52e3973c172462df':
  Remove ProcessState::mArgc,mArgV,mArgLen
2014-04-03 16:56:32 +00:00
Narayan Kamath
71ae2bd42b am f87b3a25: am 374db6c3: Merge "Remove ProcessState::mArgc,mArgV,mArgLen"
* commit 'f87b3a25b928f145558f6f60183944f513878b63':
  Remove ProcessState::mArgc,mArgV,mArgLen
2014-04-03 14:11:34 +00:00
Narayan Kamath
a23fcd7be8 Remove ProcessState::mArgc,mArgV,mArgLen
These look like historical oddities, and weren't really being
used for anything useful.

Process:setArgV0 was being called by android.util.Process, but
that functionality can be moved directly into the implementation
of that class.

bug: 13647418

Change-Id: I216c8f8a4c065f0cf3a61f19f9e32decd26f93f6
2014-04-03 12:29:07 +00:00
Kenny Guy
2a764949c9 Rename related users to profiles.
Rename the related user concept as profiles.
When returning profiles of a user include the
user as a profile of itself.

Change-Id: Id5d4f29017b7ca6844632ce643f10331ad733e1d
2014-04-02 13:44:50 +01:00
Christopher Tate
f1977b4500 Expand install observer semantics
...and now fail conservatively when two apps both attempt to define
the same permission.  Apps signed with the same certificate are
permitted to redefine permissions.

We also finally have a (hidden) interface class for observing package
installation so that we can now rev the interface without breaking
existing callers.

Bug 13551375

Change-Id: Ifa4e59154dcccbb286ee46a35a6f25e4ad0f0f01
2014-03-27 12:37:47 -07:00
Colin Cross
1c14c327e8 am c1a7d075: am 232d4224: am f0ffa8a3: Merge "app_process: use LOCAL_MULTILIB := both"
* commit 'c1a7d0758de065da80129baa85f1471e67c7fe21':
  app_process: use LOCAL_MULTILIB := both
2014-03-27 18:29:19 +00:00
Colin Cross
c1a7d0758d am 232d4224: am f0ffa8a3: Merge "app_process: use LOCAL_MULTILIB := both"
* commit '232d422405d686eb493b48370a2b2f7c35fe96fb':
  app_process: use LOCAL_MULTILIB := both
2014-03-27 17:36:27 +00:00
Colin Cross
f130f0aaea app_process: use LOCAL_MULTILIB := both
Use LOCAL_MULTILIB := both to build app_process64 instead of
duplicating the build rule.

Also causes PRODUCT_PACKAGES := app_process to install both
versions on 64-bit platforms, as the module names for both
app_process and app_process64 are now app_process.

Change-Id: Ia3c3265d15475771b0cae8bace53b8fbf351c186
2014-03-27 10:20:29 -07:00
Glenn Kasten
1ee4eb074c Merge "Revert "Expand install observer semantics"" 2014-03-26 20:00:11 +00:00
Glenn Kasten
7629a18a3f Revert "Expand install observer semantics"
This reverts commit ab8a501f255b272af887acb0e66eb71cdf24c755.

Change-Id: I4ab4ae1a96efa2adf9d5a513793d8b84eef38b4e
2014-03-26 19:59:48 +00:00
Christopher Tate
9067dc03ff Merge "Expand install observer semantics" 2014-03-26 19:24:09 +00:00
Christopher Tate
ab8a501f25 Expand install observer semantics
...and now fail conservatively when two apps both attempt to define
the same permission.

We also finally have a (hidden) interface class for observing package
installation so that we can now rev the interface without breaking
existing callers.

Bug 13551375

Change-Id: I3a286d024a30e812ee4b098f345401df3c00e178
2014-03-25 19:28:54 -07:00
Adam Lesinski
de898ff429 Shared library resource support
Shared libraries can now export resources for applications
to use.

Exporting resources works the same way the framework exports
resources, by defining the public symbols in res/values/public.xml.

Building a shared library requires aapt to be invoked with the
--shared-lib option. Shared libraries will be assigned a package
ID of 0x00 at build-time. At runtime, all loaded shared libraries
will be assigned a new package ID.

Currently, shared libraries should not import other shared libraries,
as those dependencies will not be loaded at runtime.

At runtime, reflection is used to update the package ID of resource
symbols in the shared library's R class file. The package name of
the R class file is assumed to be the same as the shared library's
package name declared in its manifest. This will be customizable in
a future commit.

See /tests/SharedLibrary/ for examples of a shared library and its
client.

Bug:12724178
Change-Id: I60c0cb8ab87849f8f8a1a13431562fe8603020a7
2014-03-25 12:09:56 -07:00
Colin Cross
63665f2ac4 am a3633c25: am 71a3d40d: am e4360c8e: am 4308a523: Merge "bootanimation: build 32-bit if 64-bit gl libraries are not available"
* commit 'a3633c25033b576ae160ea86194e4f7f20d82fe2':
  bootanimation: build 32-bit if 64-bit gl libraries are not available
2014-03-20 21:05:40 +00:00
Christopher Tate
adfe8b86e9 App widget backup/restore infrastructure
Backup/restore now supports app widgets.

An application involved with app widgets, either hosting or publishing,
now has associated data in its backup dataset related to the state of
widget instantiation on the ancestral device.  That data is processed
by the OS during restore so that the matching widget instances can be
"automatically" regenerated.

To take advantage of this facility, widget-using apps need to do two
things:  first, implement a backup agent and store whatever widget
state they need to properly deal with them post-restore (e.g. the
widget instance size & location, for a host); and second, implement
handlers for new AppWidgetManager broadcasts that describe how to
translate ancestral-dataset widget id numbers to the post-restore
world.  Note that a host or provider doesn't technically need to
store *any* data on its own via its agent; it just needs to opt in
to the backup/restore process by publishing an agent.  The OS will
then store a small amount of data on behalf of each widget-savvy
app within the backup dataset, and act on that data at restore time.

The broadcasts are AppWidgetManager.ACTION_APPWIDGET_RESTORED and
ACTION_APPWIDGET_HOST_RESTORED, and have three associated extras:

    EXTRA_APPWIDGET_OLD_IDS
    EXTRA_APPWIDGET_IDS
    EXTRA_HOST_ID [for the host-side broadcast]

The first two are same-sized arrays of integer widget IDs.  The
_OLD_IDS values are the widget IDs as known to the ancestral device.
The _IDS array holds the corresponding widget IDs in the new post-
restore environment.  The app should simply update the stored
widget IDs in its bookkeeping to the new values, and things are
off and running.  The HOST_ID extra, as one might expect, is the
app-defined host ID value of the particular host instance which
has just been restored.

The broadcasts are sent following the conclusion of the overall
restore pass.  This is because the restore might have occurred in a
tightly restricted lifecycle environment without content providers
or the package's custom Application class.  The _RESTORED broadcast,
however, is always delivered into a normal application environment,
so that the app can use its content provider etc as expected.

*All* widget instances that were processed over the course of the
system restore are indicated in the _RESTORED broadcast, even if
the backing provider or host is not yet installed.  The widget
participant is responsible for understanding that these are
promises that might be fulfilled later rather than necessarily
reflecting the immediate presentable widget state.  (Remember
that following a cloud restore, apps may be installed piecemeal
over a lengthy period of time.)  Telling the hosts up front
about all intended widget instances allows them to show placeholder
UI or similarly useful information rather than surprising the user
with piecemeal unexpected appearances.

The AppWidgetProvider helper class has been updated to add a new
callback, onRestored(...), invoked when the _RESTORED broadcast
is received.  The call to onRestored() is immediately followed by
an invocation of onUpdate() for the affected widgets because
they will need to have their RemoteViews regenerated under the
new ID values.

Bug 10622506
Bug 10707117

Change-Id: Ie0007cdf809600b880d91989c00c3c3b8a4f988b
2014-03-20 12:30:51 -07:00
Colin Cross
4a1bc7dfc1 am e4360c8e: am 4308a523: Merge "bootanimation: build 32-bit if 64-bit gl libraries are not available"
* commit 'e4360c8e14d1ea362fb1d13b7a5c9bf003f3be00':
  bootanimation: build 32-bit if 64-bit gl libraries are not available
2014-03-20 17:47:10 +00:00
Colin Cross
71a3d40d20 am e4360c8e: am 4308a523: Merge "bootanimation: build 32-bit if 64-bit gl libraries are not available"
* commit 'e4360c8e14d1ea362fb1d13b7a5c9bf003f3be00':
  bootanimation: build 32-bit if 64-bit gl libraries are not available
2014-03-20 17:46:50 +00:00
Colin Cross
6ac8a20b8f am a78b389e: am 49fca697: am 0dccb02b: am 19fc55e1: Merge "build app_process64 on 64-bit targets"
* commit 'a78b389e544894ccb9673e2e416c3a1b51260513':
  build app_process64 on 64-bit targets
2014-03-20 01:55:52 +00:00
Colin Cross
49fca69747 am 0dccb02b: am 19fc55e1: Merge "build app_process64 on 64-bit targets"
* commit '0dccb02b9fd714af1db91e4ba3ca0b0da4e563c1':
  build app_process64 on 64-bit targets
2014-03-20 01:23:28 +00:00
Colin Cross
af9205626f am 0dccb02b: am 19fc55e1: Merge "build app_process64 on 64-bit targets"
* commit '0dccb02b9fd714af1db91e4ba3ca0b0da4e563c1':
  build app_process64 on 64-bit targets
2014-03-20 01:22:59 +00:00
Colin Cross
31d16e5bf9 bootanimation: build 32-bit if 64-bit gl libraries are not available
Set LOCAL_32_BIT_ONLY if TARGET_32_BIT_SURFACEFLINGER is set.

Change-Id: I76396cc9fe3fe45d1e98a44bf911d6e70922555a
2014-03-19 18:10:31 -07:00
Colin Cross
2764fce3a1 build app_process64 on 64-bit targets
On 64-bit platforms builds two copies of app_process, the 32-bit
app_process and 64-bit app_process64.

Change-Id: I59d739b5df398ad0bd040c954c57640ff7ab3e72
2014-03-19 17:49:47 -07:00
Craig Mautner
aea74a5977 Add Lock Task Mode.
When in lock task mode only the specified task may run. All
attempts to switch to another task are ignored until the task
finishes or a call to stopLockTaskMode() is made.

Change-Id: I6cfe92fe1bcf22cd47b5398c08e23c52a4092dda
2014-03-13 11:09:13 -07:00
Dianne Hackborn
8392e7e287 am 01de2432: am 24d8fa73: Merge "frameworks/base: move idmap from frameworks/native"
* commit '01de243263d347f2ac13a239d67d41817e34df33':
  frameworks/base: move idmap from frameworks/native
2014-03-07 19:33:55 +00:00
Andy McFadden
391d489ce0 Merge "FramebufferNativeWindow.h is obsolete" 2014-03-06 15:30:51 +00:00
Andy McFadden
c749b44086 FramebufferNativeWindow.h is obsolete
Change-Id: I3c645af7247a520e28d337e567f326375558519a
2014-03-05 15:36:58 -08:00
Kenny Guy
6143a02f96 Start related users on boot and user switch.
Collect related initialized users and start
them on boot and user switch.
Update list users command to show whether a
user is running or not.

Change-Id: Ib3d5debcb01ec55a07d93450b988b0180fc63263
2014-03-05 22:24:01 +00:00
Derek Sollenberger
fc92763408 Merge "Fix includes so that they no longer rely on the global Skia includes directories." 2014-02-28 13:23:15 +00:00
Dale Hawkins
8a78a80709 Merge "Adds support for array string extra." 2014-02-27 21:29:32 +00:00
Derek Sollenberger
eece0dda56 Fix includes so that they no longer rely on the global Skia includes directories.
bug:13225538
Change-Id: Ia5d816dc665f81c7985f21036af4fd0a63c560cf
2014-02-27 14:31:29 -05:00
Derek Sollenberger
950fe8f8d4 Cleanup unnecessary includes for libskia.
The libskia target exports all of its public includes directories so
redefining them here is redundant. Also this cleans up and makes it
obvious where the framework is making using of private Skia headers.

Change-Id: Ie7ecc9ddd3df780bed6b9af54ba58ca58274e043
2014-02-27 16:21:24 +00:00
Dale Hawkins
28600e261c Adds support for array string extra.
Adds support for setting an array string extra on an intent when
launching an activity/service.  Allows inclusion of commas using
an escape character.

Change-Id: I8857f7d28d60b75ddc65dc47f345a77230d00467
2014-02-26 18:01:00 -07:00
Dan Stoza
b88a904dfe Merge "Allow disabling layer rotation during screenshots" 2014-02-20 00:56:33 +00:00