Commit Graph

10564 Commits

Author SHA1 Message Date
Songchun Fan
ef9e6a7ce0 Merge "[api] hide ACTION_PACKAGE_FULLY_LOADED as it is not used" into sc-dev 2021-04-13 23:20:39 +00:00
TreeHugger Robot
f049770c99 Merge "Fix an issue where the return value is null when retrieving shortcut" into sc-dev 2021-04-13 23:03:51 +00:00
TreeHugger Robot
d4e3953a8c Merge "Change getOwnersForDomain to SortedSet" into sc-dev 2021-04-13 21:54:12 +00:00
Pinyao Ting
b0a39a0b5c Fix an issue where the return value is null when retrieving shortcut
Some testing devices were flashed to a build which contains a previous
version of AppSearchShortcutInfo, the schema wasn't in use and should be
updated to the latest version directly.

Bug: 185186093
Test: manual
Change-Id: Ie9b8a0d59611498909b5c78eca65fe563a65004b
2021-04-13 10:33:59 -07:00
Corina Grigoras
5b4e1622b7 Merge "Rename createContentUriAsUser to createContentUriForUser" into sc-dev 2021-04-13 16:43:00 +00:00
Jeremy Joslin
29744db0c4 Merge "Update doc for FEATURE_SECURITY_MODEL_COMPATIBLE." into sc-dev 2021-04-13 16:18:12 +00:00
Alex Buynytskyy
2a3eef7ab6 Merge "API feedback with better documentation." into sc-dev 2021-04-13 15:53:20 +00:00
Winson
64ee7ff095 Change getOwnersForDomain to SortedSet
Kept the lowest to highest ordering priority, under the assumption
that less has to change in the UI/consumer if the highest priority
is popped, since it will just take it off the end without shifting
any elements. The ordering is documented.

Bug: 184891031

Test: atest DomainVerificationManagerApiTest

Change-Id: I6ea5908e356ee96aa440650f3d5025319c195266
2021-04-12 16:58:59 -07:00
Songchun Fan
b2fdd34a80 [api] hide ACTION_PACKAGE_FULLY_LOADED as it is not used
BUG: 171920377
Test: builds
Change-Id: I7b17bbe6624e5c96ceac55ca050ec0add0b05cb1
2021-04-12 23:49:57 +00:00
Pinyao Ting
55c108fdb1 Merge changes from topic "shortcut-app-search" into sc-dev
* changes:
  Shortcut integration with AppSearch (Part 10)
  Shortcut integration with AppSearch (Part 9)
  Shortcut integration with AppSearch (Part 8)
  Shortcut integration with AppSearch (Part 7)
  Shortcut integration with AppSearch (Part 5)
2021-04-12 23:29:34 +00:00
Jeremy Joslin
f6e8198fba Update doc for FEATURE_SECURITY_MODEL_COMPATIBLE.
Adding a link to the CDD.

Test: builds.
Bug: 183938071
Change-Id: I89ac710363e1c7003198804bdb0aa235c55ca47d
2021-04-12 15:20:33 -07:00
Corina
7c368531a4 Rename createContentUriAsUser to createContentUriForUser
Bug: 183395239
Test: atest ContentProviderTest
Change-Id: I13c382e7ad4f291de28a52025a8ec4e59d815409
2021-04-12 21:57:06 +00:00
Alex Buynytskyy
bdd6f7d521 API feedback with better documentation.
+revert the Incremental installation API to be SystemApi as the corresponding native API is not exposed in the NDK.

Bug: 184713911
Fixes: 184713911
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest PackageManagerServiceTest ChecksumsTest
Change-Id: I466eb6d2f98aed75c22b92877d5e8cb3ddf839bc
2021-04-12 14:37:17 -07:00
Lais Andrade
8b2586c6ea Merge "Rename CombinedVibrationEffect to CombinedVibration" into sc-dev 2021-04-12 20:08:41 +00:00
Lais Andrade
d8dc940fc0 Rename CombinedVibrationEffect to CombinedVibration
The change makes the distinction between VibrationEffect and
CombinedVibratio clearer. The later is a combination of the former with
the extra information about the vibrator ids, allowing effects to be
played in one or more vibrators in parallel or in sequence.

The methods create/start synced where also renamed to parallel (together
with respective builder classes), to indicate they perform one or more
effects in parallel on multiple vibrators. This is also a better match
to the sequential combinations.

This change also deprecates the Context.VIBRATOR_SERVICE in favour of
the new VIBRATOR_MANAGER_SERVICE. The default vibrator can be retrieved
from the manager system service.

Same deprecation applied to InputDevice.getVibrator method.

Fix: 184123900
Test: CombinedVibrationTest
Change-Id: I44d8b225098d35fbf7783254acaf6a78f9fb4505
2021-04-12 16:34:54 +00:00
Joanne Chung
279a38e147 Merge "Remove translation service feature." into sc-dev 2021-04-12 16:01:05 +00:00
Mady Mellor
02b75bb425 Merge "API Update: extra_is_bubbled -> Activity#isLaunchedFromBubble" into sc-dev 2021-04-12 14:53:01 +00:00
Joanne Chung
57dc3874f6 Remove translation service feature.
Currently, the Translation uses feature to determine if we need to
start the translation system service. But our case is like the
content capture not the autofill, the autofill can have the feature
without any service defined and the user can install one later. But
translation isn't, we should need to check config instead of
feature.

The feature will not be used anymore, it's safe to delete it. If we
leave the removal to next OS, it is painful to delete it.

Bug: 183360041
Test: atest CtsTranslationTestCases

Change-Id: Ib6886a17965937abf064e526c36c67428af7398f
2021-04-12 16:03:44 +08:00
Jimmy Shiu
4c6e5036b7 ADPF: PerformanceHintManager API implementation
Test: Manual test, run bouncy ball
Test: atest FrameworksCoreTests:android.os.PerformanceHintManagerTest
Bug: 158791282
Change-Id: Ia0bf2b06675b8cf57cdf1668ee90e98026416439
Signed-off-by: Wei Wang <wvw@google.com>
2021-04-10 10:21:17 -07:00
Pinyao Ting
f1f376fc45 Shortcut integration with AppSearch (Part 9)
1. Close AppSearchSession after use.

When the device is shutdown with open AppSearchSession, if the data is
not properly persisted to disk, it would lead to a recovery upon reboot,
which could hurt boot performance.

We cannot rely on shutdown signal to close existing session because the
broadcast is not guranteed. Since session creation is light-weight, it
is more performant to simply close the session everytime after use.

2. Refrain from calling setup schema on boot.

To improve the performance of device start up, we want to avoid calling
AppSearchSession#setSchema unnecessarily since it could hurt performance.
In this CL we saved the version of the schema in the xml file which can
serve as an indicator of whether schema setup is required.

Bug: 151359749
Test: atest ShortcutManagerTest1 ShortcutManagerTest2
    ShortcutManagerTest3 ShortcutManagerTest4 ShortcutManagerTest5
    ShortcutManagerTest6 ShortcutManagerTest7 ShortcutManagerTest8
    ShortcutManagerTest9 ShortcutManagerTest10 ShortcutManagerTest11
    ShortcutManagerTest12
Test: atest CtsShortcutManagerTestCases
Change-Id: I2d6b66cef0c152ad99611dec3dee32a473bef4a9
2021-04-09 13:35:08 -07:00
Pinyao Ting
ba25baccab Shortcut integration with AppSearch (Part 8)
Reduce search space in AppSearch with following changes:
1. Introduce inverted flag upon saving document.
2. Implement AppSearch queries for more general cases.

Bug: 151359749
Test: atest ShortcutManagerTest1 ShortcutManagerTest2
    ShortcutManagerTest3 ShortcutManagerTest4 ShortcutManagerTest5
    ShortcutManagerTest6 ShortcutManagerTest7 ShortcutManagerTest8
    ShortcutManagerTest9 ShortcutManagerTest10 ShortcutManagerTest11
    ShortcutManagerTest12
Test: atest CtsShortcutManagerTestCases
Change-Id: I94ec6a2b04c83ef3689c65d63741340b01c9ff50
2021-04-09 13:35:08 -07:00
Pinyao Ting
221060b20b Shortcut integration with AppSearch (Part 7)
Use optmized queries instead of iterating through every shortcuts where
possible.

Bug: 151359749
Test: atest ShortcutManagerTest1 ShortcutManagerTest2
    ShortcutManagerTest3 ShortcutManagerTest4 ShortcutManagerTest5
    ShortcutManagerTest6 ShortcutManagerTest7 ShortcutManagerTest8
    ShortcutManagerTest9 ShortcutManagerTest10 ShortcutManagerTest11

Change-Id: I85efac531162c2497ba5f84980c3e19e93f6e3bc
2021-04-09 13:35:08 -07:00
Gavin Corkery
072ef5624b Merge "Move REBOOT_READY broadcast into android.scheduling" into sc-dev 2021-04-09 17:17:38 +00:00
Winson Chiu
d08ba27a5f Merge changes I2cf2e739,I9e4bd242,Ic8b93a8c,Ibccde458,I04942e14, ... into sc-dev
* changes:
  Fix domain verify restore and add signature check
  Support serializing package signatures for domain verification state
  Add domain verification CTS to TEST_MAPPING
  Fix DomainVerificationService deadlock
  Check installed and enabled state for package domain approval
  Revoke domain user selection when approved through shell
2021-04-09 17:05:50 +00:00
Svetoslav Ganov
ae4d48ebec Merge "Add AR intent to ingest exempt attribution tags" into sc-dev 2021-04-09 15:31:00 +00:00
Svet Ganov
0d6d9f972e Add AR intent to ingest exempt attribution tags
bug: 179069158

Test: atest CtsActivityRecognitionTestCases

Change-Id: I3fa454351a586cc5d408217a2c1382048e6031e4
2021-04-09 15:29:18 +00:00
Bernardo Rufino
9e9669ea8d Merge "Allow accessibility services to send Intent.ACSD" into sc-dev 2021-04-09 15:13:17 +00:00
Charles Chen
c22aff4e4d Merge "Allow config context to inflate views" into sc-dev 2021-04-09 06:56:16 +00:00
TreeHugger Robot
44763d1b5b Merge "Deprecate unuses installer auto revoke whitelist api" into sc-dev 2021-04-08 21:14:38 +00:00
Sahana Rao
1e98cff664 Merge "Rename requestOptimizedExternalStorageAccess to more precise name" into sc-dev 2021-04-08 15:42:12 +00:00
Oli Lan
4d736b92f3 Merge "Use a DeviceConfig property for the default value of the clipboard notification setting." into sc-dev 2021-04-08 11:31:12 +00:00
Paul Hu
3347a6c3db Merge "Move ACTION_CLEAR_DNS_CACHE to ConnectivityManager" am: ed4117ff40 am: d40e17099f am: 52b8921820
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1667080

Change-Id: I5fd350d67065211b84dbea769d258daff9780276
2021-04-08 07:48:14 +00:00
TreeHugger Robot
46d03f1574 Merge "Updating Java doc for FLAG_ACTIVITY_RESET_TASK_IF_NEEDED" into sc-dev 2021-04-08 05:10:35 +00:00
Eugene Susla
ef3dc74a53 Deprecate unuses installer auto revoke whitelist api
Bug: 181344542
Test: presubmit

Change-Id: Ie5032e09cfe426a7611534afc4c7b4fac531018b
2021-04-07 12:45:09 -07:00
Svetoslav Ganov
640b18bd38 Merge "Add fallback for datasource without UPDATE_APP_OP_STATS" into sc-dev 2021-04-07 16:38:25 +00:00
TreeHugger Robot
402eb6529d Merge "Remove annotations from generated class until tests updated" into sc-dev 2021-04-07 16:20:32 +00:00
Bernardo Rufino
19a613c3da Allow accessibility services to send Intent.ACSD
For targetSdk < S. For S, they can use the new
GLOBAL_ACTION_DISMISS_NOTIFICATION_SHADE action to dismiss the
notification shade.

Bug: 159334261
Test: Send Intent.ACSD from an a11y service and verify shade is
      collapsed when targetSdk < S, and exception thrown when targetSdk
      S+.
Change-Id: I0e4be3faef8efa53a0b8a08263e842e0c4b1553e
2021-04-07 15:26:05 +01:00
Charles Chen
d12be75275 Allow config context to inflate views
Besides UI contexts, the context created via
Context#createConfigurationContext with a proper configuration
should be allowed to inflate views or obtain ViewConfiguration.
An example is that a wear device inflate views into bitmap and pass
the bitmap to the Wear OS Companion app on the phone.

Bug: 177847640
Test: atest StrictModeTest

Change-Id: Iab232a80a973f54bf0484262d45af3e4c2f0e5dc
2021-04-07 21:58:42 +08:00
paulhu
b4e9b2b3d8 Move ACTION_CLEAR_DNS_CACHE to ConnectivityManager
- As API review feedback, move ACTION_CLEAR_DNS_CACHE form Intent
  to ConnectivityManager.

- Rename to "android.net.action.CLEAR_DNS_CACHE" because of lint
  suggestion.
frameworks/base/packages/Connectivity/framework/src/android/net/
ConnectivityManager.java:449: error: Inconsistent action value;
expected `android.net.action.CLEAR_DNS_CACHE`, was
`android.intent.action.CLEAR_DNS_CACHE` [ActionValue]

Bug: 183937999
Test: atest FrameworksNetTests
Test: atest ActivityTaskManagerServiceTests
Test: atest android.permission2.cts.PermissionPolicyTest
Test: atest CtsNetTestCases
Change-Id: Iae8aa0ba10dfc7581f0cfaab82643edbee789e2f
2021-04-07 19:40:47 +08:00
Svet Ganov
79db6e5807 Remove annotations from generated class until tests updated
Codegen is a tool that generates parcelable classes from
field declarations. Hence, the @SystemApi annotations are
placed on the field and the tool propagetes them to the
generated APIs. We need to update the AnnotationTest to
either ingore these generated classes or ignore private
fields annotated with @SystemApi as they are not API in
practice. This CL removes the annotations to fix the test.

bug: 184086213

Test: atest android.signature.cts.api.AnnotationTest

Change-Id: Ibe9059f20d95d4cda4eb402704e3c4c002ff0e47
2021-04-07 09:06:20 +00:00
Jeff Chang
84b8ab7302 Merge "Add more OWNERS coverage" am: a40fbcd94c am: 018eaf4357 am: 19840369e1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1531866

Change-Id: I0475257e967bf380f3e12cca62eaf4e094442204
2021-04-07 08:16:09 +00:00
Jeff Chang
a40fbcd94c Merge "Add more OWNERS coverage" 2021-04-07 05:57:30 +00:00
Svet Ganov
773862fda5 Add fallback for datasource without UPDATE_APP_OP_STATS
If the datasource is not in a trusted platform component then in would not
have UPDATE_APP_OPS_STATS. The problem is that an app is exposing runtime
permission protected data but cannot blame others in a trusted way which
would not properly show in permission usage UIs. As a fallback we are
adding a proxy op handling blaming the datasource and the caller.

bug: 183960997

Test: Assustant on auto projection works

Change-Id: I8a341a6c46c75eff86bac7a79c4219ebb7991071
2021-04-07 01:52:14 +00:00
TreeHugger Robot
72a949ba80 Merge "Revert "Revert "Avoid running RegisteredServicesCache tasks on main thread""" into sc-dev 2021-04-06 19:56:31 +00:00
Sahana Rao
d40f9b61a5 Rename requestOptimizedExternalStorageAccess to more precise name
When apps use requestOptimizedExternalStorageAccess flag, they get
additional performance benefit by bypassing database operations. They
still have to scan the file to update MediaStore collection otherwise
MediaStore collection can go inconsistent with lower file system.
Current flag name could lead to apps making wrong assumptions hence
changing the name to more precise name.

Bug: 178209446
Test: atest packages/providers/MediaProvider
Change-Id: I00747da9ea53566cbcdd8aa8b2195e536b397b67
2021-04-06 16:04:50 +01:00
Todd Kennedy
b9f3d0c9fb Revert "Revert "Avoid running RegisteredServicesCache tasks on main thread""
This reverts commit 968b2db0f4.

Reason for revert: Not cause of b/184141588

Change-Id: I9f886e3912dce8c68fee9376f010cd251889b97b
2021-04-06 14:18:21 +00:00
TreeHugger Robot
20d6212568 Merge "Remove a module-lib API" into sc-dev 2021-04-06 10:09:50 +00:00
Aaron Huang
46d99ea11f Expose Context#PAC_PROXY_SERVICE as module lib API
(cherry-picked from ag/14097767)
Bug: 183938000
Test: make update-api
Merged-In: I4341e177b61df0311f0a3234f8814a0ae2cf9a1b
Change-Id: I4341e177b61df0311f0a3234f8814a0ae2cf9a1b
2021-04-06 17:06:03 +08:00
Aaron Huang
6b759b7c04 Merge "Expose Context#PAC_PROXY_SERVICE as module lib API" into sc-dev 2021-04-06 07:26:01 +00:00
Aaron Huang
62718c2bbf Expose Context#PAC_PROXY_SERVICE as module lib API
Bug: 183938000
Test: make update-api
Change-Id: I4341e177b61df0311f0a3234f8814a0ae2cf9a1b
2021-04-06 11:50:21 +08:00