Commit Graph

19665 Commits

Author SHA1 Message Date
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
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
Gaurav Bhola
367b09cc4a Add the systemOverlays() method
- Also rename GENERIC_OVERLAYS to SYSTEM_OVERLAYS

Bug: 232017511
Fix: 244238266
Test: atest WindowInsetsTests
Change-Id: Ib8455f6ae576c7b3f40789de30649d8fc137e3dd
2022-11-09 18:24:13 +00:00
Shu Chen
caa35d5585 Merge "Adds the new API - InputMethodSubtypeBuilder#setSubtypeNameOverride." 2022-11-09 03:01:12 +00:00
Zeyin Wu
a1c0adb050 Add Accessibility API for rate-limiting CONTENT_CHANGE_TYPE* events
Bug: 222759137
Test: ran cts test
Change-Id: Ia49209d7138bd5bd1026dc18210552b3f359664e
2022-11-09 00:15:57 +00:00
Nikolas Havrikov
f583eb6607 Reduce DPAD navigation logspam with killable IME
On Android TV, when the killable IME feature is enabled, navigating
through the interface using the DPAD buttons on a remote controller
leads to logspam on logcat. This CL takes the feature into account
and lowers the severity of the log message about the input event
not being delivered to the IME when appropriate.

Bug: 258201658
Test: manually on a tv device
Change-Id: I04b85aaf13e1442f070d8dfcff7cf9bd599dac0a
2022-11-08 16:01:06 +00:00
Cosmin Băieș
553cb171de Input latency & reliability tracking - hide flow
Test: filter logcat for ImeTracker tag, open some apps with IME connection (e.g. Dialer, Messaging, etc.) and close the soft keyboard, check that tracking reflects observed behaviour
Change-Id: Icf9ab3fc0f7a7116456c13328d22f8b8428a0c79
2022-11-07 17:49:47 +01:00
Cosmin Băieș
6756327922 Input latency & reliability tracking
Test: filter logcat for ImeTracker tag, open some apps with IME connection (e.g. Dialer, Messaging, etc.), check that tracking reflects observed behaviour
Change-Id: I73dec2e9e2d5f919c7a006828ee0b12a998fc7d9
2022-11-07 17:49:41 +01:00
Zeyin Wu
44c8a5b43b Merge "Add setContainerTitle API" 2022-11-07 16:42:17 +00:00
Tiger Huang
fedf2cf795 Merge "Describe requested visibilities in public types (5/n: consumer)" 2022-11-07 07:15:02 +00:00
Zeyin Wu
bf86a1b0ba Add setContainerTitle API
Test: atest android.view.accessibility.cts.AccessibilityNodeInfoTest
Bug: 191984454
Change-Id: I82874c095aab641257a9735654294a06abac3e45
2022-11-06 22:40:27 +00:00
TreeHugger Robot
657812fb22 Merge "Fix some typos in MotionEvent#obtain JavaDoc" 2022-11-04 20:22:38 +00:00
Taran Singh
48cba7c99a Merge "API for realtime Scribe gesture preview" 2022-11-04 18:12:07 +00:00
Harry Cutts
ab98306d9e Merge "Update JavaDoc for InputDevice touchpad sources" 2022-11-04 15:25:17 +00:00
Harry Cutts
3472c79777 Merge "Add MotionEvent#obtain overload for classification" 2022-11-04 13:17:10 +00:00
Rhed Jao
bedef9c26f Merge "Enforce package visibility rules on switch input method apis" 2022-11-04 10:47:38 +00:00
Rhed Jao
567dafb881 Enforce package visibility rules on switch input method apis
Bug: 227207653
Test: atest InputMethodSubtypeTest
Test: atest InputMethodServiceLifecycleTest
Change-Id: Ib5ba67f708b8ebe12b5120c126022eb84ce720cb
2022-11-04 14:16:34 +08:00
TreeHugger Robot
116f7c93f0 Merge "Avoid to hold a strong reference to Context object" into tm-qpr-dev am: 4f1ceac15e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20357751

Change-Id: I65e394ce848fea42a8bcff44a30167328bd44428
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-04 01:12:40 +00:00
Taran Singh
95baa907de API for realtime Scribe gesture preview
Introduce new API to support gesture preview as user is operating over
text.

Bug: 254726230
Bug: 254727073
Test: InputConnectionEndToEndTest

Change-Id: I6c2ac5a5aaeaeab78411d24870f573670304e898
2022-11-03 18:04:00 +00:00
TreeHugger Robot
78f3bff690 Merge "Remove requestCursorUpdatesFromImm() again" 2022-11-03 17:32:13 +00:00
Harry Cutts
ccaf86da8f Fix some typos in MotionEvent#obtain JavaDoc
This was pointed out by a presubmit on the previous CL for an individual
JavaDoc entry, but let's fix it for all of them.

Bug: 257028305
Test: none
Change-Id: I4d0aaf3c4d0cb53a532d523a9802c1363e637b50
2022-11-03 15:57:05 +00:00
Harry Cutts
2892de61dc Add MotionEvent#obtain overload for classification
Bug: 257028305
Test: atest CtsHardwareTestCases (no new failures)
Change-Id: I3255b01fb136b11f4afecc6db4b26725ca3a36d5
2022-11-03 15:41:18 +00:00
John Reck
ae963f8b4f Merge "Add missing nullability annotations" 2022-11-03 14:29:30 +00:00
Tiger
a4b747496b Describe requested visibilities in public types (5/n: consumer)
This CL removes mRequestedVisible from InsetsSourceConsumer since the
information can be queried from InsetsController.

This CL also stores the public insets type in InsetsSourceConsumer.
Eventually, the internal insets type will be removed.

Bug: 253420890
Bug: 234093736
Test: atest ImeInsetsSourceConsumerTest InsetsAnimationControlImplTest
      InsetsControllerTest InsetsSourceConsumerTest
Change-Id: I8e2070676d2161cc9e8fc28a3dd49cefb362f26c
2022-11-03 16:42:54 +08:00
Lan Wei
947fd9335e Improve javadoc for InputConnection#replaceText
Bug: 254278543
Test: atest FrameworksCoreTests:BaseInputConnectionTest
Test: atest CtsInputMethodTestCases:BaseInputConnectionTest

Change-Id: I3e63532eae8349aaff21cfa72ed65f01779103df
2022-11-03 10:24:29 +08:00
TreeHugger Robot
ebb99da896 Merge "Remove an unused param from IMMS#showInputMethodPickerFromClient()" 2022-11-03 00:16:41 +00:00
TYM Tsai
d5063d26f9 Avoid to hold a strong reference to Context object
We only use parts of Context in the Content Capture manager and
main session, we don't need to cache context object which will
cause some memory issues.

This change will extract the necessary information to save it, instead
of caching the entire context object.

Bug: 256247718
Fixes: 239192932
Test: atest CtsContentCaptureServiceTestCases
Change-Id: Id7b5e8617c521f31879199b0f2c7e18204bb7526
Merged-In: Id7b5e8617c521f31879199b0f2c7e18204bb7526
(cherry picked from commit c3380c162b)
2022-11-02 19:20:27 +00:00
John Reck
3e79a16b56 Add missing nullability annotations
It's never valid to draw to a null Canvas

Test: make
Change-Id: Iaad788cb9e5f1ff2965d2fac23f7ba7a00069b81
2022-11-02 15:18:46 -04:00
Yohei Yukawa
a488ba266c Remove an unused param from IMMS#showInputMethodPickerFromClient()
This is the 2nd attempt to submit this cleanup [1], after a revert [2] due to some build failure.

This is a follow up CL to our previous CL [3], which introduced

  InputMethodManagerService#showInputMethodPickerFromClient(
          @NonNull IInputMethodClient client,
          int auxiliarySubtypeMode, int displayId);

Somehow the "client" has never been used, which is fine because the
actual caller verification is done by requiring WRITE_SECURE_SETTINGS
permission.

Let's remove such an unused parameter for simplicity.

There must be no observable behavior change.

 [1]: I2f27160cbe7d83201c8f52dbb6dcb774a5b8ae43
      3efbbb5e49
 [2]: I343828ad83d50436211004753f1b9ba1b13b60ca
      2fb98cdab1
 [3]: Ic7d7c5a7ad8005a3fbd9d1c1b73e3c5a39a07001
      0b05f9e49d

Bug: 234882948
Bug: 256952514
Test: presubmit
Test: lunch aosp_bramble-userdebug && make -j
Change-Id: Ia536d8793f0022179dfafd1cbf21091537375992
2022-11-02 18:31:56 +00:00