Commit Graph

11715 Commits

Author SHA1 Message Date
Gavin Corkery
2e81839835 Remove Context.SUPPLEMENTAL_PROCESS_SERVICE
Test: Make
Bug: 216474405
Change-Id: I272e15cba8c09d5ce7f28d219f91e07cdee048bb
2022-02-02 18:27:24 +00:00
Nikita Ioffe
e5cac878b6 Merge "Teach PackageManagerService about supplemental process" 2022-02-02 12:41:45 +00:00
Sharon Su
79d91e3efa Merge changes from topic "susharon-wallpapereffectsgeneration"
* changes:
  Server implementation of WallpaperEffectsService API.
  Data class and interface for wallpaper effects generation api.
2022-02-02 07:42:16 +00:00
Sharon Su
0b1dea8145 Data class and interface for wallpaper effects generation api.
Test: manual build and run cts on devices
Bug: 213238425
CTS-Coverage-Bug: 213238425
Change-Id: I8c3d579a5123aaa99999f9d0df92998cec9dec34
2022-02-01 22:08:49 +00:00
Nikita Ioffe
05b17e193f Teach PackageManagerService about supplemental process
Each app will have it's own supplemental process with a different uid
that uniquely maps to the uid of the application that this supplemental
process corresponds to.

This will impact some of the PackageManager and PermissionManager APIs
(e.g. PackageManager.getPackagesForUid, or
PermissionManager.checkPermission). In order to make it possible for
PackageManager to correctly treat supplemental process uids, we first
need to teach it about the supplemental process APK itself, hence this
change.

Bug: 215241564
Test: atest PackageManagerShellCommandTest
Change-Id: I28f4a382900f276170c51e8c92d8fcde8419ddb1
2022-02-01 16:59:17 +00:00
An An Yu
1197b41951 Merge "Add documentation on DisplayContext API that returned Resources could be stale." 2022-02-01 04:10:22 +00:00
Roopa Sattiraju
d5d506f7b5 Merge "API changes requires for Bluetooth apk inside the apex to build." 2022-02-01 03:00:57 +00:00
An An Yu
314ba598ee Add documentation on DisplayContext API that returned Resources could
be stale.

Test: None
Bug: 165859619

Change-Id: I0fb642c310ac33a4a79bff94683864d1fc80824a
2022-01-31 14:26:16 -08:00
Songchun Fan
3cb4911467 Merge "[pm] small refactor for InstallLocationUtils" 2022-01-31 22:15:37 +00:00
Kholoud Mohamed
e3fbc9417f Merge "Changed the managed profile switching icon" 2022-01-31 19:45:49 +00:00
Roopa Sattiraju
afa544dd74 API changes requires for Bluetooth apk inside the apex to build.
Bug: 216731966
Test: Compile and Test
Change-Id: Ic8e9c2db0743738b2b6649451c79a559c3b8edc5
2022-01-31 19:42:41 +00:00
Jeremy Meyer
b2f031a19f Merge "Add dumping of Resource paths and resource history" 2022-01-31 19:29:42 +00:00
Songchun Fan
997c6f7514 [pm] small refactor for InstallLocationUtils
+ Renaming to reflect the actual functionality of the class.

+ Move freeStorage related code to PackageManagerService, we will want
to clean that up later.

BUG: 198177734
Test: atest InstallLocationUtilsTest
Change-Id: I951129ffb5e53df548ef78fcd9de79c0ef994914
2022-01-31 18:59:37 +00:00
TreeHugger Robot
d0ee4efdcc Merge "Add platinum package manager suite to staging" 2022-01-31 16:30:45 +00:00
Alex Buynytskyy
a7f7cd8970 Merge "SDK -> SDK_PACKAGE to address API feedback." 2022-01-30 01:26:08 +00:00
kholoud mohamed
6c9333974d Changed the managed profile switching icon
Switched CrossProfileApps#getProfileSwitchingIconDrawable to use
PackageManager#getUserBadgeForDensityNoBackground which returns a
drawable that could be updated by the device management role holder.

Test: manual
Bug: 203548565
Bug: 188410712
Change-Id: Ia4246d7196b9d16e940d19752076b7d7f8916120
2022-01-29 15:07:26 +00:00
Jeremy Meyer
353e64eef5 Add dumping of Resource paths and resource history
Sample of results:

history
0
  class=class android.content.res.Resources
  resourcesImpl
    class=class android.content.res.ResourcesImpl
    assets
      class=class android.content.res.AssetManager
      apkAssets=
      0
        class=class android.content.res.ApkAssets
        debugName=<empty> and /system/framework/framework-res.apk
        assetPath=/system/framework/framework-res.apk
      1
        class=class android.content.res.ApkAssets
        debugName=/product/overlay/GoogleConfigOverlay.apk
        assetPath=/product/overlay/GoogleConfigOverlay.apk

Fixes: 206615535
Test: Called from custom app to confirm format and info
Change-Id: I19a9fc60b61fff86e5b41a2d789d6dde8acf51a3
2022-01-28 22:04:12 +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
Patrick Baumann
88df10f277 Add platinum package manager suite to staging
This change adds all existing package manager tests we've considered for
the platinum test suite to TEST_MAPPING.

Bug: 140252512
Test: N/A
Change-Id: Ib1e27820a093198c7dcc0343fa36002dd19174e9
2022-01-27 16:37:48 -08: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