Commit Graph

10415 Commits

Author SHA1 Message Date
Kevin Han
2e810b5d1e Merge "Add intent for going to "Unused apps"" into sc-dev 2021-03-15 18:51:19 +00:00
Corina Grigoras
9f2095305b Merge "Expose create uri as user as system api." into sc-dev 2021-03-15 17:27:34 +00:00
Oli Lan
fe4a8f58fb Merge "Add text classification results to clip description and clip data." into sc-dev 2021-03-15 17:26:35 +00:00
Aaron Huang
e29f0a55d8 Merge changes from topic "pacproxy-service" am: 16f50075b1 am: 688ae36dcb am: ce43593e5e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1553959

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If6d34753e8bf9201e16121b8f3c6c83aa6358986
2021-03-15 12:56:09 +00:00
Aaron Huang
16f50075b1 Merge changes from topic "pacproxy-service"
* changes:
  Make PacProxyService be a system service
  Revert^2 "Refactor setCurrentProxyScriptUrl to a void method"
2021-03-15 11:49:45 +00:00
Aaron Huang
5d31a15d84 Make PacProxyService be a system service
PacProxyInstaller class is running a thread all the time and is
listening to intent ACTION_PAC_REFRESH so it would be better to
make it be a system service with a manager class PacProxyManager
which is obtained with getSystemService(PacProxyManager.class).
Besides, rename PacProxyInstaller to PacProxyService will
be easier to know it's the service for PacProxyManager.

ConnectivityService is going to be a mainline module and it
needs constructor of PacProxyService to be SystemApi.
However, in current design, it needs to pass a handler and
an int arguments to the constructor which would be difficult
to maintain if just expose the constructor directly.

So, define a listener for the event that the current PAC
proxy has been installed so that the handler and the int
arguments can be removed from the constructor.

Bug: 177035719
Test: FrameworksNetTests
Change-Id: I2abff75ec59a17628ef006aad348c53fadbed076
2021-03-15 14:40:58 +08:00
Yi-an Chen
27328673c0 Merge "Add the intent for showing permission history" into sc-dev 2021-03-13 01:09:34 +00:00
TreeHugger Robot
f26cbdfa76 Merge "Deprecate PowerWhitelistManager." into sc-dev 2021-03-12 20:59:15 +00:00
Alex Buynytskyy
3a88d55f0f Merge "DL lifecycle: handle slow DL binding." into sc-dev 2021-03-12 20:20:06 +00:00
Yi-an Chen
c064bc738f Add the intent for showing permission history
Bug: 176902658

Test: Manually tested with Sargo DVT
Change-Id: I43f8c29c6b7c696c37c8bf7af5ddc710b9230c08
2021-03-12 20:06:32 +00:00
TreeHugger Robot
3bc6fbcd6a Merge "Expose DOMAIN_VERIFICATION_SERVICE" into sc-dev 2021-03-12 19:03:58 +00:00
Varun Shah
4ec1e1f05d Deprecate PowerWhitelistManager.
Replace all constants and methods to reference the newly added
PowerExemptionManager.

Also keep Context#POWER_EXEMPTION_SERVICE hidden to discourage use of
getSystemService(String). It is still a TestApi for CTS purposes.

Bug: 180503057
Test: atest PowerExemptionManager
Test: atest PowerWhitelistManager
Change-Id: I52c24b79acf7a9ec9fce138d4cb0818b5480e2a0
2021-03-12 09:19:49 -08:00
Corina
3fcaa5218c Expose create uri as user as system api.
Bug: 179659160
Test: atest ContentProviderTest
Change-Id: I86edc2d4fa0911366a91170819140b274f5d6480
2021-03-12 16:43:35 +00:00
Chad Brubaker
13227f7a6f Merge "Support subattribution for manifest receivers" into sc-dev 2021-03-12 06:30:28 +00:00
paulhu
97c860113a Expose Intent#ACTION_CLEAR_DNS_CACHE
DnsManager will broadcast ACTION_CLEAR_DNS_CACHE intent to clear
dns cache when network have changed. But DnsManager is in the
Connectivity mainline module which can not use non-formal API.
Thus, expose Intent#ACTION_CLEAR_DNS_CACHE as module lib API for
mainline module.

Bug: 182370679
Test: m update-api
Merged-In: I30b1b146dcae82926be7bdb8b343635a01eabefe

Change-Id: I30b1b146dcae82926be7bdb8b343635a01eabefe
2021-03-12 05:21:08 +00:00
Rhed Jao
56d4c21816 Merge "Apply packages visibility to ContentResolver#getSyncAdapterTypes" into sc-dev 2021-03-12 03:54:39 +00:00
Paul Hu
e1ca2891e5 Merge "Expose Intent#ACTION_CLEAR_DNS_CACHE" into sc-dev 2021-03-12 03:29:34 +00:00
TreeHugger Robot
e1396848ae Merge "Move fs-verity check into DexMetadataHelper" into sc-dev 2021-03-12 00:54:27 +00:00
Alex Buynytskyy
7e06d712d2 DL lifecycle: handle slow DL binding.
Bug: 182214420
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest PackageManagerServiceTest ChecksumsTest
Change-Id: I5959e01177ab702de1f754f4ba433004925ce98b
2021-03-11 16:35:35 -08:00
Zhen Zhang
ae8a171027 Add intent for going to "Unused apps"
Create a new intent for launching the unused apps UI page from
outside permission controller module.

Bug: 181172051
Test: Built successfully
Change-Id: I3f601425659a88f20683c0a1b1ab318f2b4e5ecf
2021-03-11 15:41:53 -08:00
Winson
d2b6cf2c6f Expose DOMAIN_VERIFICATION_SERVICE
With the getUserState public API, the constant should also be exposed
so that apps that wish to use that mechanism can access it.

Bug: 180955393

Test: builds

Change-Id: I98aa9a63eefc0480ddbf3107b91f76f0a2791f6b
2021-03-11 15:21:52 -08:00
TreeHugger Robot
2d29c77b01 Merge "Introduce PowerExemptionManager." into sc-dev 2021-03-11 21:49:25 +00:00
Chad Brubaker
4c5abc8137 Support subattribution for manifest receivers
This CL adds support for subattribution when sendBroadcast(Intent,
String) is used with an appop permission. This adds the new
android:attributionTag attribute to manifest receivers.

Fixes: 182313296
Test: atest AttributionTest
Change-Id: Ib315f95678204bc03e7ac354c54afbd64db403e8
2021-03-11 20:06:37 +00:00
paulhu
06caf5d5b6 Expose Intent#ACTION_CLEAR_DNS_CACHE
DnsManager will broadcast ACTION_CLEAR_DNS_CACHE intent to clear
dns cache when network have changed. But DnsManager is in the
Connectivity mainline module which can not use non-formal API.
Thus, expose Intent#ACTION_CLEAR_DNS_CACHE as module lib API for
mainline module.

Bug: 182370679
Test: m update-api
Change-Id: I30b1b146dcae82926be7bdb8b343635a01eabefe
2021-03-11 13:51:47 +08:00
Varun Shah
69f79be0db Introduce PowerExemptionManager.
This is essentially identical to PowerWhitelistManager which will be
deprecated due to the use of non-inclusive language.

Bug: 180503057
Test: atest PowerExemptionTest
BYPASS_INCLUSIVE_LANGUAGE_REASON=Existing public API.
Change-Id: Ie6ff50118330e22b59a547c81952a31a5f5b54d8
2021-03-11 03:05:09 +00:00
Victor Hsieh
c3dac2edb0 Move fs-verity check into DexMetadataHelper
Bug: 180414192
Test: CtsDexMetadataHostTestCases (with pm.dexopt.dm.require_fsverity
      true/false)
Change-Id: I91924fc92afd53bf7a276fa9ee62a7ce82d4e6b1
2021-03-10 17:47:39 -08:00
Oli Lan
7e568c9177 Add text classification results to clip description and clip data.
With this change, text classification is performed on text in clip
data when it is set as the primary clip, if it is below a certain
length.

This allows information about which entities (e.g. URLs, addresses)
are present in the text to be added to the ClipDescription.

With toast notifications being added when an app accesses clipboard,
this change will allow apps to tell if clipboard contains information
they are interested in before they access the clip data. This will
allow unnecessary clipboard accesses to be avoided.

If entities are detected in the clip data, the results of classification
are added to the ClipData so that users of this API do not then need
to repeat text classification themselves in order to locate the
entities.

Bug: 180577441
Test: new CTS tests added to ClipDescriptionTest
Change-Id: I334db4805b8b72e0e00c721fe6efe64ec0661a8a
2021-03-10 18:00:30 +00:00
tomnatan
7b22b447da Per-app configuration for force non-resizable
We're defining a new compat framework change id that indicates whether a
given app should be force non-resizable.

Bug: 181136395
Test: atest WmTests:SizeCompatTests
Change-Id: Ibd91bc8fe3da57f17e32fa8efaf98c51fe4dd677
2021-03-10 17:03:57 +00:00
Michael Groover
c717ef5964 Merge "Report UnsafeIntentLaunchViolation for Intents parsed from URIs" into sc-dev 2021-03-10 01:06:03 +00:00
Jeff Sharkey
c8faccf35a Merge changes from topic "mar8" into sc-dev
* changes:
  Refinement of ContextParams behavior.
  Relax null checks to fix tests.
2021-03-09 22:35:49 +00:00
Sergey Nikolaienkov
c43f1a2c2f Merge "Cap resolution for pre-S apps on TV at 1080p" into sc-dev 2021-03-09 09:25:29 +00:00
Louis Chang
9992fd7fc0 Merge "New activity launch mode - singleInstancePerTask" into sc-dev 2021-03-09 08:08:16 +00:00
Rhed Jao
40e14f7a6a Apply packages visibility to ContentResolver#getSyncAdapterTypes
Also, adds it to the test api for the Cts tests.

Bug: 153657222
Test: atest android.appenumeration.cts.AppEnumerationTests
Test: atest android.content.ContentResolverTest
Test: atest SyncAdapterSettingsHostSideTest
Change-Id: I9ac62a80c29351f05725c1636c52928b279840a0
2021-03-09 16:03:04 +08:00
Sergey Nikolaienkov
70c9d936d9 Cap resolution for pre-S apps on TV at 1080p
On Android TV applications that target pre-S SDK are not expecting to
receive a Window larger than 1080p.
To avoid this from happening this CL overrides compatibility scaling for
applications that target a pre-S SDK on ATV devices that have larger than
1080p screen, so that the applications would still need to draw to a
1080p Surface.

Bug: 157629738
Test: atest CtsWindowManagerDeviceTestCases:TvMaxWindowSizeTests
Change-Id: I2b240bb5fcae6b165fd17c982cc29c49de348dbf
2021-03-09 06:08:44 +00:00
Alex Buynytskyy
b92a4f2f37 Merge "API feedback: make Installer v2 API public." into sc-dev 2021-03-09 06:03:44 +00:00
Peter Collingbourne
127cb3ff8f Merge "Add support for a hw_timeout_multiplier system property." into sc-dev 2021-03-09 04:35:45 +00:00
Louis Chang
8846e4d089 New activity launch mode - singleInstancePerTask
Adding a new activity launch mode `singleInstancePerTask` which
is similar to singleTask that the activity is single instance and
can only be created in task root, but still allowed to be created
in multiple documents or tasks.

Also adding meta-data support of apps that targeting on previous SDK.

Bug: 175354896
Test: IntentTests

Change-Id: I4ba3b2ba6d619677f03e67d3b7da1b5d2a79907f
2021-03-09 11:46:07 +08:00
Alex Buynytskyy
0822dbb9b1 API feedback: make Installer v2 API public.
Now the API if finalized, we can make it fully public.

Bug: 181708338
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest PackageManagerServiceTest ChecksumsTest
Change-Id: I2f8ec774ee8f19a1925414337e5fe8c875a6774e
2021-03-08 17:44:19 -08:00
Jeff Sharkey
29e882b417 Refinement of ContextParams behavior.
Since this parameters object is likely going to grow over time, we
should offer a way for callers to easily "inherit" all sub-parameters
by default, instead of making them copy the values manually.

This also gives a path for legacy apps to automatically preserve any
new sub-parameters that have been added in more modern API levels.

This change also relaxes the nullability annotations to match the
existing createAttributionContext() behavior, while also supporting
clearing of specific inherited values.

Bug: 181812281
Test: atest CtsContentTestCases:android.content.cts.ContextTest
Change-Id: Ic797e1aef578926b04ea0000ca3a1bf8684183b9
2021-03-08 18:07:00 -07:00
Jeff Sharkey
479d90cefd Relax null checks to fix tests.
The nullability annotations on these methods are aspirational,
and a recent CL started routing many existing call-sites through
them, so we'll need to start allowing nulls.  I'm not at a full
workstation right now, so this CL simply relaxes the enforcement,
and a future CL will adjust the API annotations.

Bug: 182091763
Change-Id: I43d49747deb8c7881d942eba48237eb0fccc7acd
Merged-In: I43d49747deb8c7881d942eba48237eb0fccc7acd
2021-03-08 18:01:35 -07:00
Guliz Tuncay
4fadd2013f Merge "Migrate wellbeing to use role" into sc-dev 2021-03-08 22:27:55 +00:00
Songchun Fan
cc22a26acf Merge "[incremental] add feature test to presubmit" into sc-dev 2021-03-08 21:14:00 +00:00
Ryan Mitchell
a644b68892 Merge changes I425638d3,Ie06232a0 into sc-dev
* changes:
  Revert "Migrate ApkAssets to use NativeAllocationRegistry"
  Revert "Cast ApkAssets to uintptr_t before jlong"
2021-03-08 15:48:29 +00:00
Oli Lan
54c6548505 Add system API to attribute source of clip data.
This adds a system API to allow the source package to be included
when clip data is set on CLipboardManager.

This is needed to ensure that the clipboard access notifications can be
properly attributed. For example, when a copy is performed through the
share sheet, the data should be attributed to the app that opened the
share sheet, not Android System.

Bug: 180577866
Test: new tests added to ClipboardManagerTest in CTS
Change-Id: Ic0ef2ea218e1dcb738b401f61cd20cd5bba6baec
2021-03-08 15:04:08 +00:00
Joanne Chung
779ea7feb3 Merge "Allow translation cts can add itself into allowlist for content capture" into sc-dev 2021-03-08 04:08:19 +00:00
Jeff Sharkey
6595eabb43 Merge "Support for a Context to "renounce" permissions." into sc-dev 2021-03-07 19:05:26 +00:00
Güliz Seray Tuncay
05bb876929 Migrate wellbeing to use role
Migrate wellbeing to use the role infrastructure. Based on ag/13357357.

Bug: 158878560

Test: atest com.google.android.wellbeing.gts.WellbeingTest
Test: atest CtsPermission2TestCases:PermissionPolicyTest
Test: atest FrameworksServicesTests:AppStandbyControllerTests
Change-Id: I0a6c986fe9a53be52013f300ba7795dfdd0887e6
2021-03-06 19:52:01 +00:00
Tim Van Patten
3c4b8d977b Merge "GameManager: Add Public API" into sc-dev 2021-03-06 07:17:14 +00:00
Tim Van Patten
7f2f873b59 GameManager: Add Public API
Add the public API to GameManager:
- getGameMode()

Bug: b/178860939
Test: atest CtsGameManagerTestCases
Test: atest GameManagerTests
Test: atest GameManagerServiceTests
Test: atest GameManagerServiceSettingsTests
Change-Id: Ie6030e4ec796c9ecf2c756f24f00e445572accda
2021-03-05 19:59:28 -07:00
Jeff Sharkey
ba2974c8a9 Support for a Context to "renounce" permissions.
Different logical components within an app may have no intention of
interacting with data or services that are protected by specific
permissions.

The new overload added in this change provides the initial mechanism
for a logical component to indicate a set of permissions that should
be treated as "renounced".  Interactions performed through the
returned Context will ideally be treated as if the renounced
permissions have not actually been granted to the application,
regardless of their actual grant status.

This is a low-risk change from a security standpoint, since it can
only reduce the set of permissions that might have been granted to
an app; it can never be used to expand the set of permissions.

Note that this change only provides an initial implementation which
only applies to local permission checks within the app; future
changes will begin wiring this up across process boundaries.

Bug: 181812281
Test: atest CtsContentTestCases:android.content.cts.ContextTest
Change-Id: I96439e5344c85300fb6a0f03e572746c3c96ee95
2021-03-05 18:51:20 -07:00