CTS-Coverage-Bug: 210528288
Bug: 216507592
Test: RBE Built redfin-eng and tested on a physical device
Change-Id: Ic9505f659befa01938b413e1e1944c3aaa0e8a0c
* 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
CTS-Coverage-Bug: 210528288
Bug: 210528288
Test: RBE Built redfin-eng and tested on a physical device
Change-Id: I640be77dbf05633b7a17ada73ea261dbd0027697
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
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
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
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
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
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
* 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
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.
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
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
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
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
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
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