Commit Graph

11698 Commits

Author SHA1 Message Date
Alex Buynytskyy
a7f7cd8970 Merge "SDK -> SDK_PACKAGE to address API feedback." 2022-01-30 01:26:08 +00:00
Alex Buynytskyy
408108c380 SDK -> SDK_PACKAGE to address API feedback.
+documentation updated,
+don't load SDKs automatically.

Bug: 208096588
Bug: 210622326
Test: presubmit
Change-Id: I52efce96111ba72a788404f5eca92da2554fc807
2022-01-28 17:39:59 +00:00
Hui Wu
41f68c7d13 Changes the name from cloudsearch_service to cloudsearch
CTS-Coverage-Bug: 210528288
Bug: 216507592
Test: RBE Built redfin-eng and tested on a physical device
Change-Id: Ic9505f659befa01938b413e1e1944c3aaa0e8a0c
2022-01-28 09:28:48 -08:00
TreeHugger Robot
6381c8ea93 Merge "Link to getPlatformPermissionsForGroup() in PermissionInfo.group doc." 2022-01-28 01:51:37 +00:00
Evan Rosky
aad20ce51b Merge "Move fixed-rotation-related display information into config" 2022-01-27 22:04:14 +00:00
Brian Duddie
95c83dbfc0 Merge "Add head tracker sensor feature to PackageManager" 2022-01-27 19:51:15 +00:00
Karishma Vakil
fd190e8b9a Merge changes from topic "refresh-api"
* changes:
  [SafetyCenter] Add REASON_REFRESH_SAFETY_SOURCES to System API
  [SafetyCenter] Delete refresh API constants from `android.content.Intent`
2022-01-27 16:56:22 +00:00
Billy Lau
cfa26cb21e Merge "Add BinaryTransparencyService as new SystemService." 2022-01-27 15:36:49 +00:00
Shashwat Razdan
f3563df9af Merge "CloudSearch API: data class declarations and interface definitions." 2022-01-27 09:09:14 +00:00
Jing Ji
354efbc368 Merge changes from topic "bg_app_restrictions"
* changes:
  Expose the bg restriction exemption list as an internal API.
  Add an action button to the notification for bg battery abusive apps
  Exempt certain app behaviors for their background battery usage
  Add tracking on abusive broadcast and service binding requests
  Add exemption cases for app background restrictions
  Monitor long-running foreground services
  Post notification on abusive background current drain
  Allow limited alarms/jobs when background restricted
  Cap the LRU position of broadcast receivers in bg restricted apps
  Add a tracker on background current drains for each uid
  Add background restriction levels definition and its controller
2022-01-27 05:57:18 +00:00
Hans Boehm
1350cb73d7 Merge "Prefer WeakReference.refersTo() to get()" am: 63e3c2c709 am: aca7bb4b9f am: a2e1dc8b9a am: db7bb39fb9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1956816

Change-Id: I8f190ce1b3c9fc97a4efd8f3d90178db6ab362da
2022-01-27 01:18:15 +00:00
Hans Boehm
db7bb39fb9 Merge "Prefer WeakReference.refersTo() to get()" am: 63e3c2c709 am: aca7bb4b9f am: a2e1dc8b9a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1956816

Change-Id: I449eec7c2bc21bfa5c7909a4508fbf899a59040d
2022-01-27 01:01:31 +00:00
Hans Boehm
a2e1dc8b9a Merge "Prefer WeakReference.refersTo() to get()" am: 63e3c2c709 am: aca7bb4b9f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1956816

Change-Id: I626a291208a3063b93cdd0ef1de131162cc916cb
2022-01-27 00:50:30 +00:00
Hui Wu
b0017b593f CloudSearch API: data class declarations and interface definitions.
CTS-Coverage-Bug: 210528288
Bug: 210528288
Test: RBE Built redfin-eng and tested on a physical device
Change-Id: I640be77dbf05633b7a17ada73ea261dbd0027697
2022-01-26 13:40:00 -08:00
Evan Rosky
c5a17006c8 Move fixed-rotation-related display information into config
Augment the "apparent" display information in configuration
from just the display bounds (maxBounds) to also include the
display rotation and cutout. Like maxBounds, these will be
expected to always be set as basically "the display that this
configuration was built against".

This heavily simplifies fixed-rotation since now we don't
need to deal with the "are we overriding?" question and also
don't need extra activity servertransactions. The configuration
is also in sync (since it is the source of truth used by
resources). Additionally, this means that even the current
legacy fixed-rotation model should work with in any
mixed-rotation situtaion, not just fullscreen.

Bug: 202201326
Test: atest DisplayTest
Change-Id: I6232f74c74324b70b1b0c9f46448c509c2694310
2022-01-26 12:51:42 -08:00
Hai Zhang
9af8ad18e3 Link to getPlatformPermissionsForGroup() in PermissionInfo.group doc.
Test: presubmit
Change-Id: Id98bd5bdeff5270832487c8b89770c87c135c95b
2022-01-26 20:21:15 +00:00
Pyuli Naithani
a4a0aeb323 Update the documentation for intent ACTION_VIEW_APP_FEATURES to include the <meta-data> tag for the preference summary.
BUG: 188920241

Test: N/A
Change-Id: I1e94702c54e89157fc201fb4b34420c6a8a27a7e
2022-01-26 17:23:15 +00:00
Pinyao Ting
92f190ee40 Merge "Finalized schema in AppSearchShortcutInfo" 2022-01-26 03:34:19 +00:00
Jing Ji
8a3b17f056 Add exemption cases for app background restrictions
For the high background current drains and long-running FGS, exempt
idle allowlisted apps, companion device apps, device owner apps, etc.
Additionally, we're also exempting/setting a higher threshold for
the apps with long-running media sessions, media/location FGS,
bg location permissions.

Meanwhile, the durations that apps spent on TOP state will be excluded
from all these accounting.

BYPASS_INCLUSIVE_LANGUAGE_REASON=Legacy API name

Bug: 200326767
Test: atest FrameworksMockingServicesTests:BackgroundRestrictionTest
Change-Id: Ie22cd011679dcb70612cf740fa3e6dec9f1299d0
2022-01-25 14:33:21 -08:00
Jing Ji
64ac1a9230 Monitor long-running foreground services
If a certain package has foreground services running for a long time,
say the accumulated durations over last X hours are more than Y hours,
system will post a notification to remind the user.

Some type of apps are subjected to be exempted, i.e. if it's already
in the device idle allowlist. More exemption could be added in
the follow-up CLs.

Bug: 200326767
Bug: 203105544
Test: atest FrameworksMockingServicesTests:BackgroundRestrictionTest
Change-Id: I3a8f34c33e7a533240abc7cf4fa569a0956eec73
2022-01-25 14:33:21 -08:00
Pedro Loureiro
2b2ddee296 Merge "Allow framework-res APK splits from Apexes" 2022-01-25 15:28:01 +00:00
Charles Chen
19e1e118e1 Merge "Override (un)registerComponentCallbacks for ContextWrapper" 2022-01-25 14:18:58 +00:00
Himanshu Dagar
8ceb94806d Merge "Review Changes for Media CP Redirection CL" 2022-01-25 12:17:48 +00:00
Pedro Loureiro
c6d1dec22c Allow framework-res APK splits from Apexes
Test: m FrameworkResApkSplitsHostTest

Bug: 195732042

Change-Id: I516e6267c661e112c234aed27e2eef2ce9ffaf9a
2022-01-25 10:05:57 +00:00
Charles Chen
a4059c2f19 Override (un)registerComponentCallbacks for ContextWrapper
Bug: 193247900
Test: WindowContextTest
Test: ContextWrapperTest

Change-Id: Ia070b12eea5631d70a96d6e41d03ab08f6b44caa
2022-01-25 12:30:47 +08:00
Billy Lau
d1fb08be0a Add BinaryTransparencyService as new SystemService.
Bug: 197684182

Created a new system service that aggregates information about:
1) signed partitions on device
2) APEXs installed on device
3) Modules installed on device

Introduces new adb shell commands as below:
adb shell cmd transparency get image_info [-a]
adb shell cmd transparency get apex_info [-v]
adb shell cmd transparency get module_info [-v]

Test: Built and tested locally on a bramble - the device boots.
Issuing adb shell commands as above provides correct outputs.

Change-Id: I2cae1bd794456688779c70c65b3f5ec8bcd7c6b3
2022-01-24 15:58:05 -08:00
Himanshu Dagar
9c8f641254 Review Changes for Media CP Redirection CL
This CL is in continuation to ag/16214441 CL and takes care of few review comments which were pending from the media content provider redirection CL.

Bug: 202035750
Test: atest CtsAppCloningHostTest
Change-Id: I408f985d257b03faef9b934acb43dd5c4cbdb508
2022-01-24 21:29:49 +00:00
Winson Chiu
489e97dff0 Clean up AndroidPackageApi
Prepares for mainline @SystemApi by getting interfaces to a state where
metalava runs correctly. Doesn't actually expose anything for now.

Bug: 173455397
Bug: 173807334

Test: build

Change-Id: Ie33e883c755d4dd1a0b6c59df4ccde4b11a2a981
2022-01-24 12:40:56 -08:00
Kholoud Mohamed
35216e0275 Merge "Allow updating enterprise strings in the framework" 2022-01-24 15:09:02 +00:00
Karishma Vakil
dd839b26e4 [SafetyCenter] Delete refresh API constants from android.content.Intent
* Suggested by API council to move them to
`android.safetycenter.SafetyCenterManager`

Test: Will be tested in use in SafetyCenterManager refresh API
Bug: 215555855
Change-Id: I4f84ae5a9037b4938f0ba7feb151c50149362fdd
2022-01-24 12:55:06 +00:00
Kathy Chen
50460ddd32 Merge "AmbientContext (aka Ambient PCC) Framework API, with a client API for apps to subscribe for AmbientContextEvents, and a provider API for AiAi to implement and provide the detected events." 2022-01-23 01:54:29 +00:00
Kathy Xiaoming Chen
5d568eda62 AmbientContext (aka Ambient PCC) Framework API, with a client API for apps to subscribe for AmbientContextEvents, and a provider API for AiAi to implement and provide the detected events.
Client apps need the ACCESS_AMBIENT_CONTEXT_EVENT permission to use the service. The permission protection level is internal|role.

API overview: http://go/ambient-framework-api
PRD: http://go/ambient-attribution-prd
Design doc: http://go/ambient-service-api

Test: CTS test
Bug: 192476579
Change-Id: I9daede83af34f215c278cb0530238faba1be5c70
Ignore-AOSP-First: to prevent new feature leak.
2022-01-22 22:07:22 +00:00
Pinyao Ting
d17d3c6b25 Finalized schema in AppSearchShortcutInfo
BYPASS_INCLUSIVE_LANGUAGE_REASON: The term "Man" in this CL is a
shorthand of the term "Manifest", it's a false alarm.

Bug: 151359749
Test: atest CtsShortcutManagerTestCases
Change-Id: I0b17bd4cb0eca3a2eba95e2b9de122d41da08502
2022-01-22 05:04:02 +00:00
Minche Li
03a3c96b49 Merge "Adds PackageManager#FEATURE_WINDOW_MAGNIFICATION" 2022-01-22 02:59:57 +00:00
Roman Kalukiewicz
c143c946af Merge "Add ability to send double extras from adb." 2022-01-21 23:08:33 +00:00
Shubang Lu
bcf19024d3 Merge "TIAF: rename IApp -> InteractiveApp." 2022-01-21 18:04:09 +00:00
kholoud mohamed
9b24fdfb32 Allow updating enterprise strings in the framework
Bug: 188410712
Bug: 211422509
Test: manual
Change-Id: Ia27b22b6cad14c8b62f3415a4967e479c21eb30c
2022-01-21 17:10:33 +00:00
Thomas Vannet
d5aa1c4270 Merge "Rename selfRevokePermissions to revokeOwnPermissionsOnKill" 2022-01-21 15:03:35 +00:00
Himanshu Dagar
29e2888eea Merge "Media CP queries redirection from clone profile to its parent" 2022-01-21 09:06:26 +00:00
Thomas Vannet
395f8deeff Rename selfRevokePermissions to revokeOwnPermissionsOnKill
Test: atest android.permission.cts.RevokeOwnPermissionTest
Bug: 215555831
Bug: 210575642
Bug: 210387494
Change-Id: I94e29f66d13ac76669fab2ccc08879c30c26b7ea
2022-01-21 05:50:22 +00:00
Hans Boehm
3492061b6d Prefer WeakReference.refersTo() to get()
This is an initial pass over frameworks/core to avoid WeakReference
get(), since that can cause the referent to be unnecessarily retained.
Most of these were found by searching for "get() == null".

Bug: 215259836
Test: Treehugger
Change-Id: I5227b05ca22e83b886ccf6713989961076df3f8c
2022-01-20 17:57:02 -08:00
Brian Duddie
ee70abee90 Add head tracker sensor feature to PackageManager
Bug: 210156629
Test: compile only
Change-Id: Ibf419737df5ea0e92fd7f734b2060b7ee749a92f
2022-01-20 13:33:14 -08:00
Pinyao Ting
418e742560 Merge "Adds capability related setters in ShortcutInfo.Builder" 2022-01-20 19:34:14 +00:00
shubang
a0ac8f6713 TIAF: rename IApp -> InteractiveApp.
based on advice from API Council
And unhide TvInteractiveAppView and TvInteractiveAppInfo

Bug: 213836031
Bug: 205738783
Test: atest android.media.tv.interactive.cts.TvInteractiveAppViewTest

Change-Id: I6b97f89dd29efed1b4248faae366fbf1a56b0614
2022-01-20 18:34:58 +00:00
Himanshu Dagar
a0f1107f19 Media CP queries redirection from clone profile to its parent
As of now when a clone profile user [android.os.usertype.profile.CLONE] queries any content provider (e.g. media, ...etc), it gets served by the corresponding content provider running in that user space. So, in case of the media content provider, sharing of media items of the owner user space is not possible in the clone profile user space. To facilitate the same, media content provider queries are getting redirected to the owner user space's content provider as a part of this CL.

Bug: 202035750
Test: atest CtsAppCloningHostTest
Change-Id: I09500f86dbd149739422695b6dbd9f1a9717b4e6
2022-01-20 10:39:14 +00:00
mincheli
634b425e63 Adds PackageManager#FEATURE_WINDOW_MAGNIFICATION
Check if the platform has the system feature
1. skip CTS if it doesn't support
2. hide settings if it doesn't support

Bug: 213414385
Test: manual test
Change-Id: I23928f6ac8eaecc4ed5ed3c123afe32e64208c3a
2022-01-19 21:54:02 +00:00
Bernardo Rufino
1a5cb387d6 Revert "Revert "Migrate unsafe parcel APIs in framework-minus-apex""
This reverts commit 331be9a643.

Reintroducing ag/16366278 since it seems unrelated to b/214053959 (more details on b/214053959#comment55).

Original commit message:

Migrate unsafe parcel APIs in framework-minus-apex

Migrate the following unsafe parcel APIs in framework-minus-apex:
* Parcel.readSerializable()
* Parcel.readArrayList()
* Parcel.readList()
* Parcel.readParcelable()
* Parcel.readParcelableList()
* Parcel.readSparseArray()

This CL was generated by applying lint fixes that infer the expected
type from the caller code and provide that as the type parameter
(ag/16365240).

A few observations:
* In some classes we couldn't migrate because the class also belonged to
another build module whose min SDK wasn't current (as is the case for
framework-minus-apex), hence I suppressed the lint check
(since I'll eventually submit the lint check to the tree).
* In some cases, I needed to do the cast in
https://stackoverflow.com/a/1080525/5765705 to make the compiler happy
since there isn't another way of providing a class of type
Class<MyClassWithGenerics<T>>.
* In the readSerializable() case, the new API also requires the class
loader, that was inferred to by InferredClass.class.getClassLoader().
* Note that automatic formatting and import rely on running hooked up
to the IDE, which wasn't the case here.

Bug: 195622897
Change-Id: I272432e6e082a973f7a50492ec35d79c2b577c93
Test: TH passes
2022-01-19 11:13:18 +00:00
Pinyao Ting
8c9f13f1e1 Adds capability related setters in ShortcutInfo.Builder
Bug: 202872648
Test: atest ShortcutManagerTest2
Change-Id: Idbb79779564b9fce704be19a13695b6e08cb1088
2022-01-19 05:06:10 +00:00
Winson Chiu
156cb611e6 Merge "Move package parsing to services.jar" 2022-01-18 23:58:53 +00:00
Lucas Silva
92cae130d0 Merge "Clean up CommunalManagerService" 2022-01-18 21:15:15 +00:00