Commit Graph

1964 Commits

Author SHA1 Message Date
Jeff Sharkey
32559e191f Decorate AssetFileDescriptor with Closeable.
Change-Id: I1f5f462b781a6e8fad77337006febd9c54694c0b
2013-04-29 11:22:20 -07:00
Jeff Sharkey
2b4d22cda3 Disable various sampling event logs.
They're unused at the moment.

Change-Id: Ib629b405e7b6666d38fcd0ebaa16490bfb0e95f0
2013-04-26 10:52:00 -07:00
Amith Yamasani
4699b68859 am 269c068d: am df181185: Merge "Hide TYPE_CHOICE_LEVEL since there\'s no visual representation for it yet." into jb-mr2-dev
* commit '269c068de9ffb44aefa0bca99c77636263f8b8fb':
  Hide TYPE_CHOICE_LEVEL since there's no visual representation for it yet.
2013-04-25 13:50:26 -07:00
Amith Yamasani
d5e946a52c Hide TYPE_CHOICE_LEVEL since there's no visual representation for it yet.
Bug: 8704663
Change-Id: Ia9931e3844305c8f84c127506ffedf3a17eeb80d
2013-04-24 21:37:36 -07:00
Matthew Xie
ae8ffa0f4e am 2e0a94d2: am b442d074: Merge "Add hardware feature android.hardware.bluetooth.le" into jb-mr2-dev
* commit '2e0a94d22b1bd25c4fa9442e03c596bd0cb3fe76':
  Add hardware feature android.hardware.bluetooth.le
2013-04-23 15:54:55 -07:00
Matthew Xie
b442d07469 Merge "Add hardware feature android.hardware.bluetooth.le" into jb-mr2-dev 2013-04-23 22:47:52 +00:00
Matthew Xie
a722772b28 Add hardware feature android.hardware.bluetooth.le
The feature is used to differ platforms that support bluetooth low
engery radio
bug 8369273

Change-Id: Ibe23da73f7ecfa854bdb8b8bfc1a32b8e3aeee56
2013-04-23 11:53:41 -07:00
Nick Pelly
dfe49e9c9f am 09e9e1a5: am edced26f: Merge "Add ContentValues & CursorWindow to framework.aidl" into jb-mr2-dev
* commit '09e9e1a5e7e3dd161b73f4254f239cab0410438a':
  Add ContentValues & CursorWindow to framework.aidl
2013-04-23 11:16:11 -07:00
Nick Pelly
edced26f16 Merge "Add ContentValues & CursorWindow to framework.aidl" into jb-mr2-dev 2013-04-23 00:07:19 +00:00
Nick Pelly
bb392ba5f7 Add ContentValues & CursorWindow to framework.aidl
By adding these stubs, they will be automatically added to framework.aidl
in sdk builds.

This makes it easier for unbundled apps to pass these objects across
AIDL calls.

ContentValues & CursorWindow are already public Parcelables. It is an
oversight that they were not already in framework.aidl.

There are a lot of other public Parcelables that are missing from
framework.aidl. This just fixes two commonly requested ones.

Change-Id: If61e19b1206da1680413d9ea03de87a90b6d233e
2013-04-23 08:30:34 +10:00
Dianne Hackborn
4c2b007b5e am 5b00f558: am b3bffa80: Merge "Follow up on issue #8159072: Spinner widget should be RTL\'ized" into jb-mr2-dev
* commit '5b00f5584a7894bb79f9ce369d88cea5d886ff22':
  Follow up on issue #8159072: Spinner widget should be RTL'ized
2013-04-20 21:36:51 -07:00
Dianne Hackborn
f1ae269c06 Follow up on issue #8159072: Spinner widget should be RTL'ized
Only allow through changing direction configs for drawables.

Explicitly map layout direction values to an index in the
preload arrays.

Drawables that don't vary by configuration should go in to both
the rtl and ltr preloads.

Change-Id: Ib92dd11738082a795e02d1d4191adb54702d651c
2013-04-19 14:50:27 -07:00
Amith Yamasani
8dc25e0680 am ba567014: am e37c8f78: Merge "Improve API and documentation" into jb-mr2-dev
* commit 'ba56701493ede3f5f338a03173da0327a215b223':
  Improve API and documentation
2013-04-19 12:49:40 -07:00
Amith Yamasani
e37c8f781a Merge "Improve API and documentation" into jb-mr2-dev 2013-04-19 19:10:02 +00:00
Amith Yamasani
3b458ad9ee Improve API and documentation
API for querying accounts visible to a specific package.

Improve API and docs for device owner.

Bug: 8657158
Change-Id: I01b8701534f64b383391508a49ae93ed21f22ae0
2013-04-19 12:07:46 -07:00
Fabrice Di Meglio
789ac6c975 am 07fedf58: am b08aa235: Merge "Improve fix for bug #8159072 Spinner widget should be RTL\'ized" into jb-mr2-dev
* commit '07fedf58dd6d6e4759f7dbe7a492e5318f1655cb':
  Improve fix for bug #8159072 Spinner widget should be RTL'ized
2013-04-19 11:10:20 -07:00
Fabrice Di Meglio
b08aa2354f Merge "Improve fix for bug #8159072 Spinner widget should be RTL'ized" into jb-mr2-dev 2013-04-19 17:58:47 +00:00
Fabrice Di Meglio
b9a13b892e Improve fix for bug #8159072 Spinner widget should be RTL'ized
- populate the preloaded drawable cache with only LTR drawables
when the layout direction during preloading is LTR. Populate
the cache with only RTL drawables when the layout direction during
preloading is RTL
- only preload drawables that dont have a dual LTR/RTL version

Change-Id: I7807bdc031b99102609efda75042a9500d96065c
2013-04-18 19:57:24 -07:00
Amith Yamasani
c1ce6e1a79 am ac16c21d: am a0042742: Merge "Modify restrictions bundle per api council recommendations" into jb-mr2-dev
* commit 'ac16c21d11c1545efb8deafbcb7c120a5e0821a1':
  Modify restrictions bundle per api council recommendations
2013-04-17 11:34:28 -07:00
Amith Yamasani
7e99bc02c8 Modify restrictions bundle per api council recommendations
Use a Bundle for persisting and passing to the application, but use a
list to return data back from an application that's exposing restrictions.

Changed the xml reading/writing code to store the value type in the Bundle
so that it can be reproduced when reading. Earlier we were assuming only
String and String[].

Bug: 8633967

Change-Id: I523d5553728edcf28a1e9d432f490b4956f34215
2013-04-17 10:44:44 -07:00
Amith Yamasani
18197ec438 am 460071f8: am 919e36d5: Merge "Allow non-system apps to use restricted accounts" into jb-mr2-dev
* commit '460071f806337f09ff789892979935916323e6a1':
  Allow non-system apps to use restricted accounts
2013-04-15 14:06:34 -07:00
Amith Yamasani
e993ae197b Allow non-system apps to use restricted accounts
Anyway they need to request account access and user will be asked to approve access to the account
at runtime.

Bug: 8617168
Change-Id: I31de852b9bb25f496becc3e6470265b5c330e6ad
2013-04-15 13:42:57 -07:00
Jeff Sharkey
328ebf2221 Support persistable Uri permission grants.
When granting a Uri permission with new PERSIST_GRANT_URI_PERMISSION
flag, persist that grant across device reboots until explicitly
revoked.  Adds new persistedModeFlags dimension to UriPermission,
and moves all flag mutation into UriPermission for clarity.  Adds
flag documentation.  Only inflate HashSet as needed.

Write persisted grants into XML file, saving based on source and
target package name and user handle.  Sanity check grants when
parsing.

Wipe all grants from/to a package when uninstalled, and wipe any
transient grants when a package or user is force stopped.

Persistable grants are always considered "needed."

Change-Id: I3f001571b498fd607456a1257a6383f904d19497
2013-04-15 12:34:40 -07:00
Amith Yamasani
362c4ddff3 am 19c95bcc: am e188c984: Merge "Introducing manifest flag requiredAccountType" into jb-mr2-dev
* commit '19c95bcc76cd68e241e3d29a5e49fc892521527d':
  Introducing manifest flag requiredAccountType
2013-04-13 16:01:59 -07:00
Amith Yamasani
e188c984dd Merge "Introducing manifest flag requiredAccountType" into jb-mr2-dev 2013-04-13 22:54:01 +00:00
Dianne Hackborn
de1fae77b6 am 00c4c670: am 301e95f2: Merge "Add a little more resource load tracing." into jb-mr2-dev
* commit '00c4c67069b9d13005ae072b8744c728aa73f99a':
  Add a little more resource load tracing.
2013-04-12 18:09:58 -07:00
Amith Yamasani
ccbe389b4d Introducing manifest flag requiredAccountType
This can be used by apps that won't work without an account of that
type in the limited user environment. This way we can avoid letting
users select these apps when setting up a limited user.

Bug: 8600261
Change-Id: Iaa0dd5ff88e89fa7a1d8a4e70317290268411bdb
2013-04-12 17:52:42 -07:00
Dianne Hackborn
0acc1931d3 Add a little more resource load tracing.
Change-Id: Id797adb67ab411d5b1a1c223863d3bb4655d10b1
2013-04-12 17:49:17 -07:00
Dianne Hackborn
11dc37686f am 18e99d1d: am 15fed390: Merge "Add new resources trace, also trace apk dex loading." into jb-mr2-dev
* commit '18e99d1d5f7bb2e35fb9f5c3edbb4265d66e3d93':
  Add new resources trace, also trace apk dex loading.
2013-04-12 17:06:37 -07:00
Dianne Hackborn
f7be4800df Add new resources trace, also trace apk dex loading.
Change-Id: Ia48566efb21ee018659bd976ddb3a0f4997b9a3a
2013-04-12 14:53:10 -07:00
Christopher Tate
58c15bfcdf am f6a2503d: am 5adae45a: Merge "Document the behavior of \'null\' values in SharedPreferences" into jb-mr2-dev
* commit 'f6a2503d4ad50e22d0e32ade59bb0f73fae5273f':
  Document the behavior of 'null' values in SharedPreferences
2013-04-11 18:47:14 -07:00
Christopher Tate
5adae45add Merge "Document the behavior of 'null' values in SharedPreferences" into jb-mr2-dev 2013-04-12 01:41:01 +00:00
Fabrice Di Meglio
b735e1d426 am 70d2c773: am f5c757c6: Merge "More fix for bug #8159072 Spinner widget should be RTL\'ized" into jb-mr2-dev
* commit '70d2c77320287d97fa2d90cc60f85e1706bffb1b':
  More fix for bug #8159072 Spinner widget should be RTL'ized
2013-04-11 18:10:51 -07:00
Fabrice Di Meglio
f5c757c629 Merge "More fix for bug #8159072 Spinner widget should be RTL'ized" into jb-mr2-dev 2013-04-12 01:03:33 +00:00
Dianne Hackborn
b999d37009 am d9d9c17d: am 77216642: Merge "Implement #7341342 API request: way to determine current orientation..." into jb-mr2-dev
* commit 'd9d9c17dda9a343b8b5386d1b9233c89ab6f3419':
  Implement #7341342 API request: way to determine current orientation...
2013-04-11 17:15:02 -07:00
Dianne Hackborn
7721664288 Merge "Implement #7341342 API request: way to determine current orientation..." into jb-mr2-dev 2013-04-12 00:08:13 +00:00
Dianne Hackborn
b9ec1ac51b Implement #7341342 API request: way to determine current orientation...
...to allow for orientation locking

This doesn't add an API to get the current orientation, since that is
inherantly racy.  Instead there is a new "locked" orientation mode that
locks the screen into whatever the current rotation is.

While at it, added a few other useful orientation modes.

Change-Id: I5c369e6511cb72294e9e922ea8acffd770df9440
2013-04-11 17:07:40 -07:00
Christopher Tate
9a413f8ffa Document the behavior of 'null' values in SharedPreferences
Bug 7892422

Change-Id: Ib898fd0921d57871d4caecb9042c479271c7ad60
2013-04-11 16:01:18 -07:00
Nick Kralevich
6e2157456a am c5931edb: am c65e4633: Merge "Optional <uses-permission> not yet supported." into jb-mr2-dev
* commit 'c5931edb4c8d95e90ac739ec88d8fca2610a57f1':
  Optional <uses-permission> not yet supported.
2013-04-11 14:58:13 -07:00
Fabrice Di Meglio
dc25d25333 More fix for bug #8159072 Spinner widget should be RTL'ized
- fix DrawableContainerState.getChangingConfigurations() to take care about its children
- make Resources.verifyPreloadConfig() return false when the changing configuration
contains layout direction bits (this is when a Drawable is having different version
for LTR and RTL layout directions)
- use constant state instead of the resource type value for checking if we can
preload the drawable
- fix typo

Change-Id: Idd64caf0fbe0f5cfd5ffe09343e84bafa9446ea5
2013-04-11 13:38:57 -07:00
Nick Kralevich
32eb5b1824 Optional <uses-permission> not yet supported.
Change-Id: Ieaa97a29db75161f35905ff340b2c525bbf50612
2013-04-11 10:20:09 -07:00
Jeff Brown
b437a79b05 resolved conflicts for merge of 21dffd5d to master
Change-Id: I37c48dee471c9d43f19c1fe4a01f70db53e2441f
2013-04-08 19:05:15 -07:00
Jeff Brown
3a2854bcee Merge "Queues, queues, queues and input." into jb-mr2-dev 2013-04-08 23:59:24 +00:00
Jeff Brown
f9e989d5f0 Queues, queues, queues and input.
Redesigned how ViewRootImpl delivers input events to views,
the IME and to native activities to fix several issues.

The prior change to make IME input event delegation use
InputChannels failed to take into account that InputMethodManager
is a singleton attached to the main looper whereas UI may be
attached to any looper.  Consequently interactions with the
InputChannel might occur on the wrong thread.  Fixed this
problem by checking the current thread and posting input
events or callbacks to the correct looper when necessary.

NativeActivity has also been broken for a while because the
default event handling logic for joysticks and touch navigation
was unable to dispatch events back into the native activity.
In particular, this meant that DPad synthesis from touch navigation
would not work in any native activity.  The plan is to fix
this problem by passing all events through ViewRootImpl as usual
then forwarding them to native activity as needed.  This should
greatly simplify IME pre-dispatch and system key handling
and make everything more robust overall.

Fixed issues related to when input events are synthesized.
In particular, added a more robust mechanism to ensure that
synthetic events are canceled appropriately when we discover
that events are no longer being resynthesized (because the
application or IME is handling or dropping them).

The new design is structured as a pipeline with a chain of
responsibility consisting of InputStage objects.  Each InputStage
is responsible for some part of handling each input event
such as dispatching to the view hierarchy or to the IME.
As a stage processes an input event, it has the option of
finishing the event, forwarding the event to the next stage
or handling the event asynchronously.  Some queueing logic
takes care to ensure that events are forwarded downstream in
the correct order even if they are handled out of order
by a given stage.

Cleaned up the InputMethodManager singleton initialization logic
to make it clearer that it must be attached to the main looper.
We don't actually need to pass this looper around.

Deleted the LatencyTimer class since no one uses it and we have
better ways of measuring latency these days using systrace.

Added a hidden helper to Looper to determine whether the current
thread is the indicated Looper thread.

Note: NativeActivity's IME dispatch is broken by this patch.
This will be fixed later in another patch.

Bug: 8473020
Change-Id: Iac2a1277545195a7a0137bbbdf04514c29165c60
2013-04-08 15:31:47 -07:00
Nick Kralevich
ef36045f96 am 1fdaace1: am 80fdc962: Merge "Error on conflicting <uses-permission>" into jb-mr2-dev
* commit '1fdaace1b17ad651d1e5266bb227a26e76b91a50':
  Error on conflicting <uses-permission>
2013-04-04 17:34:31 -07:00
Nick Kralevich
73f2d3c79e Error on conflicting <uses-permission>
Don't install packages where we have multiple, conflicting
<uses-permission> lines for the same permission.

For example, a package which contains:

<uses-permission android:name="android.permission.INTERNET" android:required="false" />
<uses-permission android:name="android.permission.INTERNET" android:required="true" />

will now fail to install.

In addition, this change slightly refactors the code, and creates a new
parseUsesPermission() method.

Change-Id: I0f4bb8b51dc4a0c5b73458a70f706e19829275d2
2013-04-04 17:12:00 -07:00
Nick Kralevich
7b22af2c31 am 2c0283f5: am b2c3aa8e: Merge "PackageParser: ignore <uses-permission> android:required on older apps" into jb-mr2-dev
* commit '2c0283f5d1bc43892b2e1e6ad3b111e4933bbe34':
  PackageParser: ignore <uses-permission> android:required on older apps
2013-04-04 13:36:04 -07:00
Nick Kralevich
38f130e19a PackageParser: ignore <uses-permission> android:required on older apps
Don't honor <uses-permission android:required="false"> on older apps.
Lots of apps in the wild are improperly using this, and we don't
want to break them.

Bug: 8528162
Change-Id: I6e0a10bc9feac58d13ef624239c6b91e9fc34590
2013-04-04 13:19:10 -07:00
Jeff Sharkey
5c1994eeff am 04e740a6: am 0f8e8b03: Merge "Warn when exposing file:// Uris beyond a process." into jb-mr2-dev
* commit '04e740a65e2399c4a4b211408bd84f2d545d9f4a':
  Warn when exposing file:// Uris beyond a process.
2013-04-03 16:33:52 -07:00
Jeff Sharkey
0f8e8b03eb Merge "Warn when exposing file:// Uris beyond a process." into jb-mr2-dev 2013-04-03 23:28:07 +00:00