Commit Graph

4349 Commits

Author SHA1 Message Date
Makoto Onuki
104f805337 App Shortcut: Clarify which attributes must be resources
Test: javadoc only -- m -j32 offline-sdk-docs

Bug 32495737

Change-Id: I4c3884172761b128d07f1c2948ab7ccc53951a7e
2016-10-31 11:31:45 -07:00
Kevin Hufnagle
68d699d100 docs: Updated ShortcutManager and ShortcutInfo class references.
Bug: 32074598
Change-Id: I168d49a8542b411a074dc6e9120b0f08f72a829a
2016-10-18 15:53:09 -07:00
Dianne Hackborn
851ec49de7 Fix issue #32125907: Intent.replaceUnsafeExtras() corrupts original bundle
We now recursively generate new Bundle objects if we need to
do any stripping.

Change-Id: I4ca7896a0771c25264591ae7c79df85816d630d4
2016-10-12 18:17:58 -07:00
Chet Haase
c158431f8e Fix small typo in ShortcutManager header docs
Bug: 32093275 fix typo in ShortcutManager javadocs
Test: no test, just words in the header docs
Change-Id: Icd33481a7f285686429d908cf92de0f6f886f962
2016-10-11 21:48:55 +00:00
Kevin Hufnagle
e83639f66a docs: Added note in getCacheDir() that developers can use directory obtained from getExternalCacheDir() to store app caches larger than 1 MB. am: e9681e192a
am: 2e8026acc0

Change-Id: I93a1abe6b80a441f8c441390dacbff2824d52e57
2016-09-27 00:02:44 +00:00
Kevin Hufnagle
abfc0340d7 docs: Removed all instances of "i.e." in IntentFilter parameter descriptions. am: e20b3d78e3
am: 9402b319fe

Change-Id: Id7d4b705073802abcb2d902b50673a09933ff3da
2016-09-27 00:01:00 +00:00
Kevin Hufnagle
2e8026acc0 docs: Added note in getCacheDir() that developers can use directory obtained from getExternalCacheDir() to store app caches larger than 1 MB.
am: e9681e192a

Change-Id: Ide8f3c2dd5414737c798c20c1fe9f11dcd9640ce
2016-09-26 23:36:25 +00:00
Kevin Hufnagle
9402b319fe docs: Removed all instances of "i.e." in IntentFilter parameter descriptions.
am: e20b3d78e3

Change-Id: I8d677ebcf03c28f46874514408240162cd6331c5
2016-09-26 23:34:58 +00:00
Kevin Hufnagle
ee3fc61cf9 docs: Fixed example of ACTION_VIEW intent am: aedfd75b1b
am: 2c885fc5ea

Change-Id: I1d94ee6938726736d6cbccafea848dd6f3d6a350
2016-09-26 23:16:02 +00:00
Kevin Hufnagle
2c885fc5ea docs: Fixed example of ACTION_VIEW intent
am: aedfd75b1b

Change-Id: Iaaaa1cb0f6d796ad5c5c178c70850fd83e635013
2016-09-26 23:00:51 +00:00
Kevin Hufnagle
bec2e99f95 docs: Adjusted return value desc. for getApplicationEnabledSetting am: 5add769f59
am: d23fc43965

Change-Id: I27847f0935c047e74ab986c501fce160679a80d7
2016-09-26 23:00:16 +00:00
Kevin Hufnagle
d23fc43965 docs: Adjusted return value desc. for getApplicationEnabledSetting
am: 5add769f59

Change-Id: Ic0566aa6e2764a9d0db58c6f66ad028229a8fdca
2016-09-26 22:52:54 +00:00
Kevin Hufnagle
e9681e192a docs: Added note in getCacheDir() that developers can use directory
obtained from getExternalCacheDir() to store app caches larger than
1 MB.

Bug: 22505268
Change-Id: I9972ba5ef7b43a135c00ac48a2e5ccb1fcc5b103
2016-09-23 16:44:03 -07:00
Kevin Hufnagle
e20b3d78e3 docs: Removed all instances of "i.e." in IntentFilter parameter
descriptions.

Bug: 5877117
Change-Id: Iccb16589a72d3180330f13ec224578a0c5ad81c6
2016-09-22 18:33:57 -07:00
Svetoslav Ganov
32ce3c8797 Merge "[DO NOT MERGE] Don't show account access request UI until app launched." into nyc-mr1-dev 2016-09-10 00:36:21 +00:00
Svet Ganov
d63cde7ba4 [DO NOT MERGE] Don't show account access request UI until app launched.
Sync adapters that don't have account access cannot run until
the user explicitly approves in the UI. This is spammy given
the user may not use the app right away. This change doesn't
show the notificaiton until the app has run.

bug:31162498

Change-Id: I1f4f2d2e9426f78763590e8aa542b94d6e93e488
2016-09-09 15:13:07 -07:00
TreeHugger Robot
295f5108f1 Merge "Add filter ordering" into nyc-mr1-dev 2016-09-09 19:59:46 +00:00
Kevin Hufnagle
aedfd75b1b docs: Fixed example of ACTION_VIEW intent
The ACTION_VIEW intent contained a content path that was inconsistent
with each of the other examples on the Intent reference page. Added
the "people" directory to the content path to remedy this issue.

Bug: 26405268
Change-Id: Ieb4f67e072338a108b9775d3bafad3d0773533d2
2016-09-08 21:56:25 -07:00
Svet Ganov
91d37f43c7 [DO NOT MERGE] While-list apps to access account if already saw it
Sync adapters without an account access cannot run until the
user approves the account access (for the case the account
access is not allowed by other policy such as being singed
with the same cert as the authenticator). However, if the
sync adapter package already got the account from another
app which means it already saw the account we white-list
the sync adapter app to access the account as it already
saw it - the bird is out of the cage.

bug:31162498

Change-Id: I2b72f3b0d6307561ed68db2f2e9c900b15e8d098
2016-09-08 16:46:46 -07:00
Todd Kennedy
c2e96d45d2 Add filter ordering
Filter ordering allows automatic disambiguation between multiple filters
that matching a pattern. Ordering currently only works for EphemeralResolveInfo
objects.

Bug: 30837021
Change-Id: Ia217218c7c7d159dbd75d7733c45556e690d06d2
2016-09-08 15:34:03 -07:00
Kevin Hufnagle
5add769f59 docs: Adjusted return value desc. for getApplicationEnabledSetting
The return value now references ApplicationInfo instead of
ComponentInfo.

Bug: 18123642
Change-Id: I595befe62dbce997becb689362abe5e4483b82c4
2016-08-29 16:50:17 -07:00
TreeHugger Robot
80855e154e Merge "Implement new ephemeral resolver design" into nyc-mr1-dev 2016-08-26 20:28:04 +00:00
Paul Stewart
0e164b199e Document correct context for obtaining WifiManager
Added comments to both WifiManager WIFI_SERVICE.

Bug: 25015174
Change-Id: Ibd1e21d860ef2b7cc432b3da76671d22c02ef7cb
2016-08-26 09:27:04 -07:00
Mark Lu
e16c82d224 docs: fix link in Loader reference page am: 9f52b7a4a8
am: f496b9a981

Change-Id: I7a7ee695fadb2e0774ef84724a4320fc73b45a88
2016-08-26 01:03:56 +00:00
Mark Lu
f496b9a981 docs: fix link in Loader reference page
am: 9f52b7a4a8

Change-Id: I32164f55f9b42dc50f13756c942644350a7d643e
2016-08-26 00:53:53 +00:00
Fyodor Kupolov
7540b79fee Update services info before returning authenticators
am: 814464894c

Change-Id: I3d7eb42ef73ad77cb44c251a493ae967bcc0f651
2016-08-25 00:08:38 +00:00
Fyodor Kupolov
814464894c Update services info before returning authenticators
Added RegisteredServicesCache.updateServices method which allows callers
to request an update to services for which package has been updated.

Added a call to updateServices in getAuthenticatorTypesInternal

Test: Manually tested update flow on test authenticator with an artificial
      delay in broadcast handling
Bug: 30979262
Change-Id: I499b2ee0be53fed01201c56068d929b6d621a78e
2016-08-24 22:47:38 +00:00
Svetoslav Ganov
5cb2973495 Only sync adapters with access can see an account - framework
It was possible for a sync adapter without accounts access to
see the account which it is supposed to sync which can be used to
identify the user. This change ensures that only sync adapters
with account access can run (which results in seeing the account),
otherwise we involve the user to approve access only to this account.

A sync adapter can access an account if one of these is true:
 - it is signed as the authenticator for this account
 - has the GET_ACCOUNTS permission
 - has an auth token for the account
 - it is a preinstalled app (system or privileged)

The main thing we need to figure out is if the extra prompts
for giving access to a sync adapter to the account create too
much friction.

bug:28163381

Change-Id: Ie083bb681b5a2aed81ca5f6a062193a175fad77e
2016-08-23 21:43:27 +00:00
Todd Kennedy
ef8d8ea24a No need to check package name
Change-Id: I8c403ca2bc38f2c7191b6e9a709286ac7e450ac4
Fixes: 30958291
(cherry picked from commit afb5269ad6)
2016-08-23 17:09:52 +00:00
Todd Kennedy
fea1b776e9 Implement new ephemeral resolver design
In the new design, the ephemeral installer can be returned from
queryIntentActivities which means any intent resolution could potentially
return the installer. Additionally, the new design calls for a platform
defined broadcast receiver that receives the status from the ephemeral
installer. This receiver then starts the final intent -- either to launch
the ephemeral application or to launch the fallback.

For more detail, see go/ephemeral-design

Bug: 30805203
Bug: 30273584
Change-Id: I6644bbb4f180d2d22c63af04b9857577516344a9
(cherry picked from commit 8e2d9d1d90)
2016-08-22 16:09:13 -07:00
Todd Kennedy
afb5269ad6 No need to check package name
Change-Id: I8c403ca2bc38f2c7191b6e9a709286ac7e450ac4
Fixes: 30958291
2016-08-22 15:47:22 -07:00
Mark Lu
9f52b7a4a8 docs: fix link in Loader reference page
Bug: 29764129
Change-Id: I5ca881bb30adbbaf65ba37b1cf63903a4fc5600e
2016-08-12 15:48:05 -07:00
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