Adds a rate limiter to the HintSession.sendHint API for safety, and
update tests to reflect this.
Bug: b/243973548
Test: atest PerformanceHintNativeTestCases
Test: atest FrameworksCoreTests:android.os.PerformanceHintManagerTest
Change-Id: Ic68683bacf7df3e11efc3d59689b5470c3fa4274
Prepare for windowless starting surface. Attemp to decouple the drawing
methods from window related handling.
Move most of snapshot drawing method together to a utility class
SnapshotDrawerUtils, so SystemBarBackgroundPainter now can shared for
shell and core.
Bug: 131727607
Bug: 257857570
Test: atest SnapshotDrawerUtilsTest StartingSurfaceDrawerTests
Test: hot launch an app, and verify snapshot starting window show up
without issue.
Test: cold launch app, verify icon style splash screen can show.
Change-Id: I4d2c04e41d375cf6c8711a60977b8f24dddd41c0
The crash was due to some old logic that was looking for near matches.
Now we only return exact matches, and let the interpolation deal with
near matches.
Add test to make sure it doesn't crash at any value passed in.
Test: atest FrameworksCoreTests:android.content.res.FontScaleConverterTest
Bug: b/260984829
Change-Id: Ic90d1c5b48862e4f78b90be5926c9ce6d468acf9
Seperate locks were used for radio service implementation, radio
module, and tuner session in HIDL 2.0 and 1.x HAL clients to
minimize performance issue. Potential dead lock issue in
TunerSession#close was also fixed.
Bug: 258688572
Test: atest com.android.server.broadcastradio.hal2
Test: atest android.broadcastradio.cts
Change-Id: I63b1ee6b2d22c424133e7f208148e2863078cc40
Seperate locks were used for radio service implementation, radio
module, and tuner session for broadcast radio AIDL HAL client to
minimize performance issue. Potential dead lock issue in
TunerSession#close was also fixed.
Bug: 258688572
Test: atest com.android.server.broadcastradio.aidl
Test: atest android.broadcastradio.cts
Change-Id: I8de3afa2935e077488e7575bb9b64495c2113292
This is initially thought of in
go/vibration-effects-for-notifications-dd, and can be used whenever a
vibration pattern is needed to be extracted from a VibrationEffect. See
also: go/vibration-changes-for-notification-channels
Bug: 241732519
Test: unit tests
Change-Id: Ieccbe95d40e638dec23014cc18ba11c0b5754fd8
This test is broken because the app op change restarts the test process.
It's already tested in CTS and seems to be accidentally left over here.
Change-Id: If72b0c3f8928d8a912f54a69a1ceeb27a8ed404f
Non-linear font scaling is meant to improve readability at larger font
scales: larger fonts will scale up more slowly than smaller fonts, so we
don't get ridiculously huge fonts that don't fit on the screen.
The thinking here is that large fonts are already big enough to read,
but we still want to scale them slightly to preserve the visual
hierarchy when compared to smaller fonts.
The FontScaleConverter converts SP dimensions to DP, to be used in
TypedValue.applyDimension() which will affect most TextViews and font
sizes automatically.
For now, all the lookup tables are hardcoded. A follow-up CL will make
them configurable via XML. The hardcoded arrays also default to a linear
curve, as to not break any tests. The non-linear curve will come in a
follow-up CL, to make it easier to roll-back if requested.
Also included is some Javascript to generate the hardcoded arrays, which
can later be manually tweaked and optimized.
Test: unit, CTS, and manual:
1. Run `adb shell settings put system font_scale 2.0`
2. Check different apps to see if they are readable.
Bug: b/237558231
Change-Id: I17d67252bf31f55e57e1f3e8a0f638770e6d2cfd
Now that providers can report their status, we can use this to trigger
telephony fallback mode. This opens the door to more sophisticated
mechanisms for things like flight or tunnel detection. After all,
providers know how they work and what they can / cannot do, and may have
access to sensors and providers that the platform has not.
The new "provider reported" flight mode entry cannot replace the
"time_zone_detector"-level behavior entered via calls to
TimeZoneDetectorStrategy as provider status is new and optional;
providers are not required to report their status so it can be omitted.
Bug: 236624675
Test: atest services/tests/servicestests/src/com/android/server/timezonedetector/
Change-Id: I89fb889ba98b3ddedd271670db09f1bb9df95644
Add VirtualSensor, VirtualSensorEvent and a callback to notify the sensor owner for any changes in the registered sensor listeners.
The virtual device sensors will registered with the sensor framework as runtime sensors. They must remain valid for the entire lifetime of the virtual device, so they are created when it is created and only unregistered when it is closed. The virtual device owners can access them from the device itself after creation.
This CL is only adding the API, the sensor registration and lifetime management is added in a follow-up CL.
Bug: 237278244
Test: atest VirtualSensorConfigTest
Test: atest VirtualSensorEventTest
Test: atest VirtualDeviceParamsTest
Change-Id: I8bb458dacba1bb65b00e288734ce41186c4fe624
Adding an interface in random_parcel_lib and librandom_parcel_jni
to fill a parcel created by java fuzzers.
Test: m random_parcel_lib && m librandom_parcel_jni
Bug: 258075762
Change-Id: I0ecfdd676ee3881857b37cf80974d91492c4094f
Strict partition precedence is enforced now, and the legacy
android:priority is no longer able to reorder overlays across
partition boundaries.
Should use OverlayConfig instead to do the custom configuration
if a cross partition reorder is needed.
Bug: 254407173
Test: atest OverlayConfigTest
Change-Id: I915957bee2ce00286c1bad853206e7e5cb1d140b
Provide APIs to query display shape information:
- Added a DisplayShape class which provide a Path.
- Added a new API in Display to get the DisplayShape based on the
display coordinates.
- Added a new API in WindowInsets to get the relative DisplayShape
based on the window frame.
Bug: 236935288
Test: atest DisplayShapeTest LocalDisplayAdapterTest WindowInsetsTest
InsetsStateTest DisplayPolicyLayoutTests DisplayPolicyTests
WallpaperControllerTests
Change-Id: I7aacfcae42203d3f57cd577da5a69180f66780ad
Switch to use non system uid and grant necessary permission as
otherwise it will crash the test mapping (b/260071873), this was
explained in b/140028487 and a similar fix was done in ag/9523307.
Bug: b/243448953
Test: atest --test-mapping \
services/core/java/com/android/server/app:presubmit
Change-Id: I93bcc3c9d462fb4a2f90acc5c80ae1bcbc255927