Commit Graph

1934 Commits

Author SHA1 Message Date
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
Kenny Root
de1175db67 resolved conflicts for merge of 0afa8b36 to master
Change-Id: I09a453ab5dbad58e3dc0858972e222a34d53b282
2013-04-03 14:04:14 -07:00
Kenny Root
75827d4a31 Merge "Add direct API to get ManifestDigest" into jb-mr2-dev 2013-04-03 20:27:43 +00:00
Jeff Sharkey
a14acd20b8 Warn when exposing file:// Uris beyond a process.
Check for file:// Uris inside Intents, ClipData, Notifications and
RemoteViews when StrictMode option is enabled.

Also introduces Intent.prepareToLeaveProcess() to uniformly handle
Intents about to leave an app process.

Bug: 8529070
Change-Id: I8efb43877cbc5f21eb029fc6492b3ee1415059ef
2013-04-03 11:45:44 -07:00
Justin Koh
ab089d4870 am 9d4ed1ec: am ddd168d6: Merge "Add global key configuration file" into jb-mr2-dev
* commit '9d4ed1ec62a392e4b73ab7d3cd548e09bc792ab2':
  Add global key configuration file
2013-04-02 19:25:27 -07:00
Justin Koh
d378ad74c6 Add global key configuration file
Add global key configuration file. A global key is one that is handled by
PhoneWindowManager before dispatching and sent to a given component via
broadcast instead of going to the foreground app.
Bug: 8510681

Change-Id: Ic6a8e559680d005613ed22874b27eb78bbfc4499
2013-04-02 18:09:27 -07:00
Kenny Root
6c918cec31 Add direct API to get ManifestDigest
This makes it faster for applications that don't want to collect all the
certificates but do want the AndroidManifest.xml digest.

Bug: 8528639
Change-Id: Ide9498d0981188960af194a9568387337c075bcc
2013-04-02 14:22:03 -07:00
Amith Yamasani
8d01846130 am 5c98b904: am 9e8ba8f2: Merge "Improve RestrictionEntry API" into jb-mr2-dev
* commit '5c98b9046506cc69b261dd6ac2ae39b2de0afacb':
  Improve RestrictionEntry API
2013-03-29 18:52:58 -07:00
Amith Yamasani
9e8ba8f273 Merge "Improve RestrictionEntry API" into jb-mr2-dev 2013-03-30 01:47:33 +00:00
Amith Yamasani
86118baa4f Improve RestrictionEntry API
More getters and setters, better naming.
New extra defined for returning a custom intent that handles showing the
   restrictions UI.

Change-Id: I2ee0cdb4edd99e71a9004ff5e929dbe243b45557
2013-03-29 17:28:47 -07:00
Matthew Xie
3f9560261f am e4eb23ec: am 84e594f7: Merge "Unhide Bluetooth Low Energy public APIs" into jb-mr2-dev
* commit 'e4eb23ecc232c508974976844df2ea8c44025fe9':
  Unhide Bluetooth Low Energy public APIs
2013-03-28 16:10:03 -07:00
Matthew Xie
84e594f7db Merge "Unhide Bluetooth Low Energy public APIs" into jb-mr2-dev 2013-03-28 23:04:48 +00:00
kmccormick
adf7fa3d28 am ce2db15d: am 80ab68ce: am 5c3ddcd1: am 425c3d5f: am 99049335: am 3ed65cb3: am 689e827a: Merge "Doc update: superceeded > superseded" into jb-mr1.1-docs
* commit 'ce2db15d702dd4a27f860214ae2bfcf2693ee683':
  Doc update: superceeded > superseded
2013-03-28 15:39:27 -07:00
Matthew Xie
ddf7e4756c Unhide Bluetooth Low Energy public APIs
Updated API headers. Add BluetoothManager to be retrieved by
context.getSystemService(Context.BLUETOOTH_SERVICE).
LE scan functions are placed in BluetoothAdapter
The GATT API are device driven instead of a profile-driver.
bug 8450158

Change-Id: I424a4cedaac3ef8120a05996500008dd210d2553
2013-03-28 15:36:10 -07:00
kmccormick
80ab68ce23 am 5c3ddcd1: am 425c3d5f: am 99049335: am 3ed65cb3: am 689e827a: Merge "Doc update: superceeded > superseded" into jb-mr1.1-docs
* commit '5c3ddcd14b79c4737ea06f68d8efd39543d60382':
  Doc update: superceeded > superseded
2013-03-28 15:30:46 -07:00
kmccormick
5c3ddcd14b am 425c3d5f: am 99049335: am 3ed65cb3: am 689e827a: Merge "Doc update: superceeded > superseded" into jb-mr1.1-docs
* commit '425c3d5f59f1e315cdbdd5f7530c4380aabf76ab':
  Doc update: superceeded > superseded
2013-03-28 15:27:54 -07:00
kmccormick
425c3d5f59 am 99049335: am 3ed65cb3: am 689e827a: Merge "Doc update: superceeded > superseded" into jb-mr1.1-docs
* commit '99049335a604cae3f515fce32bc5f1b27fe8d29b':
  Doc update: superceeded > superseded
2013-03-28 15:26:25 -07:00
kmccormick
ac66b85a04 Doc update: superceeded > superseded
"Bug: 5935672"

Change-Id: Ie2324d00d454cf3f3f3ed422dea2017b8a7a4c54
2013-03-28 15:19:06 -07:00
Amith Yamasani
b54a93adaf am 1438d67e: am e494a81f: Merge "Restricted account visibility" into jb-mr2-dev
* commit '1438d67e7ddaba1133f181bc70cd706acf57a520':
  Restricted account visibility
2013-03-28 13:36:52 -07:00
Amith Yamasani
e494a81f9b Merge "Restricted account visibility" into jb-mr2-dev 2013-03-28 20:31:44 +00:00
kmccormick
34ba179091 am d805e374: am 24b8947f: resolved conflicts for merge of 603f987f to jb-mr2-dev
* commit 'd805e374c22ce7d0426efb08b38aa44a3633027b':
  Doc change: Fix typo DONT_DELTE
2013-03-27 19:30:06 -07:00
kmccormick
24b8947f62 resolved conflicts for merge of 603f987f to jb-mr2-dev
Change-Id: I4a130dad9d4669799f5d477f67e0f9a6a04381ca
2013-03-27 19:23:51 -07:00
kmccormick
603f987f14 am 418172bf: am 19840a8d: am 65c66c74: am 6e6e861a: Merge "Doc change: Fix typo DONT_DELTE" into jb-mr1.1-docs
* commit '418172bf8823016785526b433801d44a4630f276':
  Doc change: Fix typo DONT_DELTE
2013-03-27 18:59:42 -07:00
kmccormick
418172bf88 am 19840a8d: am 65c66c74: am 6e6e861a: Merge "Doc change: Fix typo DONT_DELTE" into jb-mr1.1-docs
* commit '19840a8d40139a12469ef92c3541f2a433d5ae85':
  Doc change: Fix typo DONT_DELTE
2013-03-27 18:57:27 -07:00
Amith Yamasani
0ac1fc9d23 Restricted account visibility
When accounts are shared to a restricted/limited user, apps can
opt-in to viewing accounts of a certain type. Other shared accounts
are not visible to the app.

App would specify the account type in the manifest <application> tag
with the attribute restrictedAccountType="foo.bar", where "foo.bar"
is the account type as defined by the authenticator.

Change-Id: I7586da04d6d6d32aae15adc6b1366f325bb07384
2013-03-27 18:56:08 -07:00
kmccormick
30498b4182 Doc change: Fix typo DONT_DELTE
"Bug: 8273156"

Change-Id: I6ba2e780d1a8c2b7d1771e93125a10b228227020
2013-03-27 17:56:13 -07:00
Nick Kralevich
adb2578a05 am 96e44a2c: am 98ea19ed: Merge "Reenable optional permissions parsing and expose APIs" into jb-mr2-dev
* commit '96e44a2c2ce0579177c50a4fb710adc83530e968':
  Reenable optional permissions parsing and expose APIs
2013-03-27 17:24:15 -07:00
Nick Kralevich
0655ade016 am e536ba7e: am 59928987: Merge "Add buildPermissionRequestIntent to PackageManager" into jb-mr2-dev
* commit 'e536ba7ecbb609ec9ada1bf39455ca0ba94163f6':
  Add buildPermissionRequestIntent to PackageManager
2013-03-27 17:20:32 -07:00
Nick Kralevich
98ea19ed24 Merge "Reenable optional permissions parsing and expose APIs" into jb-mr2-dev 2013-03-28 00:13:45 +00:00
Nick Kralevich
5992898755 Merge "Add buildPermissionRequestIntent to PackageManager" into jb-mr2-dev 2013-03-28 00:11:26 +00:00
Nick Kralevich
828c16f140 Reenable optional permissions parsing and expose APIs
Modify the package parsing code to understand optional permissions
(android:required="false"). This is essentially a rollback of
e824120016 with some minor changes.

Expose the requestPermission API to third party apps. This allows
an app to request an Intent which, when passed to
startActivityForResult, will prompt the user to approve permissions
for an app.

In the event we decide to not launch with this feature, this change
can be rolled back.

Change-Id: Ie3626deae9b16e510323f94a2c80377f7c84b26f
2013-03-27 16:57:33 -07:00