Commit Graph

4447 Commits

Author SHA1 Message Date
Mark Lu
82a7343653 docs: add info to SharedPreferences.Editor.putString am: fb48521f41
am: f434456ba5

Change-Id: I5dec6b6fb20c741d92a840cf6291d0b33ac46d5a
2016-08-08 22:49:12 +00:00
Mark Lu
f434456ba5 docs: add info to SharedPreferences.Editor.putString
am: fb48521f41

Change-Id: Icf8a1a92e8f18bcc63b52842ea75b00610feac9d
2016-08-08 22:36:09 +00:00
Mark Lu
fb48521f41 docs: add info to SharedPreferences.Editor.putString
The information explains what happens when null is passed
as value parameter

Bug: 24696308
Change-Id: I362c2b1885e882312d1b4b2ff829f8f9f3546301
2016-08-02 12:10:48 -07:00
Makoto Onuki
88870a84ed LauncherApps should also throw when user is locked am: 02f338e23d
am: 897a4f84d0

Change-Id: I0e2112d5c638ddf11a51f004eec2b533acd2251b
2016-08-02 18:15:18 +00:00
Makoto Onuki
02f338e23d LauncherApps should also throw when user is locked
otherwise it'd be racy.

Bug 30406401

Change-Id: I953eb6ae58e029d254d9fdbd5d05a0090b8d2391
2016-08-01 18:15:47 -07:00
Hidehiko Tsuchiya
0d287f1846 Merge \\\"Fix the API compatibility of \\\"UriMatcher#addURI\\\"\\\" am: 3e151273a3 am: bc8d946e09
am: dbf07bb8ef

Change-Id: I105800630bb0b5b2ed610c27741eb027d60b61a2
2016-08-01 17:56:38 +00:00
Fyodor Kupolov
dbf07bb8ef Merge \\"Fix the API compatibility of \\"UriMatcher#addURI\\"\\" am: 3e151273a3
am: bc8d946e09

Change-Id: I6ab069a0e02e6b1053dafe98671ab68ef99ff527
2016-08-01 17:50:09 +00:00
Makoto Onuki
685091f203 Revert \\"LauncherApps should also throw when user is locked\\" am: 2ec16b08ac
am: e330d59c2e

Change-Id: I18070a0a1a69ab8ba366cef5295f09ac598c5e9f
2016-08-01 17:47:10 +00:00
Hidehiko Tsuchiya
bc8d946e09 Merge \"Fix the API compatibility of \"UriMatcher#addURI\"\"
am: 3e151273a3

Change-Id: Ic06ade3ce6dd795e7d12cfba150286933512433d
2016-08-01 17:43:30 +00:00
Makoto Onuki
2ec16b08ac Revert "LauncherApps should also throw when user is locked"
This reverts commit bc4ad85d29.

Will retry when the updated launcher is in.

Change-Id: I428dc93132615480df70aeca7977089af008c041
2016-08-01 17:20:59 +00:00
Hidehiko Tsuchiya
5acd41d155 Fix the API compatibility of "UriMatcher#addURI"
The previous patch (ef23bf19 Allow leading slash in path...) made
a single slash path unmatchable.
To solve it, this patch stops removing a slash character if the path
only has a slash character.
Now, a single slash is a matchable path for a URI without path string.

Bug: 29524484
Change-Id: I90b357aa48be1a3e0cf36e75ed2a9d6532908972
2016-07-30 01:47:50 +00:00
Makoto Onuki
3b5920b2a1 LauncherApps should also throw when user is locked am: bc4ad85d29
am: 5ec63fc3c7

Change-Id: Iacb1a0725553ff8e2c205eba8e74d26b19a9a5dd
2016-07-29 18:38:12 +00:00
Makoto Onuki
bc4ad85d29 LauncherApps should also throw when user is locked
otherwise it'd be racy.

Bug 30406401

Change-Id: Id6b0295933c5639fa23c56d737a7f0199cbd7497
2016-07-29 09:40:40 -07:00
Makoto Onuki
890f85d70f Prevent shortcut access when user is locked am: 9c850012ca
am: cab2462e38

Change-Id: I66faccf78500d057957fb4a7bc361ff8907811b5
2016-07-27 22:28:30 +00:00
Makoto Onuki
9c850012ca Prevent shortcut access when user is locked
Also add some test utility methods that'll be used by CTS.

Bug 30406401

Change-Id: I9396acebbdb3cbe64f6e85877ee62a2131cd6e61
2016-07-27 12:01:46 -07:00
Makoto Onuki
d09c33f32c Update ShortcutManager javadoc
am: fe9c9669a4

Change-Id: I4bfaca9ce475e91ec0dae45739b1623ceac8a43c
2016-07-26 20:50:00 +00:00
Makoto Onuki
fe9c9669a4 Update ShortcutManager javadoc
Bug 30359231

Change-Id: I01f1987416fa1ac3f0669afa1f15f88ff2dd1631
2016-07-25 17:56:09 -07:00
Makoto Onuki
b6ed7b7552 Follow-up to multiple intents support
am: 0eed441c0c

Change-Id: I3007735db610ddd8c608290ffac8edcdcf390758
2016-07-22 02:24:00 +00:00
Makoto Onuki
0eed441c0c Follow-up to multiple intents support
- More unit tests
 - LauncherApps.startShortcut() now supports sourceBounds
 (again)
- Updated the javadoc.

Bug 30218829

Change-Id: Iae208ffd4911d149246ccfd0c4380544c2aafffc
2016-07-21 11:33:37 -07:00
Makoto Onuki
9a6109f284 Merge \"Support multiple intents in ShortcutInfo\" into nyc-mr1-dev
am: b84ce2e034

Change-Id: I53daa680bdf18505896a372e59c7b4bd73d4edca
2016-07-20 23:09:55 +00:00
Makoto Onuki
440a1ea8e2 Support multiple intents in ShortcutInfo
Also fix b/30230996.

TODO: Support the sourceBounds argument to LauncherApps.
startShortcut().

Bug 30218829
Bug 30230996

Change-Id: Ibb6c59d5b7c0a320c21d09436d016d0eac94644f
2016-07-20 14:46:48 -07:00
Makoto Onuki
c74ed0d6dc Merge \"Stop adding FLAG_ACTIVITY_RESET_TASK_IF_NEEDED when...\" into nyc-mr1-dev
am: ceadb1a86a

Change-Id: If26f5a2e8f2a0533b145025734e5819e72a48b28
2016-07-20 00:24:42 +00:00
Makoto Onuki
ceadb1a86a Merge "Stop adding FLAG_ACTIVITY_RESET_TASK_IF_NEEDED when..." into nyc-mr1-dev 2016-07-19 23:57:32 +00:00
Makoto Onuki
347a6bd820 Stop adding FLAG_ACTIVITY_RESET_TASK_IF_NEEDED when...
starting a shortcut.

- Also add API surface to support launching multiple intents

- Also add SM.isRateLimitingActive() which was supposed to be
added but was not due to a bad rebase.

Bug 30218829

Change-Id: I82d60ec0df1e2b889538705f9f8870ee727dd55d
2016-07-19 11:17:12 -07:00
Nicolas Prevot
91b6f5e44f Merge \"Don\'t append userIds for the current user\'s clipData uris.\" into nyc-mr1-dev
am: e723ed8b51

Change-Id: Idf3bf3c6baea706a15df5e68c50d79723a100d9f
2016-07-19 16:15:27 +00:00
Nicolas Prévot
e723ed8b51 Merge "Don't append userIds for the current user's clipData uris." into nyc-mr1-dev 2016-07-19 16:06:44 +00:00
Adam Lesinski
6a9f651b73 Merge \"Deprecate Resources constructor and updateConfiguration() method\" into nyc-mr1-dev
am: c3829f528e

Change-Id: I59c4daf39179409cc3195cda9c89ae604ec36af6
2016-07-16 02:38:24 +00:00
TreeHugger Robot
c3829f528e Merge "Deprecate Resources constructor and updateConfiguration() method" into nyc-mr1-dev 2016-07-16 02:33:55 +00:00
Adam Lesinski
aa19d5e49e Deprecate Resources constructor and updateConfiguration() method
These methods were never meant to be public. Instead, developers
can use Context#createConfigurationContext().

Bug:30088019
Bug:29999297
Change-Id: I2b864136163deda0af99fa3bfe9ef4ee1077341a
2016-07-15 18:01:48 -07:00
Makoto Onuki
6406be311c Merge \"Cache the default launcher.\" into nyc-mr1-dev
am: cf99263662

Change-Id: If8d15587702dad81d9a9025e13dec9820456287b
2016-07-15 22:26:15 +00:00
Makoto Onuki
cf99263662 Merge "Cache the default launcher." into nyc-mr1-dev 2016-07-15 22:22:34 +00:00
Makoto Onuki
3e3f0f1ba8 Merge \"Fix the allowed icon type error message\" into nyc-mr1-dev
am: fd57d549cf

Change-Id: Ibff8d87533d075f0af95ab98d44f67fd4405a951
2016-07-15 21:50:46 +00:00
Makoto Onuki
a97256b793 Fix the allowed icon type error message
Bug 30162778

Change-Id: I925c563c1924c6525fe17afc44626d62864ba7e1
2016-07-15 13:23:54 -07:00
Makoto Onuki
1030520822 Cache the default launcher.
Originally we always checked with PM for the default launcher,
which would take ~2ms.

Now we cache the result, and clears the cache when (any) preferred
activities change.

Bug 30126557

Change-Id: Iceef288cd372c8bb9b119aa493e5173d894f2302
2016-07-15 12:57:03 -07:00
Makoto Onuki
22963b8937 Merge \"Handle locale change and pacakge change in different way\" into nyc-mr1-dev
am: 83fa7a8255

Change-Id: I4988ff6c77f70211336e21729f0f6cd69beefc7d
2016-07-15 00:49:28 +00:00
Makoto Onuki
83fa7a8255 Merge "Handle locale change and pacakge change in different way" into nyc-mr1-dev 2016-07-15 00:39:06 +00:00
Nicolas Prevot
58926243e0 Don't append userIds for the current user's clipData uris.
If the primary user has a managed profile:
When setting the clipboard in the primary user:
The uris of the primary user's clipboard must not have an
embedded userId.

BUG:28572936

Change-Id: I1eb505c4518cc16a6513b950f6c2b1232a22426d
2016-07-14 18:43:02 +00:00
Adam Lesinski
3d53abec7d Merge \\"Don\\'t hold on to AssetManager instances\\" into nyc-dev am: f8e99e72e7
am: 165e9d92b2

Change-Id: I184f3508fd602409d01f105500693b5d02ab37a3
2016-07-14 01:57:52 +00:00
Adam Lesinski
165e9d92b2 Merge \"Don\'t hold on to AssetManager instances\" into nyc-dev
am: f8e99e72e7

Change-Id: Id29ae90fd336657d428a15fa0730b95d717386db
2016-07-14 01:50:52 +00:00
Adam Lesinski
ce9cf64eb3 Merge \"Don\'t hold on to AssetManager instances\" into nyc-dev
am: f8e99e72e7

Change-Id: I71b7499c6399ecbf1d8e8d93bf410aabbb2a1044
2016-07-14 01:50:52 +00:00
Makoto Onuki
4e6cef49ef Handle locale change and pacakge change in different way
- Stop using a custom callback from AM to detect locale changes
and use the LOCALE_CHANGED broadcast instead.

- This would open up a chance where a publisher app fetches
its won manifest shortcuts after a locale change but
ShortcutManager hasn't updated string resources.

- So instead, at every entry point from ShortcutManager, check
if the locale has changed, and if so, update all resources
(and reset throttling).

- Do the same for package change events too.  At every entry point
from ShortcutManager, check if the caller package has been updated,
or any target activities have been disabled.  If so, rescan the
caller package.

- We do *not* do the same check at the LauncherApps entry points,
because the launcher should use the callback to listen to
shortcut changes.

- Also stopped using PackageMonitor for now because we want to
set a higher priority and changing PackageMonitor at this point
seems too much for DR.

Bug 29895275
Bug 30123329

Change-Id: Ib4a2f626a936c7328e2cc032324f5c3d1c3b9122
2016-07-13 17:37:06 -07:00
Adam Lesinski
e60064ab3c Don't hold on to AssetManager instances
If we enter multi-window mode or load WebView
assets into a Resources object, then the underlying
AssetManager instance may change.

crbug.com/627586

Bug:30118654

Change-Id: I837637bdad5370809db7f060d7d8536b536cad9e
2016-07-14 00:22:12 +00:00
Makoto Onuki
a74fce83ae Merge \"Revert \"Revert \"Revert \"Handle package broadcasts before apps do\"\"\"\" into nyc-mr1-dev
am: 6eefe67b2c

Change-Id: I514fb0b48c79644f7bc3154b3a18fabfc4c35d15
2016-07-13 20:21:56 +00:00
Makoto Onuki
f34c308dfd Revert "Revert "Revert "Handle package broadcasts before apps do"""
This reverts commit 886ba78dfb.

With the tests updated.

Change-Id: I162e6ca23c667f90feddc1e9f42b554a416295cf
2016-07-13 10:40:31 -07:00
Makoto Onuki
80dd14e061 Merge \"Revert \"Revert \"Handle package broadcasts before apps do\"\"\" into nyc-mr1-dev
am: 98802f6007

Change-Id: I51e9cedb8cba67b987f8ed6b92bcf66082594990
2016-07-13 17:18:16 +00:00
Makoto Onuki
886ba78dfb Revert "Revert "Handle package broadcasts before apps do""
This reverts commit efbbe7ea9d.

Change-Id: I3dbb080db5121307f533a7d411f4f5d47225500e
2016-07-13 17:08:26 +00:00
Makoto Onuki
5f18bbe034 Merge \"Revert \"Handle package broadcasts before apps do\"\" into nyc-mr1-dev
am: 7f3187bb0d

Change-Id: I15a7629138e1c0b44620bd6239d7a14d3df14b82
2016-07-13 16:47:11 +00:00
Makoto Onuki
efbbe7ea9d Revert "Handle package broadcasts before apps do"
And fix b/29939691 (don't try to load locked users) in a different way

Bug 29939691
Bug 29895275

Change-Id: Ib55f9c5d5547c54daa4e05c1e50bf4bbceaf1991
2016-07-12 14:47:20 -07:00
Makoto Onuki
b1e0982173 Merge \"Throw ActivityNotFoundException when failed to launch shortcut\" into nyc-mr1-dev
am: 50752f7391

Change-Id: I0dcb7b89a32de22dee41ebe617e47ae935ac8227
2016-07-12 17:14:56 +00:00
Makoto Onuki
fcf7db9eed Merge \"Handle package broadcasts before apps do\" into nyc-mr1-dev
am: ae13eee9c6

Change-Id: I4eee7d585bfe1218fae425f2b3f2097965924587
2016-07-11 21:40:25 +00:00