Also:
* use @CecSettingName more extensively in the API and method signature.
* add getAllCecSettings() method to HdmiCecConfig.
Bug: 168020131
Test: atest HdmiCecConfigTest
Change-Id: I318357befb05324afd0132dfcbaf2d9cc6f7bf33
* changes:
Apply fixes for EfficientStrings.
Apply fixes for EfficientStrings.
Apply fixes for EfficientStringsChecker.
Apply fixes for EfficientCollections.
Trivial refactor for consistent naming.
Expand formatSimple() to support widths.
Refinement of EfficientStringsChecker.
The recently-built Error Prone checker has found many instances where
we're always paying the cost of StringBuilder concatenation, even in
the typical cases where preconditions are successfully met.
Benchmarks have shown that even when replacing these with varargs
formatter strings, the default case is 20x faster.
Bug: 170978902
Test: none
Exempt-From-Owner-Approval: trivial refactoring
Change-Id: If8c00bc73467bfb91ec16c162969c9d26ca53646
For devices with multiple internal displays that support
a lid-switch, automatically swap which DisplayDevice is
associated with the default Logical Display.
Test: atest frameworks/base/services/tests/servicestests/src/com/android/server/display
Bug: 130724654
Change-Id: I7280b4f49c0f11df4ecd0f2a1547c95c168265c7
This also makes challenges user-specific, which is fine. Older
HAL interfaces can just ignore the userId parameter.
Test: Enroll, auth on existing devices
Fixes: 170517180
Fixes: 171002801
Change-Id: Ie0fc030476350bc3c35fc28643108ad4d4d3f2ce
Those annotations could be inferred by some tools (like Kotlin), but the
https://checkerframework.org/ doesn't check inherited annotations
complaining about all equals() invocations that get nullable argument.
The change was generated by running
find . -name \*.java | xargs sed -i 's/public boolean equals(Object /public boolean equals(@Nullable Object /'
in the frameworks/base directory and by automatically adding and
formatting required imports if needed. No manual edits.
Bug: 170883422
Test: Annotation change only. Should have not impact.
Exempt-From-Owner-Approval: Mechanical change not specific to any component.
Change-Id: I5eedb571c9d78862115dfdc5dae1cf2a35343580
* changes:
Upgrade AndroidFrameworkBinderIdentity to fatal.
Tighten up Binder.clearCallingIdentity() usage.
Tighten up Binder.clearCallingIdentity() usage.
Tighten up Binder.clearCallingIdentity() usage.
This is a third CL in a chain that adjusts existing malformed code
to follow AndroidFrameworkBinderIdentity best-practices.
Specifically, if a thread clears an identity they need to restore it
to avoid obscure security vulnerabilities. In addition, the relevant
"try" block must start immediately after the identity is cleared to
ensure that its restored if/when any exceptions are thrown.
Bug: 155703208
Test: make
Exempt-From-Owner-Approval: trivial refactoring
Change-Id: I74cb958b68d55a647547aae21baff6ddc364859b
Since injection-related constants are now enum class, use the new
versions here.
Bug: 161009325
Test: presubmit
Change-Id: Icae277f73d693cdc502b70b8299a9763cc276471
Native camera metadata buffers can increase both in size
and count over prolonged periods of camera usage.
Register and track the native buffer allocation in the Java
VM to improve GC.
Bug: 168100424
Bug: 170243539
Test: Camera CTS
Change-Id: I7a10c2f360307a6c1afeecde24dc42184106b872
The feature is disabled by default and can be in one of 3 modes:
disabled, permissive and block. In permissive we only log but
don't block the touch. This knob is implemented in a global setting
block_untrusted_touches. It can also be disabled per occluding app using
app-compat infrastructure, so if you disable for a certain app, overlays
of that app won't have the chance of blocking touches. More details
on these on go/try-cross-uid-touches.
Each window has 3 modes related to touch occlusion: ALLOW, USE_OPACITY
or BLOCK_UNTRUSTRED. Check code comments for the meaning of each. If the
feature is turned off for the app, then the mode is ALLOW. Else if it's
a SAW, then it's USE_OPACITY. Else it's BLOCK_UNTRUSTED. These states
are passed to InputDispatcher, who then perform the proper checks and
blocks or not the touch.
If input dispatcher deems the touch unsafe, depending on the feature
mode, we filter out such touches and log a message to logcat.
I also introduce a global (secure) setting
MAXIMUM_OBSCURING_OPACITY_FOR_TOUCH which represents the maximum
opacity allowed per UID that's obscuring the touch-consuming window
according to some rules, which are discussed in topic CL for
InputDispatcher code. This maximum is initially set to 0.8, but we'll
be conducting local experiments to determine the final value.
Test: atest WindowUntrustedTouchTest
Test: atest inputflinger_tests inputflinger_benchmarks libinput_tests
Test: go/try-cross-uid-touches for manual testing
Bug: 158002302
Change-Id: I462858ad5f0d11b1261748489385e6409e38e4b1
Removing the deprecated AudioAttributes field from VibrationAttributes
in favor of a usage mapping to be used with AppOpsManager.checkAudioOp.
The mapping ensures the heuristic applied in VibrationAttributes.Builder
is taken into account by the VibratorManager.
This also adds a hidden method to Vibrator to allow forwarding a
VibrationAttributes to input device vibrators instead of relying on the
original AudioAttributes.
Bug: 163119475
Test: atest FrameworksServicesTests:VibratorServiceTest
atest FrameworksCoreTests:VibratorTest
Change-Id: I83dbe079865b453c4cf42a6fd7e71f822acc39ea
Parcelables cannot easily become TestApi, since CREATOR, etc
all come as extra baggage. So, rename internal usage to
*SensorPropertiesInternal, and add a new class that exposes
only specific parts of the properties for future TestApi
Bug: 169459906
Test: Enroll, Auth on existing devices
Test: atest com.android.systemui.biometrics
Test: atest com.android.server.biometrics
Change-Id: I59ae6bd30bef0eccbbcb58ddd7fa443be8a42ccf