Commit Graph

22248 Commits

Author SHA1 Message Date
Alex Kershaw
cb577bca43 Merge "Map error code 51 to an incorrect OS error." 2019-01-08 16:32:23 +00:00
Michael Wachenschwanz
266dd3bfd7 Merge "Add Usage Reporting Api to UsageStatsManager" 2019-01-08 06:50:24 +00:00
Shuo Qian
da241c5355 Merge "Call Redirection Service enhancement" 2019-01-07 23:00:37 +00:00
Michael Wachenschwanz
36778525ba Add Usage Reporting Api to UsageStatsManager
The Usage Reporting Api allows apps to report usage within the app to
platform. Apps with the the OBSERVE_APP_USAGE permission may register
observers that use the reported in-app usage.

Test: manual (using the included Usage Reporter App)
Test: atest CtsUsageStatsTestCases:UsageReportingTest
Test: atest FrameworksServicesTests:AppTimeLimitControllerTests
Bug: 112486938

Change-Id: Iddd6f0993bbbf68a2032b34d473ef8d67da7747a
2019-01-07 14:56:06 -08:00
Chad Brubaker
9a4cf62c90 Merge "Add intent for permission usage info learn more" 2019-01-07 20:42:02 +00:00
Ecco Park
05df45db02 passpoint-r2: change the return type of getAllMatchingWifiConfigs
This change is required to show the signal level associated with service
name on UI for installed passpoint profile as picking strongest one up
from matching scanResults.

In order to get a map that consists of WifiConfiguration and a list of
ScanResults, three steps are required.

1) Gets a map that consists of FQDN(Fully Qualified Domain Name) of
a matching Passpoint profile and a list of ScanResults.
2) Gets a list of WifiConfigurations for Passpoint profiles matched a
provided list of FQDN.
3) Creates a new map that consists of WifiConfiguration and a list of
ScanResult.

Bug: 119514793
Test: ./frameworks/base/wifi/tests/runtests.sh
Test: tested with R1 AP for installing profile and R2 AP for connection
Change-Id: I0d56dbdddae4e365b909b9c8f3eff3b0121dc5de
Signed-off-by: Ecco Park <eccopark@google.com>
2019-01-07 15:38:12 +00:00
TreeHugger Robot
42d3cf3647 Merge "Change the API for setting Notification Actions to be contextual." 2019-01-07 15:30:46 +00:00
Gustav Sennton
005d7a0d07 Change the API for setting Notification Actions to be contextual.
According to Android API council we shouldn't add a new semantic-action
flag to mark an action as contextual. Instead we should use a boolean
flag.
This CL adds that boolean flag.

Bug: 120842160
Test: build and run Notify app (in
vendor/google_experimental/users/cinek/), and ensure smart actions are
showing when the 'No Smart Actions' chooser is changed to
'Short Smart Actions'.
Change-Id: I5fc6dfa37ab28e3f29529cb6fda99c049783eb80
2019-01-07 10:59:45 +00:00
Jimmy Chen
9d11970303 Merge "p2p: add frequency field in WifiP2pGroup" 2019-01-07 06:25:54 +00:00
Jimmy Chen
1f031c62f4 p2p: add frequency field in WifiP2pGroup
The frequency will be used for fast group connection and Wifi p2p metrics.

Bug: 119998319
Test: manuall test
      * check this value in metrics dump

Change-Id: I5e153d3b022b2d27ddabf5f0fb43f499aeec924a
2019-01-07 09:50:18 +08:00
TreeHugger Robot
30635a95d2 Merge "Unhide MediaItem2" 2019-01-07 00:23:45 +00:00
Sudheer Shanka
da74280f59 Merge "Add Downloads.Impl.COLUMN_MEDIASTORE_URI & DownloadColumns.Description." 2019-01-06 23:39:48 +00:00
Sudheer Shanka
fe7668ab4d Add Downloads.Impl.COLUMN_MEDIASTORE_URI & DownloadColumns.Description.
Entries from DownloadProvider are added to MediaStore Downloads
collection. COLUMN_MEDIASTORE_URI will be used to track corresponding
entries in MediaProvider. We can't re-use COLUMN_MEDIAPROVIDER_URI
for this purpose because it is updateable by apps.

Bug: 120876251
Test: atest DownloadProviderTests
Test: atest cts/tests/app/src/android/app/cts/DownloadManagerTest.java
Test: atest MediaProviderTests
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: Ifd252c54f4ee739a31be2866896efac6696a088e
2019-01-05 19:01:40 -08:00
Jeff Sharkey
a1767a290a Grant/revoke legacy "Storage" permissions.
The new isolated storage model we're building in Q introduces new
strongly-typed media permissions which replace the broad "Storage"
runtime permission.

That legacy "Storage" permission is marked as being "removed", and
it also splits into the new media permissions, but apps are confused
when they request the "Storage" permission, which no longer appears
as granted when the user accepts the new split media permissions.

After discussing with the permissions team, the best short-term
solution is to add special-case logic that grants the legacy
permissions when *any* of the new media permissions have also been
granted.  Only when the user revokes *all* of the new media
permissions is the legacy permission then revoked.  (MediaProvider
is already internally filtering the relevant content based on what
new media permissions the caller holds.)

Bug: 121227859
Test: manual
Change-Id: Ic87f7f93a816e91f7189509386255a260378c255
2019-01-05 12:59:06 -07:00
Jeff Sharkey
8f70cac068 Merge changes from topics "trashz", "bucketz"
* changes:
  Public APIs for "trashing" media.
  Define secondary media item bucketing.
2019-01-05 02:33:26 +00:00
Sudheer Shanka
2cf41e4fbf Merge "Revert "Added app context to smart screen brightness."" 2019-01-05 00:22:14 +00:00
Jeff Sharkey
5cc407f702 Public APIs for "trashing" media.
The "delete" operation is immediate and permanent, and users may wish
to instead mark content as being "trashed", so they can recover
accidentally trashed items before they're permanently deleted.

The default trash timeout is 48 hours, which should be enough time
to recover items the user cares about.  Apps can also use a custom
timeout if desired.

This is implemented by recording an "expiration" time for trashed
items, and deleting expired items during the next idle maintenance
pass.  Also use this expiration time to clean up pending items that
haven't been published; by default apps have a day to publish
pending items.

Bug: 121227045
Test: atest MediaProviderTests
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: I2e371b308dc135ad5363709a6f5385e4456bcb96
2019-01-04 16:17:03 -07:00
Chad Brubaker
1bfef2cade Add intent for permission usage info learn more
The manifest permission usage info declarations are limited in what they
allow the applications to specify. Applications can have an activity for
that handles this intent in order to provide free form application
specific details such as privacy policies, specific examples, etc.

Test: API definition, usage will follow
Bug: 111207567
Change-Id: I90b292e4c1cb8847a9a9d7b8071aaff2ee7d11fb
2019-01-04 14:40:33 -08:00
Ruchi Kandoi
d98f84b0d9 Merge "Deprecate Android beam APIs and create a feature flag to gate them" am: 6a3d45c4b2 am: d0c8a165d8
am: a33da54c8d

Change-Id: I1eda6b7d5879045e6bd35821ee5368ef72855942
2019-01-04 14:18:15 -08:00
Ruchi Kandoi
a33da54c8d Merge "Deprecate Android beam APIs and create a feature flag to gate them" am: 6a3d45c4b2
am: d0c8a165d8

Change-Id: I886941a5011fdf204fe62c1162dd2ad69d466f62
2019-01-04 14:06:55 -08:00
Ruchi Kandoi
96fe50bc1b Deprecate Android beam APIs and create a feature flag to gate them
Test: Test application trying to invoke the API
Bug: 117519147
Change-Id: Icd3187e4f3e0f180cb42d36011f60895fb395002
2019-01-04 21:49:00 +00:00
Sudheer Shanka
b3f60657a3 Revert "Added app context to smart screen brightness."
This reverts commit 54478d9cab.

Reason for revert: Broke work profile apps (http://b/122107873)

Bug: 111425369
Bug: 122107873
Change-Id: I7e3bf97725d542eb92a04bc75662ca6680287ba2
2019-01-04 21:34:58 +00:00
Jeff Sharkey
7b148d7ae7 Define secondary media item bucketing.
The existing buckets work well for first-level clustering of related
media, but it's common for multiple media items within a directory
to form a conceptual unit.  To support this, we're creating a
second-level of bucketing which is formed using the first part of
the file name.

This supports common industry-standard patterns like:

    IMG1024.JPG
    IMG1024.CR2

While also opening the door to further flexibility in the future:

    IMG1024.JPG
    IMG1024.HDR.JPG
    IMG1024.BURST001.JPG
    IMG1024.BURST002.JPG
    IMG1024.BURST003.JPG
    IMG1024.DNG
    IMG1024.DEBUG.BIN

We're currently advocating that the default representation of one of
these secondary clusters is the shortest .JPG filename contained
inside, with length ties broken alphabetically.

Clean up database management so that upgraded schema always matches
pristine schema, with tests to verify.  Generate views using the
actual projection mappings used at runtime.

Bug: 115377970
Test: atest MediaProviderTests
Test: atest cts/tests/tests/provider/src/android/provider/cts/MediaStore*
Change-Id: Ic679055ab6c884d2048626f51670a5dd370281c0
2019-01-04 14:33:49 -07:00
Ruchi Kandoi
0e1c39bf55 Merge changes from topic "multi-se-support" am: 54502d68ea am: 9c0ec9be9f
am: 650ff88a4c

Change-Id: I562af1c9c1b0c254d8b23466caceb94ef767aa1f
2019-01-04 12:38:53 -08:00
Ruchi Kandoi
650ff88a4c Merge changes from topic "multi-se-support" am: 54502d68ea
am: 9c0ec9be9f

Change-Id: Ieca9b142094c8c568409290fdf690fad529ef604
2019-01-04 12:25:13 -08:00
Ruchi Kandoi
54502d68ea Merge changes from topic "multi-se-support"
* changes:
  Add a mechanism to register AIDs to specific off-host SE
  Add Off-Host Card Emulation Features
2019-01-04 19:56:41 +00:00
Etan Cohen
4fd1f35592 Merge "[AWARE] Make PeerHandle parcelable" 2019-01-04 18:29:46 +00:00
Philip P. Moltmann
72401d4f77 Merge "Rename RuntimePermissionPresenter to PermissionController" 2019-01-04 17:32:44 +00:00
Alex Kershaw
7bcb2fa2dc Map error code 51 to an incorrect OS error.
Error code 51 is given when trying to downgrade a device, so this is
required to fix our broken CTS test and give an accurate error code to
the admin.

Change-Id: I436fb7a605dc47dc5388c78c67d7db08ffcf867a
Fixes: 120896091
Test: atest CtsDevicePolicyManagerTestCases:com.android.cts.devicepolicy.DeviceOwnerTest#testInstallUpdate
2019-01-04 15:18:46 +00:00
Richard Uhler
9b86c73c45 Merge changes from topic "rollback_systemapi"
* changes:
  Add test for multi-package rollback.
  Fix bug where RollbackManagerService ignores package name.
  Add test for user data rollback.
  Move rollback manager implementation to RollbackManagerServiceImpl
  Don't expose RollbackManagerService's internal Handler.
  Make RollbackManager @SystemApi.
2019-01-04 09:02:21 +00:00
Sungsoo Lim
d922e0d659 Unhide MediaItem2
Bug: 122334310
Test: pass MediaItem2Test
Change-Id: Icfdefec07071c897e1d70601fa3ff5d21e80e18c
2019-01-04 15:14:22 +09:00
Hyundo Moon
7053844db7 Revert "Introduce ControllerCallbackLink"
This reverts commit e521669b5d.

Reason for revert: Another CL will be uploaded which makes the APIs public, not @SystemApi.

Bug: 122169124
Change-Id: Ie9ed1067596fe1724879e81d768ac8252eda7841
2019-01-04 14:27:45 +09:00
Hyundo Moon
fcaaba066a Revert "Introduce SessionCallbackLink"
This reverts commit 8eee83e594.

Reason for revert: Another CL will be uploaded which makes the APIs public, not @SystemApi.

Bug: 121239657
Change-Id: I0537ffd487ab6889213b8917615156caaec17eb5
2019-01-04 14:20:47 +09:00
Ruchi Kandoi
44bb579621 Add a mechanism to register AIDs to specific off-host SE
Test: manual
Bug: 117253962
Change-Id: Id34bf84dcff7789548eac19478010838bebd9758
2019-01-04 01:14:50 +00:00
Ruchi Kandoi
ebf267a2a4 Add Off-Host Card Emulation Features
Test: CTS test; manual
Bug: 117253962
Change-Id: I7c35b1bffbc57870bb8c67704811a2649854d94e
2019-01-03 23:00:59 +00:00
Philip P. Moltmann
bc054d8436 Rename RuntimePermissionPresenter to PermissionController
As this has already evolved from just presenting data. In the future any
permission related calls to the permission controller will be added here.

As the calls are protected by different permissions the binding will not
require a permission anymore, but each individual call checks the
permission.

Bug: 120221960
Test: Looked at settings UI showing data from this interface
Change-Id: I6b4a5c3b7ee17b145e11e2c1b6e11a8a232bffed
2019-01-03 11:39:43 -08:00
TreeHugger Robot
8319a7ee7f Merge "Plumb new functor in native/webview" 2019-01-03 19:15:24 +00:00
Bo Liu
d6668e7c0c Plumb new functor in native/webview
Add plumbing to native/webview for the new functor.
Add a void* data parameter to avoid having to use a thread safe
map for in both the plumbing and in webview.

Test: Compiles and webview runs
Bug: 120997728
Change-Id: I0f9f3acb05688a5afcf95974bc0b3b117f33a8e3
2019-01-03 19:15:18 +00:00
Adam He
dc0d7b0ccc Merge "Merge app-specific and generic user data for field classification." 2019-01-03 17:15:57 +00:00
Hai Shalom
a088295e7f Merge "[DPP] Add DPP key management capability API" 2019-01-03 17:05:44 +00:00
Hai Shalom
4dab74f563 Merge "[DPP] Added new DPP Initiator APIs and callbacks" 2019-01-03 17:05:28 +00:00
Jean-Michel Trivi
9958c94e4d Merge "Dynamic audio policies: multi-zone through uid/device affinity" 2019-01-03 16:16:50 +00:00
Wale Ogunwale
a7b3c1a7b2 Merge "Add support for singleTaskInstance displays" 2019-01-03 16:00:22 +00:00
TreeHugger Robot
0995402a41 Merge "Refactoring canSuspendPackage to support batch queries" 2019-01-03 02:12:57 +00:00
sqian
3ac6c04acc Call Redirection Service enhancement
- Add an extra with onPlaceCall in the current CallRedirectionService
surface to indicate whether an interactive response is allowed or not
when call is initiated into the implemented redirection service.

- Add an extra with redirectCall to indicate if Telecom should show UI
to users to confirm the redirection.

- Rename targetPhoneAccount in onPlaceCall to initialPhoneAccount

Bug: 64959558
Test: Treehugger
Change-Id: Ic924bb234b2b2e5533c5869257e815777580ac5d
2019-01-03 01:13:28 +00:00
Wale Ogunwale
9e737db3c9 Add support for singleTaskInstance displays
singleTaskInstance displays will only contain on task. This is mostly
used by ActivityView for use cases like bubbles.

Bug: 121047677
Test: atest ActivityManagerMultiDisplayTests#testSingleTaskInstanceDisplay
Change-Id: I5166015d8ecfa2845b4ffaa6c16d21a30a56b8a8
2019-01-02 14:27:05 -08:00
Adam He
1cb6f80670 Merge app-specific and generic user data for field classification.
Bug: 118617202
Test: atest CtsAutoFillServiceTestCases
Test: atest android.autofillservice.cts.FieldsClassificationTest android.autofillservice.cts.UserDataTest

Change-Id: Ibb958e0ca790d798c7c62bce5f7dbc108041fe07
2019-01-02 13:22:18 -08:00
Jean-Michel Trivi
d6f65dea01 Dynamic audio policies: multi-zone through uid/device affinity
Augment dynamic audio policies with audio device affinity for
 apps (a.k.a multi-zone handling), to enable associating apps
 with a set of audio devices (which may form a "zone" in cars).

Bug: 111647296
Test: requires device with routing policy started by CarService
Change-Id: I2994ae80624556d9321f788a0575d9f732157228
2019-01-02 12:38:12 -08:00
Hyundo Moon
c61fc6897c Merge "Introduce SessionCallbackLink" 2019-01-02 11:03:50 +00:00
Richard Uhler
c739c8c3f9 Make RollbackManager @SystemApi.
Require callers hold a new MANAGE_ROLLBACKS permission to interact with
the RollbackManager.

Bug: 112431924
Test: atest RollbackTest, with new test for permissions added,
      and with selinux in permissive mode.
Test: atest CtsPermission2TestCases:PermissionPolicyTest
Change-Id: I73f4f3457d85be580670cd69c89066d2cc348186
2019-01-02 09:19:45 +00:00