Tunnel through SurfaceControl to determine whether the HWC has this
capability. This allows clients (i.e. SystemUI) to know whether they can
use Composition.DISPLAY_DECORATON. If so, they may want to render
differently (i.e. in A8). See Ib948c38ee189877eda675a6342cb70099f66122b
for an example.
Bug: 193170859
Test: manual
Test: TODO
Change-Id: I9904452b6408199bb1f86de9e21132e4d4444e1a
Manually migrate the few cases of:
* readArray()
* readParcelableArray()
To the new parcel APIs that take the expected type as the last
parameter. This enhances security because it prevents unexpected types
*before* running unparcelling code. More details at go/safer-parcel.
Owners, please check that the type of the objects expected is always a
subtype of the type provided as the 3rd parameter. This is usually easy
to verify due to casts that happen shortly after.
These changes often allowed further transformations but I decided to
avoid them to keep this change small and targeted.
This was manual since it's tricky to get lint to infer the type in
those cases and it was only a few.
Bug: 195622897
Test: TH passes
Change-Id: I262ed7cd6d3bc15b32e9296e88a8a67fdb59e880
We are no longer logging this information, so this constant / bug number
can be deleted.
Bug: 157929241
Test: none
Change-Id: I6238737fe101415a87b231208fd99a388deb82fc
This applies the same request/cancel mechanism as commit bdd477a5d1.
Refactor the scheduler into smaller components and add missing test coverage.
Fix: 210090299
Bug: 208303000
Test: atest UserAwareBiometricSchedulerTest BiometricSchedulerTest BiometricSchedulerOperationTest SensorTest Face10Test
Test: manual (enroll and quickly tap "add another" and then "do it later")
Change-Id: I0c7e4006e6ac6e6c3dc115046fa80d9e60f4bd95
Bug: 152453213
Tag: #refactor
This commit prepares PropertyInvalidatedCache to function as a system
api. Specifically, the methods recompute() and bypass() which may be
overridden by clients are now public (instead of protected). This
forces an update to all existing clients, to accommodate the change in
method visibility.
Two small changes have been made as cleanup:
1. The awkwardly named debugCompareQueryResults() is now
resultEquals(), which is more or less consistent with how other
equality tests are named in Android. This name change affects two
clients.
2. PackageManager has changed to use resultEquals() instead of
maybeCheckConsistency(). This provides a simpler and more
consistent use of the APIs. maybeCheckConsistency() has been made
private.
Test: atest PropertyInvalidatedCacheTests
Change-Id: I4110f8e887a4fd8c784141e8892557a9d1b80a94
It might cause deadlock sometimes:
The locking order of setEventsMask is:
registerDisplayListener -> <DMG.mLock> -> setEventsMask -> <class lock>;
The Locking order of handleMessage is:
Looper.loop -> Looper.loopOnce -> Handler.dispatchMessage -> handleMessage -> <class lock>;
Therefore, when the registerDisplayListener is called by client,
the DisplayListenerDelegate.handleMessage also called by DMS's callback,
at this time, if the method with DMG.mLock is called in handleMessage(),
it will lead to deadlock.
Test: (For example)
Thread A:
DisplayListenerDelegate.handleMessage() -> <class lock>
DisplayListener.onDisplayChanged() -> DMG.getCompatibleDisplay() ->
DMG.getDisplayInfo() -> <DMS.mLock>
Thead B:
DMG.registerDisplayListener() -> <DMS.mLock> -> DisplayListenerDelegate.setEventsMask() -> <class lock>
Signed-off-by: jiayongqiang <jiayongqiang@xiaomi.com>
Change-Id: Ie1a8728339c16fa8f4c4f5c758821c836fa1c96b
Modern video encoders rely on GPU for some of their preprocessing, so video
encoder buffers will be allocated with GPU usage set.
Bug: 193772557
Bug: 204504047
Change-Id: I84b60fdd3f9d511b39185c1a31799f2b1514e166
Unless we are looking at stack traces (e.g. from strict mode) it's not
possible to identify which type of object is not being closed (most
methods are 'close' or 'release). Change the logged text to clarify.
Change-Id: Ib90eac716f43c2c2caf8d8c6fb64a7bd90562da9
Test: manual
This CL will add new api to cancel current touch when fold transition
started.
Bug: 203549969
Test: manual
Change-Id: Id03fbeb05014dcb9f99901c36db1a88cbe110880
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
Test: TH passes
Change-Id: I11a27b9bdab7959ee86e90aa1e1cbebd7aaf883c
This change contains below new public APIs:
1. Change the torch strength level.
2. Get the torch brightness level.
3. Callback when torch strength level is changed.
Bug: 200174275
Test: atest -c cts/tests/camera on aosp_cf_x86_64_phone-userdebug
Change-Id: I8b2d3a7dd9114986d3171832744a3dd6db092a48
Bug: 201045056
Test: Verified that BiometricPrompt shows an error message if the user
is using face authentication and camera privacy is enabled.
Change-Id: Idc2140062c4aa87e0bcffb14e07336dc6cd7d955
The JPEG size override is done only when the
android.os.Build.VERSION_CDOES.MEDIA_PERFORMANCE_CLASS is set to
31 or larger, and not necessarily for every MPC13 devices.
Bug: 209622756
Test: Build
Change-Id: I4d76db1780e0d777e8da68a06829ce0e424905d5
If the camera privacy sensor is enabled, show an error message
on Keyguard.
Test: Verified that the sensor privacy error is shown when privacy sensor is enabled.
Bug: 201045056
Change-Id: Ib7709596d378caa690a782294197a5b26e55857f