Commit Graph

19694 Commits

Author SHA1 Message Date
Shawn Lin
cddf907e07 Merge "Fixed test failures of WindowTest" 2022-11-29 03:26:21 +00:00
Shawn Lin
6f7e60ed8c Fixed test failures of WindowTest
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
2022-11-28 08:48:53 +00:00
Michael Wright
1c1d459e04 Add additional pointer state to input dumpsys
Bug: 254277939
Test: manually inspect `dumpsys input`
Change-Id: I3931187638b4c54ff90be9bc3b01a1edc442d49b
2022-11-25 00:22:23 +00:00
TreeHugger Robot
4e1d9153a8 Merge "Don't swallow exceptions" 2022-11-24 00:22:03 +00:00
John Reck
36a47145c6 Don't swallow exceptions
Fixes: 260244068
Test: App in bug crashes with IAE
Change-Id: I358ecf4309d82c609863b7f4d8d3d687b7c51f4b
2022-11-23 21:15:13 +00:00
Zeyin Wu
068c438db5 Merge "Remove redundant constants for content change rate limiting." 2022-11-22 18:31:45 +00:00
Sally Qi
d2fbea3097 Merge "Plumb overlayPropertes into DMS side." 2022-11-22 18:20:49 +00:00
Zeyin Wu
16cc390d7c Remove redundant constants for content change rate limiting.
Bug: 222759137
Test: ran cts test
Change-Id: I559f1a638aca92ee97865e31ad5c557eb3992bad
2022-11-21 20:50:37 +00:00
Zeyin Wu
3f9671444d Merge "Add new APIs for initial accessibility focus setting" 2022-11-21 18:55:16 +00:00
Harry Cutts
fe0d69d064 Merge "Make MotionEvent#obtain with classification public" 2022-11-21 15:41:52 +00:00
TYM Tsai
505ca4454b Merge "Fix prefill request is blocked waiting for an inline request." 2022-11-18 22:04:52 +00:00
Chet Haase
3fe124cd7f Merge "Fix activity leak bug" 2022-11-18 18:55:52 +00:00
Harry Cutts
2a17fe6dc8 Make MotionEvent#obtain with classification public
Bug: 257028305
Test: run presubmits
Change-Id: I53d2925033bb3a51751fcf00fc32cb862062d52c
2022-11-18 14:34:20 +00:00
Jon Eckenrode
706b10d642 Merge "Revised description of the PROPERTY_ACTIVITY_EMBEDDING_ALLOW_SYSTEM_OVERRIDE field." 2022-11-18 13:25:48 +00:00
TreeHugger Robot
0736dfb9f0 Merge "Send HWUI load reset hint when Choreographer registers a callback" 2022-11-18 03:27:19 +00:00
Zeyin Wu
30c9a9f093 Add new APIs for initial accessibility focus setting
Bug: 255189088
Test: ran cts tests
Change-Id: Iaf5f863f22c4263be2cb2687ede566939e630d2b
2022-11-18 00:10:01 +00:00
Ameer Armaly
96f419762b Merge changes from topic "overlay"
* changes:
  Create  display accessibility overlay API.
  Expose SurfacePackage#getSurfaceControl
2022-11-17 22:53:34 +00:00
Jon Eckenrode
0171b771cb Revised description of the PROPERTY_ACTIVITY_EMBEDDING_ALLOW_SYSTEM_OVERRIDE field.
Test: Built API docs
Change-Id: Ib918f95d20ff83cf9368732a6444eda68cd9a174
Signed-off-by: Jon Eckenrode <joneckenrode@google.com>
2022-11-17 21:52:05 +00:00
Matt Buckley
d98e8054f3 Send HWUI load reset hint when Choreographer registers a callback
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
2022-11-17 20:37:08 +00:00
Sally Yuen
2f1ce12336 Merge "Add to AccessibilityEvent#TYPE_ANNOUNCEMENT with suggestion to avoid using it." 2022-11-17 20:08:25 +00:00
TYM Tsai
78bdebcf6a Fix prefill request is blocked waiting for an inline request.
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
2022-11-18 01:13:23 +08:00
Ziqi Chen
52ba9d8c89 Merge "Fix TextAppearanceInfo related APIs" 2022-11-17 14:29:30 +00:00
Sally Yuen
827ae4da93 Add to AccessibilityEvent#TYPE_ANNOUNCEMENT with suggestion to avoid using it.
Bug: 244788390
Test: n/a
Change-Id: I1a9300fb70e0e9b35dd7f1b07686cad00c2ac9a2
2022-11-16 16:31:42 -08:00
Chavi Weingarten
64d5d93bd7 Merge "Remove onSyncComplete from SurfaceSyncGroup" 2022-11-16 14:02:51 +00:00
Cole Faust
22deef8d08 Merge "[conflict] Merge "Fix errorprone warnings that should be errors" am: 677d6cd780 am: f9df26ae3c am: d3c499dabc" 2022-11-16 03:17:38 +00:00
Shawn Lin
e5824fe8b8 Merge "Update the API doc for shortEdge/always cutout flags" 2022-11-16 02:59:35 +00:00
Cole Faust
e4abcbec1d [conflict] Merge "Fix errorprone warnings that should be errors" am: 677d6cd780 am: f9df26ae3c am: d3c499dabc
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2256563

Change-Id: I84d67fdfcc99f9f6fca218d4264ab8e0bc1f1653
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-15 19:47:41 +00:00
Cole Faust
d3c499dabc Merge "Fix errorprone warnings that should be errors" am: 677d6cd780 am: f9df26ae3c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2256563

Change-Id: I8090e254f06a3b5fc7e9b23fdae6c5bd3db230c5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-15 19:37:15 +00:00
Cole Faust
f9df26ae3c Merge "Fix errorprone warnings that should be errors" am: 677d6cd780
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2256563

Change-Id: I0e9c5077610407a117ee34ff688b40b52e161a03
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-15 19:11:55 +00:00
Sally Qi
fed0301271 Plumb overlayPropertes into DMS side.
- 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
2022-11-15 11:08:28 -08:00
Ameer Armaly
9c1649ab86 Expose SurfacePackage#getSurfaceControl
Bug: 238840614
Test: atest AccessibilityOverlayTest
Change-Id: Ibcee5d9aa39af981d8e1dccc59d5c078d51a454e
2022-11-15 16:55:36 +00:00
Chet Haase
4873e34e89 Fix activity leak bug
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
2022-11-15 15:30:58 +00:00
Shawn Lin
613ca984b1 Update the API doc for shortEdge/always cutout flags
Bug: 216065293
Test: make
Change-Id: I80cd9f3377ba27e61f26f74000a656da1489df18
2022-11-15 10:55:36 +00:00
Cole Faust
7da659bb6c Fix errorprone warnings that should be errors
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
2022-11-14 17:57:30 -08:00
Yeabkal Wubshit
d968d45bd4 VelocityTracker API Documentation Improvements
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
2022-11-14 22:16:25 +00:00
Daniel Norman
9650e7a388 Merge "Introduce A11yService#takeScreenshotOfWindow()" 2022-11-14 21:45:11 +00:00
Cosmin Băieș
fc03fbd025 Merge changes from topic "revert-20437706-revert-20313761-IME tracking - hide-HZXGDCCPOZ-XOCVITMXNR"
* changes:
  Revert^2 "Input latency & reliability tracking - hide flow"
  Revert^2 "Input latency & reliability tracking"
2022-11-14 14:36:36 +00:00
TreeHugger Robot
92e8a28c74 Merge "Reduce DPAD navigation logspam with killable IME" 2022-11-14 11:54:42 +00:00
Gaurav Bhola
14fed442be Merge "Add the systemOverlays() method" 2022-11-12 22:50:29 +00:00
Tiger Huang
d548304ed6 Merge "Refine the naming about compatible scale" 2022-11-12 15:05:39 +00:00
Zeyin Wu
f1caff72f0 Merge "Add Accessibility API for rate-limiting CONTENT_CHANGE_TYPE* events" 2022-11-12 03:42:32 +00:00
Daniel Norman
32afd29346 Introduce A11yService#takeScreenshotOfWindow()
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
2022-11-11 18:07:10 +00:00
Cosmin Băieș
44ff0dd9eb Revert^2 "Input latency & reliability tracking - hide flow"
d638a60aae

Test: atest CtsSystemApiSignatureTestCases:android.signature.cts.api.system.SignatureTest#testRuntimeCompatibilityWithCurrentApi
Change-Id: I1ee7224b40fa3f4b744311eb4145fa13a87d835a
2022-11-11 12:22:55 +01:00
Tiger
bcbd60c45c Refine the naming about compatible scale
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
2022-11-11 11:19:06 +00:00
Cosmin Băieș
1619482379 Revert^2 "Input latency & reliability tracking"
1f4fd2d21e

Change-Id: I096456e9cd7449836b373ff392f2e9df58b3e661
2022-11-10 17:53:07 +01:00
Pascal Mütschard
581fdec050 Merge changes from topic "revert-20313761-IME tracking - hide-HZXGDCCPOZ"
* changes:
  Revert "Input latency & reliability tracking"
  Revert "Input latency & reliability tracking - hide flow"
2022-11-10 13:22:35 +00:00
Pascal Mütschard
1f4fd2d21e Revert "Input latency & reliability tracking"
Revert submission 20313761-IME tracking - hide

Bug: b/258637227
Reason for revert: Breaks CtsSystemApiSignatureTestCases android.signature.cts.api.system.SignatureTest#testRuntimeCompatibilityWithCurrentApi
Reverted Changes:
Icf9ab3fc0:Input latency & reliability tracking - hide flow
I1096564d5:Input latency & reliability tracking - hide flow
I14e009250:Input latency & reliability tracking - hide flow
Ic32e36b2d:Input latency & reliability tracking
I56f96dc6b:Input latency & reliability tracking
I73dec2e9e:Input latency & reliability tracking

Change-Id: Ia376a1624fb6abf937eb2a335aa75cb3ca9831d8
2022-11-10 13:11:27 +00:00
Pascal Mütschard
d638a60aae Revert "Input latency & reliability tracking - hide flow"
Revert submission 20313761-IME tracking - hide

Bug: b/258637227
Reason for revert: Breaks CtsSystemApiSignatureTestCases android.signature.cts.api.system.SignatureTest#testRuntimeCompatibilityWithCurrentApi
Reverted Changes:
Icf9ab3fc0:Input latency & reliability tracking - hide flow
I1096564d5:Input latency & reliability tracking - hide flow
I14e009250:Input latency & reliability tracking - hide flow
Ic32e36b2d:Input latency & reliability tracking
I56f96dc6b:Input latency & reliability tracking
I73dec2e9e:Input latency & reliability tracking

Change-Id: I0d0ce41e3a4f0d19ff482c2f5ab4884b5f758134
2022-11-10 13:11:27 +00:00
Cosmin Băieș
36d3884041 Merge changes from topics "IME tracking - hide", "IME tracking"
* changes:
  Input latency & reliability tracking - hide flow
  Input latency & reliability tracking
2022-11-10 10:19:00 +00:00
Lan Wei
54716fa8e3 Merge "Improve javadoc for InputConnection#replaceText" 2022-11-10 04:35:24 +00:00