Commit Graph

11178 Commits

Author SHA1 Message Date
Marc Kassis
8b6d1169dc Merge "Each Display Mode now has an array of supported HDR types" 2022-12-05 13:45:23 +00:00
TreeHugger Robot
329f5f3858 Merge "Add rate limiter to sendHint API call" 2022-12-05 09:45:00 +00:00
Marc Kassis
643cd12ae7 Each Display Mode now has an array of supported HDR types
Bug: 241349060
Test: atest android.display.cts.DisplayTest
Change-Id: I3c5b9fb25cd79497be1acded366d1b4cf85e1daf
2022-12-05 08:17:32 +00:00
Wei Sheng Shih
941c58dee9 Merge "Extract the drawing logic from StartingSurfaceDrawer." 2022-12-05 03:11:23 +00:00
Ruslan Tkhakokhov
6dfaaf1969 Merge "Make BackupRestoreEventLogger System API" 2022-12-03 18:06:20 +00:00
Pawan Wagh
8234ca00ff Merge "Adding JNI for create random parcel" am: 373ab1fab6 am: 6605ceeab1 am: a20f2f9e72
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2321413

Change-Id: I7e737a0313268ce677b488690c6936a083fb3b6b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-03 06:47:48 +00:00
Pawan Wagh
a20f2f9e72 Merge "Adding JNI for create random parcel" am: 373ab1fab6 am: 6605ceeab1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2321413

Change-Id: Ib6a2e687865bc9237900fd5dbd9c9bbf3557a4e5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-03 06:06:44 +00:00
Pawan Wagh
6605ceeab1 Merge "Adding JNI for create random parcel" am: 373ab1fab6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2321413

Change-Id: I3bc719f683cd4d69fa2da7018063b258dc64685f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-03 05:36:37 +00:00
Pawan Wagh
373ab1fab6 Merge "Adding JNI for create random parcel" 2022-12-03 04:50:08 +00:00
Matt Buckley
56093a77a9 Add rate limiter to sendHint API call
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
2022-12-03 03:45:41 +00:00
wilsonshih
f8801f5069 Extract the drawing logic from StartingSurfaceDrawer.
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
2022-12-02 12:11:30 +00:00
Ruslan Tkhakokhov
ecc97c0ba2 Make BackupRestoreEventLogger System API
Also adds BackupManager#getBackupRestoreEventLogger() - a method to
instantiate BackupRestoreEventLogger.

Bug: 244436184
Test: atest FrameworksCoreTests:BackupManagerTest
Change-Id: I5539094dc2c465013c9567fd35313dc595218571
2022-12-02 08:14:21 +00:00
Dennis Song
b82ea935ae Merge "Respect partition precedence while deciding overlay priority" am: 9f25e02fa3 am: 8579fa7af4 am: 0c7d4135fb
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2310127

Change-Id: Ic8a455217f9c56970d5b1b9917fc38fe005f3001
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 05:18:01 +00:00
Dennis Song
0c7d4135fb Merge "Respect partition precedence while deciding overlay priority" am: 9f25e02fa3 am: 8579fa7af4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2310127

Change-Id: I808b41aaf25d8546b508e6041a844c873dc88208
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 04:42:14 +00:00
Tyler Freeman
c9b04d73ae Merge "fix(non linear font scaling): fix crash with certain negative SP values" 2022-12-02 04:32:47 +00:00
Dennis Song
8579fa7af4 Merge "Respect partition precedence while deciding overlay priority" am: 9f25e02fa3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2310127

Change-Id: I55dfc0f2933d956f924a1017d1aa94ad04aeff5c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 04:13:08 +00:00
Dennis Song
9f25e02fa3 Merge "Respect partition precedence while deciding overlay priority" 2022-12-02 03:33:00 +00:00
Pawan Wagh
c35a4b8b70 Merge "Adding example java binder service fuzzer" am: a8e835c4da am: e9697e91ed am: 41b16dcff6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2315520

Change-Id: Ia62476cbf37ee0e7755878fd12092afb24e63a75
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 02:39:12 +00:00
Pawan Wagh
8bd1cb7f16 Merge "Adding java lib for fuzzService" am: 5c07744677 am: ac7378ddc3 am: a2432016ad
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2300212

Change-Id: I7764e9d34182c89f0c1b8d8e2ec49b67fa487a8f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 02:38:13 +00:00
Ilya Matyukhin
d71de2614a Merge changes from topic "new-udfps-touch" into tm-qpr-dev am: 0672ae40db am: 858442e50d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20550191

Change-Id: I15ceb55ba19a1b07605d80614ca4c538c557cff5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-02 02:06:40 +00:00
TreeHugger Robot
eeafd7358f Merge changes I63b1ee6b,I8de3afa2
* changes:
  Refactor locks in radio client for HIDL HAL
  Refactor locks in radio client for AIDL HAL
2022-12-02 01:23:22 +00:00
Tyler Freeman
bae1102a51 fix(non linear font scaling): fix crash with certain negative SP values
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
2022-12-01 17:05:32 -08:00
Weilin Xu
6402193c32 Refactor locks in radio client for HIDL HAL
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
2022-12-01 19:07:20 +00:00
Pawan Wagh
41b16dcff6 Merge "Adding example java binder service fuzzer" am: a8e835c4da am: e9697e91ed
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2315520

Change-Id: I00f1f63e63d4a0414d32064ded0556f86b09a34d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-01 15:51:07 +00:00
Pawan Wagh
e9697e91ed Merge "Adding example java binder service fuzzer" am: a8e835c4da
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2315520

Change-Id: Ia5b1a336568abe0c1dc6c038abea3a35269bb824
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-01 15:18:59 +00:00
Pawan Wagh
a2432016ad Merge "Adding java lib for fuzzService" am: 5c07744677 am: ac7378ddc3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2300212

Change-Id: Iada851f9dd8401c8917e4d46e902cd182969186a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-01 15:13:05 +00:00
Pawan Wagh
ac7378ddc3 Merge "Adding java lib for fuzzService" am: 5c07744677
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2300212

Change-Id: Iac84cefbbe86f558bf35974e2f134f425703c2be
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-01 14:44:47 +00:00
Shawn Lin
ae07cf71f5 Merge "Support DisplayShape" 2022-12-01 07:34:39 +00:00
Kohsuke Yatoh
a089ecef9f Merge "Make Typeface#releaseNativeObjectForTest @TestApi." 2022-12-01 00:58:46 +00:00
Yeabkal Wubshit
c04d8de7c4 Merge "Create API to Compute Vibration Pattern Equivalent to a VibrationEffect" 2022-12-01 00:04:58 +00:00
Weilin Xu
c8b8b2986c Refactor locks in radio client for AIDL HAL
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
2022-11-30 23:12:10 +00:00
Felipe Leme
372a08e0b8 Merge "Implemented IntArray.toString()" 2022-11-30 20:24:54 +00:00
Yeabkal Wubshit
4e125b212a Create API to Compute Vibration Pattern Equivalent to a VibrationEffect
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
2022-11-30 20:07:01 +00:00
Ilya Matyukhin
858442e50d Merge changes from topic "new-udfps-touch" into tm-qpr-dev am: 0672ae40db
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20550191

Change-Id: Idad692926ac241f051d6580ddfe1b1318e8cad08
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-30 17:16:07 +00:00
Vladimir Komsiyski
79101e966f Merge changes from topic "virtual-sensors"
* changes:
  Adjust the behavior of SensorManager for virtual device sensors.
  Virtual sensors lifecycle management.
  Virtual sensor API.
2022-11-30 12:41:38 +00:00
TreeHugger Robot
9ec600d356 Merge "Delete android.os.EnvironmentTest#testIsExternalStorageManager" 2022-11-30 01:06:02 +00:00
Tyler Freeman
7f0fb8234f Merge "feat(non linear font scaling)!: add FontScaleConverter for non-linear font scaling." 2022-11-29 23:43:18 +00:00
Xiang Wang
90e2444569 Merge "Include public GameManager unit tests in presubmit" 2022-11-29 23:03:35 +00:00
TreeHugger Robot
45ce9ddfab Merge "Enable telephony fallback triggered by providers" 2022-11-29 23:01:17 +00:00
Winson Chiu
b1dfdd2f20 Delete android.os.EnvironmentTest#testIsExternalStorageManager
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
2022-11-29 22:22:12 +00:00
Tyler Freeman
5f7036df71 feat(non linear font scaling)!: add FontScaleConverter for non-linear font scaling.
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
2022-11-29 12:09:02 -08:00
Neil Fuller
7fbcae6efd Enable telephony fallback triggered by providers
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
2022-11-29 19:45:45 +00:00
Sally Yuen
77eb98c8ac Merge "Expose more SystemAPI methods on AccessibilityDisplayProxy" 2022-11-29 16:36:27 +00:00
Vladimir Komsiyski
ca9308224a Virtual sensor API.
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
2022-11-29 13:50:21 +01:00
TreeHugger Robot
f7d1c837e4 Merge "OverlayManagerImpl support to commit OverlayManagerTransaction" 2022-11-29 12:13:22 +00:00
Pawan Wagh
b44ed765ab Adding JNI for create random parcel
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
2022-11-29 11:49:54 +00:00
Dennis Song
040471fb38 Respect partition precedence while deciding overlay priority
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
2022-11-29 17:14:05 +08:00
TreeHugger Robot
2e29531489 Merge "Enforce the overlayable mechanism for self-targeting" 2022-11-29 08:40:11 +00:00
Shawn Lin
2742c68f6c Support DisplayShape
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
2022-11-29 15:48:50 +08:00
Xiang Wang
20605110c4 Include public GameManager unit tests in presubmit
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
2022-11-28 19:18:50 -08:00