Commit Graph

3032 Commits

Author SHA1 Message Date
Sudheer Shanka
252eef4aa9 Merge "Revert "Add API to allow apps with location permission to access data blobs."" into sc-dev 2021-05-17 22:31:53 +00:00
Sudheer Shanka
e9a38062dc Revert "Add API to allow apps with location permission to access data blobs."
This reverts commit e0237fa50b. Reverting
based on the feedback from Permissions and privacy team.

Bug: 158705914
Test: atest --test-mapping apex/blobstore
Change-Id: Id057e8c61dcf9d3d111ab20530a2074083052392
2021-05-17 22:31:09 +00:00
Jeff Sharkey
63a1453832 Merge changes from topic "may15" into sc-dev
* changes:
  Apply "attributionTags" to all component types.
  Apply AttributionSource during Intent delivery.
2021-05-16 17:54:40 +00:00
Jeff Sharkey
5014fbd644 Apply "attributionTags" to all component types.
Components within an application are often a good boundary for
developers to declare "attribution" information, such as an Activity
or Service used to offer a specific sub-feature.

This change expands the "android:attributionTags" manifest attribute
to apply to all component types, and it then automatically configures
the associated Context with Context.createAttributionContext() with
no additional developer action required.  Developers can still
manually use Context.createAttributionContext() to adjust the
attribution tag again if desired.

Bug: 187097694
Test: atest CtsAppOpsTestCases:AttributionTest
Test: atest CtsAppTestCases:android.app.cts.AttributionTagsTest
Change-Id: Ia16c66e7b63bcbfb8c0d7348e9b5d4adb2a1f45d
2021-05-15 12:11:03 -06:00
TreeHugger Robot
d3a796c657 Merge "Revert "Add a permission for CDM apps to start FGS from the background"" into sc-dev 2021-05-15 03:26:29 +00:00
Shubang Lu
8d959fd526 Revert "Add a permission for CDM apps to start FGS from the background"
This reverts commit dc4aa4b86e.

Reason for revert: cause of b/188239482

Change-Id: Iff8d07e48d3521c7b62f6bb64b01712611f886d7
2021-05-15 00:40:04 +00:00
Cassie Wang
5bb7eba12b Define new AppSearch global query permission.
The role that holds this permission will have access to platform
surfaceable documents in AppSearch.

Bug: 187113133
Test: presubmit
Change-Id: Iec848e8df69c4590777eb1397ce33a445e155655
2021-05-14 10:32:01 -07:00
Ahaan Ugale
6bf4cb6147 Merge "Make InputMethodInfo#showInInputMethodPicker public." into sc-dev 2021-05-14 16:14:00 +00:00
Ahaan Ugale
76bf20fce7 Make InputMethodInfo#showInInputMethodPicker public.
Allows custom Input Method Pickers to exclude relevant IMEs, like the
system picker does now.

Fix: 184890628
Test: atest InputMethodInfoTest InputMethodManagerTest
Change-Id: I20033de2f6679ed8cd538de66e157f737792d847
2021-05-13 20:58:32 -07:00
Adam He
0a78fe6d5e Merge "Removed addValue from TranslationRequest because of potential bug in genrated builder code." into sc-dev 2021-05-13 22:03:42 +00:00
Makoto Onuki
85eb43208f Merge "Add a permission for CDM apps to start FGS from the background" into sc-dev 2021-05-13 21:17:44 +00:00
Adam He
af6aa6ffb7 Merge "Make getText() nullable and return null." into sc-dev 2021-05-13 20:52:48 +00:00
Makoto Onuki
dc4aa4b86e Add a permission for CDM apps to start FGS from the background
Previously, any apps with a CDM association was allowed to start
foreground services from the background.

Now, only apps with
REQUEST_COMPANION_START_FOREGROUND_SERVICES_FROM_BACKGROUND
(or REQUEST_COMPANION_RUN_IN_BACKGROUND) are allowed to do so.

Bug: 186536261
Test: Manual test with a test app using CDM. With and without these
    permissions.
Change-Id: Ic00aa1c7cfefc37bf89ea3079ef0977aee12499b
2021-05-13 12:21:39 -07:00
TreeHugger Robot
a3c4e2ecc1 Merge "Remove onTranslationResultCallback and use a Consumer instead." into sc-dev 2021-05-13 18:51:17 +00:00
TreeHugger Robot
c0f1de7c5c Merge "API review : use a range of numbers for OEM errors" into sc-dev 2021-05-13 18:17:52 +00:00
TreeHugger Robot
f1cacbbe3a Merge "Un-hide passthrough flag" into sc-dev 2021-05-13 18:11:27 +00:00
Jeff Sharkey
14f4fe4d01 Merge "Emergency workaround to patch over ID shuffling." into sc-dev 2021-05-13 17:51:38 +00:00
Jeff Sharkey
62c5678f62 Emergency workaround to patch over ID shuffling.
Bug: 188050150, 188011554
Test: manual
Change-Id: If865def2961b28d45b50a055272d8b24af7bbd32
2021-05-13 11:48:56 -06:00
Ameer Armaly
39f4c5967c Un-hide passthrough flag
We added a flag to restore the passthrough for multifinger gestures, but left it hidden for the QPR. It should be made public for S so TalkBack doesn't continue to use non-public APIs.
Fix: 187458811
Test: manual
Change-Id: I02fa6b9e4dacec131aac86adc54386ad7b6249ad
2021-05-13 17:40:49 +00:00
Adam He
bddf9536c7 Remove onTranslationResultCallback and use a Consumer instead.
* Deprecated old apis, changed private class CallbackWrapper to
implement consumer instead.

Fixes: 187872807
Test: atest CtsTranslationTestCases
Change-Id: Ie70ad2166a72ec34947266a137d0c382ffb35575
2021-05-12 17:09:53 -07:00
Ahaan Ugale
f60fbc10b5 Merge "Nullability fixes for HotwordDetectionService APIs." into sc-dev 2021-05-12 21:56:54 +00:00
Ahaan Ugale
d579a8ee6e Nullability fixes for HotwordDetectionService APIs.
* Make the Hotword*Result payloads NonNull. HotwordDetectedResult on the
  VoiceInteraction side is still @Nullable since the EventPayload is
  used for other result types too.
* Remove @NonNull for a primitive return type.

Bug: 184962614
Test: atest CtsVoiceInteractionTestCases
Change-Id: Ib57368dab442f80805233864dc8fd86249f677cf
2021-05-12 13:06:31 -07:00
satayev
7e31457971 Merge "Expose SharedLibraryInfo#getAllCodePaths as @TestApi." am: 3f955dda5c am: db47bd0c94 am: c792a3d96b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1703011

Change-Id: I3aaaeea2b75feb91af679ee56493144b037a5f2f
2021-05-12 14:43:44 +00:00
Joanne Chung
137a248c1f Merge "Add dispatchRequestTranslation() in WebViewProvider." into sc-dev 2021-05-12 11:25:24 +00:00
TreeHugger Robot
8eb397fb04 Merge "Make ACTION_VIEW_PERMISSION_USAGE_FOR_PERIOD public" into sc-dev 2021-05-12 10:26:12 +00:00
lpeter
f79009a5d7 API review : use a range of numbers for OEM errors
By API review feedback, it would be better to use a range
of numbers for OEM errors instead of just defining
CUSTOM_ERROR_1 / CUSTOM_ERROR_2 in HotwordDetectionService.

Bug: 184962614
Test: atest CtsVoiceInteractionTestCases
Test: atest CtsVoiceInteractionTestCases --instant
Change-Id: Id1e3a29e37ef566a1d8e30c703b7f2c4ae138f82
2021-05-12 17:39:00 +08:00
Joanne Chung
b8e3112908 Add dispatchRequestTranslation() in WebViewProvider.
This change doesn't introduce a new API, the change is just pushing
down an existing API from View that we are missing to add for the
webview. We should also provide this method to allow webview provider
to provide their implementation if needed.

Bug: 186617107
Test: manual
CTS-Coverage-Bug: 177960696

Change-Id: If75285b3aafdb1f2a3d7c307a90bb783edf029b5
2021-05-12 15:50:46 +08:00
Erik Wolsheimer
7e93dab6ee Make ACTION_VIEW_PERMISSION_USAGE_FOR_PERIOD public
Bug: 176902658
Test: Manual
Change-Id: Ie5886864eb8938555ba94fcf72b7ca084681a9e9
2021-05-11 19:02:59 -07:00
Joanne Chung
f13de286ff Merge "API feedback: Translation View API improvement." into sc-dev 2021-05-12 00:29:53 +00:00
Pinyao Ting
ab982fa862 Merge "Remove updateShortcutVisibility" into sc-dev 2021-05-11 23:15:25 +00:00
TreeHugger Robot
ab367ab510 Merge "AttachedSurfaceControl: Respond to API feedback." into sc-dev 2021-05-11 19:13:05 +00:00
satayev
a8e4e5dcc3 Expose SharedLibraryInfo#getAllCodePaths as @TestApi.
The method is called by CTS helper app to list all java shared libraries
present on the device. All classes present in the reported jar/apk files
are then collected by a CTS/GTS EDI collector.

Bug: 187823488
Test: m
Change-Id: I750065112d70bc3ab45c8b6c6cc8aa4d429488a8
2021-05-11 17:26:47 +01:00
Makoto Onuki
987f904072 Merge "Implement requestForegroundServiceExemption, without enabling it" into sc-dev 2021-05-11 15:55:14 +00:00
Kholoud Mohamed
80ed0ced6c Merge "Allow forceUpdateUserSetupComplete for non system users" into sc-dev 2021-05-11 14:50:38 +00:00
TreeHugger Robot
d85097d1ad Merge "Add android: to text constant to prevent namespace conflicts." into sc-dev 2021-05-11 12:50:54 +00:00
kholoud mohamed
158dd8fc09 Allow forceUpdateUserSetupComplete for non system users
Test: atest android.devicepolicy.cts.DevicePolicyManagerTest
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
Bug: 183716601
Change-Id: Id2340ac1c6404ac41ca7b5a31c6fbb1577804595
2021-05-11 09:25:20 +01:00
shubang
5afdd12cfe Modify error codes and improve descriptions
Bug: 167036690
Test: atest MediaMetricsAtomTests
Change-Id: Ib34f402d29043cdda839340e23e26a40e82e57f2
2021-05-10 19:10:35 -07:00
Makoto Onuki
26f28d4a29 Merge "Send a broadcast when an app is granted SCHEDULE_EXACT_ALARM" into sc-dev 2021-05-10 22:14:48 +00:00
Brad Ebinger
0ad0a88143 Merge "Add the REGISTRATION_TECH_NR Tech type" 2021-05-10 21:02:25 +00:00
Makoto Onuki
619c5a46d8 Implement requestForegroundServiceExemption, without enabling it
Bug: 187429663
Test: Checked ApplicationInfo.hasRequestForegroundServiceExemption()
  of a test app, with and without the new attribute set.

Change-Id: I98342a35a82e44327db896c9820806eb3eda5b4c
2021-05-10 11:50:32 -07:00
Joanne Chung
1450a8706d API feedback: Translation View API improvement.
1. Rename dispatchRequestTranslation().
2. Provide what should be done in onViewTranslationResponse().

Bug: 186578468
Bug: 186578311
Test: atest CtsTranslationTestCases
Test: manual.
CTS-Coverage-Bug: 177960696

Change-Id: Id90e7d68a92ec17ec302d7ff05ef67c8bfa6454b
2021-05-10 17:19:09 +08:00
Makoto Onuki
306ed287f4 Send a broadcast when an app is granted SCHEDULE_EXACT_ALARM
Bug: 187206399
Test: atest AlarmManagerServiceTest
Test: Manual test with a test app.
- Grant the permission to test app and make sure it can start FGS.
Log:
```
05-07 10:12:08.671  1000  1579  9475 I ActivityManager: Background started FGS: Allowed [callingPackage: com.google.omakoto.testapp; callingUid: 10294; uidState: RCVR; intent: Intent { act=fgs cmp=com.google.omakoto.testapp/.MyFgs }; code:(unknown:207); tempAllowListReason:<broadcast:1000:android.app.action.SCHEDULE_EXACT_ALARM_PERMISSION_STATE_CHANGED,reason:,reasonCode:(unknown:207),duration:10000,callingUid:1000>; targetSdkVersion:30; callerTargetSdkVersion:30; startForegroundCount:0]
```
- Grant the permission to a different app and make sure the test app
  won't receive the broadcast.

Test: CTS -- Incoming

Change-Id: Iefe3e12dcf51318d8433532ba3048caa69b1edcd
2021-05-07 17:34:12 -07:00
Adam He
d5a4499faa Removed addValue from TranslationRequest because of potential bug in
genrated builder code.

* if Builder.setValues is called with an immutable list, future calls to
addValue will throw.

Fixes: 187542825
Test: atest CtsTranslationTestCases
Change-Id: Ie405975e1a0a8aa90bde7358afde15b8c60aa95a
2021-05-07 16:41:15 -07:00
Adam He
b9cdc84c87 Add android: to text constant to prevent namespace conflicts.
Fixes: 187219011
Test: atest CtsTranslationTestCases
Change-Id: I980156c8653581aa5020afaa5bcb97e909d291df
2021-05-07 15:14:30 -07:00
Brad Ebinger
500397d3e8 Add the REGISTRATION_TECH_NR Tech type
Adds the new NR registration technology for devices
that support IMS over NR so that the APIs can report
this technology.

Bug: 179724463
Test: atest CtsTelephonyTestCases
Merged-In: I4b0f9882dcf36e2ff7151778cbadb8e83513df5a
Change-Id: I4b0f9882dcf36e2ff7151778cbadb8e83513df5a
2021-05-07 19:08:37 +00:00
Hyunyoung Song
c8478e5a9d All Apps Search API council feedback (second round)
Bug: 186756959
Test: atest CtsSearchUiServiceTestCases
Change-Id: I0c83d79ede8801f71c89e71cc6ec2c73b2d8bfcd
2021-05-07 11:41:43 -07:00
Adam He
bd20cf5004 Make getText() nullable and return null.
* Will update once we add more type values to this class.

Fixes: 187219782
Test: atest CtsTranslationTestCases
Change-Id: Ib8e9fbca70b6808370791da5bd8561dc9e8b1822
2021-05-06 17:19:58 -07:00
TreeHugger Robot
d8ef2b30f4 Merge "Add a default implementation of UiTranslationStateCallback#onResumed." into sc-dev 2021-05-06 23:07:12 +00:00
Ahaan Ugale
ebc8d5154a Add a default implementation of UiTranslationStateCallback#onResumed.
This is temporary, to avoid breaking clients that already implemented
the API before onResumed was added.

Bug: 185274258
Test: manual
Change-Id: Icd2c392e248f01c22b95e0b88ba56847ae71f10a
2021-05-06 13:48:58 -07:00
Pierre Barbier de Reuille
94cd7cbb04 Merge "Remove system_app_widget_internal_padding resource" into sc-dev 2021-05-06 18:54:16 +00:00