Commit Graph

22635 Commits

Author SHA1 Message Date
TreeHugger Robot
3811eb4e2e Merge "Add toString to SyncNotedAppOp, AsyncNotedAppOp" 2022-01-31 05:08:57 +00:00
Kholoud Mohamed
2cf9636806 Merge "Allow overriding managed profile notification badge" 2022-01-30 18:13:06 +00:00
Kholoud Mohamed
1095e15a9a Merge "Allow overriding enterprise badge drawables" 2022-01-30 18:12:11 +00:00
Alex Buynytskyy
a7f7cd8970 Merge "SDK -> SDK_PACKAGE to address API feedback." 2022-01-30 01:26:08 +00:00
kholoud mohamed
3df423f2a8 Allow overriding managed profile notification badge
Bug: 203548565
Bug: 188410712
Test: manual
Change-Id: I7e66442583e061d03db7281ab3d367ca88a832cb
2022-01-29 15:06:51 +00:00
kholoud mohamed
dc0bab518f Allow overriding enterprise badge drawables
Bug: 203548565
Bug: 188410712
Test: manual testing
Change-Id: Ibee6c28e8a231eab9c370af3065619c2dffa706a
2022-01-29 15:05:19 +00:00
Salud Lemus
c117711232 Merge "Use device owner type to restrict a financed device owner" 2022-01-28 22:16:54 +00:00
Etienne Ruffieux
5c31c58990 Merge "Added BinderCallsStats Bluetooth initialization" 2022-01-28 22:05:17 +00:00
Dave McCloskey
3fc735da92 Merge "Changes to support adding CTS Test TrustTestCases." 2022-01-28 19:55:11 +00:00
Salud Lemus
ad99d7570b Use device owner type to restrict a financed device owner
The restriction is to limit the APIs a financed device owner can
call.

Bug: 215754643
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest

Change-Id: Ic38b50d7388b277ad74d2c22182bc1e711a1aea4
2022-01-28 10:53:44 -08: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
Felipe Leme
11ef3cc33c Merge "Improves dump() to handle special cases." 2022-01-28 15:57:19 +00:00
Antoan Angelov
7cb84c79f3 Merge "Protect getPersistentDataPackageName with ACCESS_PDB_STATE" 2022-01-28 14:32:07 +00:00
Pablo Gamito
d72672e545 Merge "Add option to override background color for animation through overridePendingTransition" 2022-01-28 14:26:11 +00:00
Ricky Wai
d8d1b82e44 Merge "Add restricted settings app ops and apply it into Restricted Preference" 2022-01-28 11:23:17 +00:00
Felipe Leme
4381e4f0fa Improves dump() to handle special cases.
When "dumpsys activity" is called with special arguments (like
--list-dumpables), dump() should be handled by Activity itself,
not the subclasses, otherwise the end result would be spammed.

This CL fixes that behavior, but only for apps targeting T (so it
maintains backward compatibility for apps that are explicitly
checking for the special values).

Bug: 149254050

Test: m update-api
Test: manual verification with 'adb dumpsys activity ...'
Test: atest CtsAppTestCases:android.app.cts.ActivityDumpTest
Test: adb shell dumpsys platform_compat|grep DUMP_IGNORES_SPECIAL_ARGS||echo NOT_FOUND

Change-Id: I918c9a6649cb66f9e2b6509a643005fac110d152
2022-01-28 00:06:24 -08:00
TreeHugger Robot
0891d4b390 Merge "Add all the Smartspace UI templates' corresponding data classes." 2022-01-28 05:43:15 +00:00
Ganesh Olekar
3af9d9ad7a Add toString to SyncNotedAppOp, AsyncNotedAppOp
Bug: 151394215
Test: Manual
Change-Id: I344d4778d2f423b4b2b5be4adfdad0edbe5b8ef9
2022-01-27 22:56:12 +00:00
Evan Rosky
aad20ce51b Merge "Move fixed-rotation-related display information into config" 2022-01-27 22:04:14 +00:00
Cecilia
6927948dff Add all the Smartspace UI templates' corresponding data classes.
- SmartspaceDefaultUiTemplateData represents the data of a Smartspace
card with the default UI template;
- Other templates' data classes are all subclasses of
SmartspaceDefaultUiTemplateData;
- SmartspaceIcon and SmartspaceTapAction are the newly-added primitives.

More details in go/ss-launcher-templated-ui.

Test: tested locally
Bug:213926964,212650337
CTS-Coverage-Bug:214471292

Change-Id: I056c49e3db7060697be4a3a8f51358802f2610b0
2022-01-27 21:00:47 +00:00
Etienne Ruffieux
8b6dc9b3ed Added BinderCallsStats Bluetooth initialization
Tag: #feature
Bug: 195146428
Test: manual
Change-Id: Ia9e35c8299fc039da977018eab84402c2ba0caab
2022-01-27 18:30:43 +00:00
Shannon Chen
33b42f50df Merge "Add a test API allowing overriding the GameService provider." 2022-01-27 18:03:46 +00:00
Billy Lau
cfa26cb21e Merge "Add BinaryTransparencyService as new SystemService." 2022-01-27 15:36:49 +00:00
Pablo Gamito
8e3a0e498c Add option to override background color for animation through overridePendingTransition
Test: atest CtsWindowManagerDeviceTestCases:AnimationBackgroundTests
Change-Id: I3debc8c1f4646cfd7c20c3f8e57abd465aec23ad
2022-01-27 15:41:20 +01:00
arangelov
0273969a69 Protect getPersistentDataPackageName with ACCESS_PDB_STATE
Fixes: 216528992
Test: none
Change-Id: I4f326c25b56e0c31746267a269f0b99c87798951
2022-01-27 12:33:14 +00:00
Sudheer Shanka
077c836e99 Merge "Add APIs for querying broadcast response stats." 2022-01-27 09:38:37 +00:00
Shashwat Razdan
f3563df9af Merge "CloudSearch API: data class declarations and interface definitions." 2022-01-27 09:09:14 +00:00
Chris Tate
32a66eac26 Merge "Full teardown when the user stops background apps" 2022-01-27 07:51:40 +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
Hans Boehm
63e3c2c709 Merge "Prefer WeakReference.refersTo() to get()" 2022-01-27 00:22:02 +00:00
Dave McCloskey
a7da0e26a5 Changes to support adding CTS Test TrustTestCases.
Bug: 213631672
Test: atest TrustTestCases

Change-Id: I43bffe76cca38171f19538740a25eb5d3cb09c54
2022-01-26 16:12:00 -08:00
Beverly Tai
3f6d9470cb Merge "Add interface for services to share SessionIds" 2022-01-26 23:26:10 +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
Felipe Leme
9320f1b7bf Merge "Makes Activity.addDumpable() a @TestApi" 2022-01-26 17:50:22 +00:00
Felipe Leme
b41b25ff73 Merge "Replaces DPM.clearLogoutUser() by logoutUser()" 2022-01-26 16:34:47 +00:00
shannonchen
d5846ad238 Add a test API allowing overriding the GameService provider.
This is so that CTS tests can be run against a test GameService
rather than against whatever GameService a particular device
has set as its default.

Ignore-AOSP-First: GameService incomplete in AOSP
Test: atest CtsGameServiceTestCases GameServiceProviderSelectorImplTest
Bug: 202417555
Bug: 206128693
Change-Id: I5d0d1a4047949117850818c14b5df617314efcf5
2022-01-26 15:48:22 +00:00
Ricky Wai
36e951f1a9 Add restricted settings app ops and apply it into Restricted Preference
Bug: 202130031
Test: Able to compile and boot device successfully
Change-Id: I4501cc90c681165e10c82a359f21951856519fd8
2022-01-26 14:48:57 +00:00
Sudheer Shanka
7ce974c2b2 Add APIs for querying broadcast response stats.
Bug: 206518114
Test: atest tests/tests/app.usage/src/android/app/usage/cts/UsageStatsTest.java
CTS-Coverage-Bug: 206518114
Change-Id: Idcefc143215a372a7bd786fcb2208a7c26f2f7e2
2022-01-26 08:10:56 +00:00
Sudheer Shanka
6ec5f7fd7f Merge "Inform UsageStatsManager about broadcast-dispatched events." 2022-01-26 08:08:11 +00:00
Jernej Virag
838426ac7a Merge "Limit the maximum size of small notification icons" 2022-01-26 07:48:41 +00:00
Christopher Tate
48d0a4892f Full teardown when the user stops background apps
Not just moving its services out of the FGS mode.

The shell command for invoking this operation has changed; it is now

    adb shell cmd activity stop-app [--user NUM] PACKAGE

Bug: 192504071
Test: manual (Maps nav, YouTube, etc)
Test: atest CtsAppTestCases:android.app.cts.ServiceTest
Test: atest RunningFgsControllerTest
Change-Id: Ic14c1ba557460e25dd1ba2fd79462918e9a47377
2022-01-25 19:30:38 -08:00
Felipe Leme
52660ae71b Replaces DPM.clearLogoutUser() by logoutUser()
Prior to this change, internal components like Settings or
CarUserManager would need to call 3 APIs to logout a managed user:

1. previousUserId = getLogoutUser();
2. switchUser(previousUserId);
3. clearLogoutUser();

This CL encapsulates the whole process into a new DPM.logoutUser(),
but it keeps the getLogoutUser() (as Car need to know which user it
will be switched to in advance, due to the Vehicle HAL integration).

Test: m update-api
Test: atest FrameworksServicesTests:DevicePolicyManagerTest
Test: atest com.android.cts.devicepolicy.DeviceOwnerTest#testCreateAndManageUser_LogoutUser_system

Fixes: 214336184

Change-Id: Ifffc229ecede5d086338e9c7fa08dce0e0de884c
2022-01-25 18:46:59 -08:00
Jing Ji
8bca883bf2 Expose the bg restriction exemption list as an internal API.
To share the same exemption policy with task manager.

Bug: 200326767
Bug: 203105544
Test: atest FrameworksMockingServicesTests:BackgroundRestrictionTest
Change-Id: I01c70b501e37f13c516d439533e95061ed4a9ebe
2022-01-25 15:23:28 -08:00
Felipe Leme
ed71bd91a0 Makes Activity.addDumpable() a @TestApi
Test: atest CtsAppTestCases:android.app.cts.ActivityDumpTest
Test: m update-api

Bug: 149254050
Bug: 215435293

Change-Id: I3f570e2cc107a6924bbe71dbc47e0508a3b8cb38
2022-01-25 15:16:21 -08:00
Jing Ji
ccaf79d27b Add tracking on abusive broadcast and service binding requests
In case of excessive amount of outgoing broadcast/service binding
requests from a background app, move the app to restricted bucket.
The exemptions in previous CL still applys here.

Bug: 200326767
Test: atest FrameworksMockingServicesTests:BackgroundRestrictionTest
Change-Id: I2ec82f26bf2a72e2201b140979be09794adedf47
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