Commit Graph

4317 Commits

Author SHA1 Message Date
Mark Lu
9bc63b9bf0 docs: add info to SharedPreferences.Editor.putString
am: fb48521f41

Change-Id: I948c8091a70180e29a601d6cba40d7fb0cf2d76a
2016-08-08 22:49:08 +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
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
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
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
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
fe9c9669a4 Update ShortcutManager javadoc
Bug 30359231

Change-Id: I01f1987416fa1ac3f0669afa1f15f88ff2dd1631
2016-07-25 17:56:09 -07: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
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
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 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
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
cf99263662 Merge "Cache the default launcher." into nyc-mr1-dev 2016-07-15 22:22:34 +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
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
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
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
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
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
83f6d2da37 Throw ActivityNotFoundException when failed to launch shortcut
Originally the code used IIntentSender, but I had to switch to calling
startActivitiesInPackage() directly, because sendIntentSender() does
not support returning errors.

Bug 30035853

Change-Id: I5d7669c96a2f1805373c71aebf45b97ac1d01ff6
2016-07-11 14:37:18 -07:00
Makoto Onuki
ae13eee9c6 Merge "Handle package broadcasts before apps do" into nyc-mr1-dev 2016-07-11 21:29:59 +00:00
Jeff Sharkey
9dbc259b4f Merge "Revert "Treat everyone the same."" into nyc-mr1-dev 2016-07-11 21:23:31 +00:00
Makoto Onuki
a2241834a5 Handle package broadcasts before apps do
- Have PM to call the shortcut manager directly before sending a
pacakge broadcast.

- The shortcut manager will enqueue a task to handle a package
broadcast, which will be executed on Handler.

- At the entry points of all external facing methods, block until
all pending tasks are finished.

Bug 29895275

Change-Id: Ib29fa3c9c8d9b9e0ca5c8f1e9da2a390324960a4
2016-07-11 11:28:10 -07:00
Jeff Sharkey
f9c41aeeb5 Revert "Treat everyone the same."
This reverts commit 7678aeddd9.

Bug: 30051184, 29746499
Change-Id: Ibd8bc2771d67c4db61c82dcc8a569eb8adfef8de
2016-07-11 16:22:29 +00:00
Makoto Onuki
4a91096a4c ShortcutManager javadoc
Bug 29515722

Change-Id: If4805a7f28a2ee602094fca06eb1ff30f258dc1e
2016-07-11 09:08:49 -07:00
TreeHugger Robot
6ac6ceb28b Merge "Add values to ApplicationInfoFlags" into nyc-mr1-dev 2016-07-07 23:15:26 +00:00
Todd Kennedy
5a32c6c290 Add values to ApplicationInfoFlags
Need to add MATCH_DISABLED_UNTIL_USED_COMPONENTS [and the deprecated
GET_DISABLED_UNTIL_USED_COMPONENTS] since those are used when building
the ApplicationInfo object.

Bug: 29824931
Change-Id: I09b24427222fed082f0946717826d2e0db857c7a
2016-07-07 14:29:06 -07:00
Makoto Onuki
07e234c9d7 Merge "Hide more shortcut APIs" into nyc-mr1-dev 2016-07-07 20:52:23 +00:00
TreeHugger Robot
a1b026ea2e Merge "Treat everyone the same." into nyc-mr1-dev 2016-07-07 20:20:01 +00:00
Makoto Onuki
f805b43da7 Hide more shortcut APIs
Change-Id: I911b4963b878e67ad2084190ac080e8555ba63c0
2016-07-07 11:56:04 -07:00
Dave Langemak
8317f93012 Merge "Hide APIs that shouldn't have been public" into nyc-mr1-dev 2016-07-07 15:38:12 +00:00
Makoto Onuki
598aca4672 Hide APIs that shouldn't have been public
Change-Id: I40f1c8e9c6fe991e782bf3dd772f305df641b267
2016-07-06 16:11:54 -07:00
Daniel Nishi
c29d2b0492 Move the MIME type icon detection into the platform.
This allows the MIME type icons to be used in other system apps.
In this instance, the StorageManager app needs to show file icons
for a given file. By moving the icon mapping into a static library,
we can avoid duplicating the mapping and resources.

Bug: 29826961
Change-Id: Ic2dc7970cc5a5ca430e33425eb9f1ecbd733fe9a
2016-07-06 10:57:06 -07:00
Makoto Onuki
ea11db15bd Start shortcuts as if publisher apps did using PendingIntent
Bug 29639471

Change-Id: I2aad115669b431cbea785ba92040b1958117ab47
2016-06-29 18:43:45 -07:00
Makoto Onuki
01e51e59dd Merge "Address API council feedback (continued)" into nyc-mr1-dev 2016-06-29 23:53:51 +00:00
Makoto Onuki
d6880797f7 Address API council feedback (continued)
Got a second set of comments.

Bug 29757958

Change-Id: Ib3a3ffd28bc3e35eb0218b0819870eb5c6ebadb5
2016-06-29 15:22:56 -07:00
Jeff Sharkey
7678aeddd9 Treat everyone the same.
Bug: 29746499
Change-Id: I8344e42c5c55e5414bcc223e4caa857dc06de750
2016-06-29 15:24:37 -06:00
TreeHugger Robot
23bc74a8d5 Merge "Define deprecated fields in IntDef's" into nyc-mr1-dev 2016-06-28 20:48:37 +00:00
Todd Kennedy
a1066ed6c2 Merge \"Default minSdkVersion to \'1\'\" into nyc-dev
am: a98e3e3ede

Change-Id: I8d2b7205f80b3cae5dce04839890df6aafa8449e
2016-06-28 19:16:40 +00:00
Todd Kennedy
1f397f4e7b Define deprecated fields in IntDef's
Tools need all of the valid constants to handle legacy apps; even
though we want developers to use the new constant names.

Bug: 29824931
Change-Id: I5f8055d50d1d3f32cfbed7459d8a497cfbd3661e
2016-06-28 12:14:11 -07:00
Todd Kennedy
4f6570878c Default minSdkVersion to '1'
Exception when targetSdkVersion is a letter API [eg 'N']. While this
is technically not according to the external docs, it's the behaviour
with prior platforms.

Bug: 29817839
Change-Id: I8382909dbe62de7b2ddfb7995ce11d5c2f43372e
2016-06-28 10:31:05 -07:00
TreeHugger Robot
d06f87399b Merge "Frameworks/base: Add new flow to OtaDexoptService" into nyc-mr1-dev 2016-06-27 23:50:37 +00:00
Andreas Gampe
cc241a580c Frameworks/base: Add new flow to OtaDexoptService
Add functionality to capture/intercept installd communication, and
use this to return the full communication for dexopt. These parameters
can be used to drive otapreopt_chroot directly.

Keep the old direct invocation alive until devices have transitioned
to a service that exposes this API.

In preparation for renaming of A/B OTA artifacts to include target
slot names.

Bug: 25612095
Bug: 28069686
Change-Id: I14728ee1266f3882cada8f08dd21891ed5f7a0cb
2016-06-27 15:10:12 -07:00
Steven Ng
dc52eaaa98 Merge "Disallow disable / hide device provision app" into nyc-mr1-dev 2016-06-27 18:50:02 +00:00