When cutout mode is always/shortEdges and the system window insets are
consumed, the cutout isn't consumed and is inset to an empty cutout
which causes the test failure.
We should also consume cutout when the system window insets contain
cutout and are consumed.
Bug: 253995206
Test: atest WindowTest WindowInsetsTest DecorInsetTests
Change-Id: I8a4fd56675509cc27dfa91de1138458fb1e7b0f0
Send a load reset hint hint to DrawFrameTask through ThreadedRenderer
from ViewRootImpl whenever Choreographer registers a callback. This
allows the PowerHAL to allocate more resources for HWUI in response to
upcoming work, helping prevent frame drop.
Bug: b/243938267
Test: manual
Change-Id: Ie2cf809cf85530af04f4d0db3407853d4da03d62
When asking the IME for an inline request, the IME will check if the
autofill id of the target view matches the id of the current IME served
view, otherwise the IME does not respond inline request to the Autofill.
When an activity starts, the id of the IME served view is reset to 0.
And the target view, Autofill used to do the pre-fill request is the
root view, sometimes its id is not 0. Then the request is blocked to
wait for an inline request because autofill does not have a timeout
mechanism.
To resolve this issue, use AutofillId.NO_AUTOFILL_ID to make sure the
id of the pre-fill request is 0.
Also this change remove the duplicate code about the
notifyViewEnteredLocked for normal view and virtual view.
Bug: 258532947
Bug: 253180120
Test Manual
Test: atest CtsAutoFillServiceTestCases
Change-Id: I6962ab6d844fd8b7c9ba778ac40630586ef73c39
- Implement OverlayProperties JNI class
- Call getOverlaySupport() on Diaplay Manager. Inside, provide
SurfaceControl#getOverlaySupport api to call AIDL function in the back
end.
Bug: 242588489
Test: build and flash
Change-Id: I23819d21063cd191a06d92295af2be9132bfe1df
It is possible for ViewRootImpl.doDie() to be called prior to one of the
other calls which tells the system that the window is going to the
foreground. This race condition can cause an activity leak since the
ViewRootImpl in question is stored in a collection of "requestors" which
determine when to pause/resume animators for background/foreground apps.
The fix is two-fold:
- Only cause an item to be added to the "requestor" list in
AnimationHandler when doDie() has not yet been called (marked by
the mReoved" flag)
- Store the requestor objects as WeakReferences, rather than the objects
themselves. Thus if the requestor list is the only referent to the
object, it can be collected anyway, removing the leak potential.
Bug: 258616235, 258616235
Test: AnimatorLeakTest passes
Change-Id: I7dfebac90aa43f89433f49e0ed60b3ff57bcc497
This commit is part of a large scale change to fix errorprone
errors that have been downgraded to warnings in the android
source tree, so that they can be promoted to errors again.
The full list of changes include the following, but not all
will be present in any one individual commit:
BadAnnotationImplementation
BadShiftAmount
BanJNDI
BoxedPrimitiveEquality
ComparableType
ComplexBooleanConstant
CollectionToArraySafeParameter
ConditionalExpressionNumericPromotion
DangerousLiteralNull
DoubleBraceInitialization
DurationFrom
DurationTemporalUnit
EmptyTopLevelDeclaration
EqualsNull
EqualsReference
FormatString
FromTemporalAccessor
GetClassOnAnnotation
GetClassOnClass
HashtableContains
IdentityBinaryExpression
IdentityHashMapBoxing
InstantTemporalUnit
InvalidTimeZoneID
InvalidZoneId
IsInstanceIncompatibleType
JUnitParameterMethodNotFound
LockOnBoxedPrimitive
MathRoundIntLong
MislabeledAndroidString
MisusedDayOfYear
MissingSuperCall
MisusedWeekYear
ModifyingCollectionWithItself
NoCanIgnoreReturnValueOnClasses
NonRuntimeAnnotation
NullableOnContainingClass
NullTernary
OverridesJavaxInjectableMethod
ParcelableCreator
PeriodFrom
PreconditionsInvalidPlaceholder
ProtoBuilderReturnValueIgnored
ProtoFieldNullComparison
RandomModInteger
RectIntersectReturnValueIgnored
ReturnValueIgnored
SelfAssignment
SelfComparison
SelfEquals
SizeGreaterThanOrEqualsZero
StringBuilderInitWithChar
TreeToString
TryFailThrowable
UnnecessaryCheckNotNull
UnusedCollectionModifiedInPlace
XorPower
See https://errorprone.info/bugpatterns for more
information on the checks.
Bug: 253827323
Test: m RUN_ERROR_PRONE=true javac-check
Change-Id: I8446f9076a45ebf7e7ffa06cb0d4ddb1001b6c00
This CL adds an IntDef for velocity-trackable MotionEvent axes, and
adds/edits documentation to improve clarity to our clients.
Bug: 255643646
Test: N/A doc changes only
Change-Id: Ifebd38eec7ee36524a212562deaea1135eb8aca2
This enables accessibility services to take a screenshot of
a window without any overlay windows drawn on top, which is
beneficial for ML-based understanding of the visual content
in the window.
Bug: 249830826
Test: atest AccessibilityTakeScreenshotTest
Test: use in an a11y service, observe screenshots
contain only content from the requested windows
and no overlays
Change-Id: Ic886aeace9cb2984a472273858281b4f2c3a0e46
There can be 2 reasons that we need to apply compatible scale to a
window:
1. The app doesn't support large screen. We would layout the window as
if it is on a small display. And then we need to scale its window up
to match the display.
2. We put a running app into a container that the size doesn't fit. We
need to down-scale the app so that it can fit the container.
The scaling of case 2 is also known as size-compat-scale which is fully
controlled at the server side. The client shouldn't know about it. And
this CL refines the naming.
Fix: 258393096
Bug: 254187021
Test: presubmit
Change-Id: Ifbd2ca725bed231d9e6dd8190df3dc773d4402b7