Now we are putting a TextClassification object in TextSelection.
So we need to have the same rewrite logic.
Bug: 173512834
Test: atest TextSelectionTest + added CTS.
Change-Id: Ia1939053ec8ec0163e592b89d7b96d95eda9b4f0
There are some checks before attempting to draw in VRI. If we get a
blast sync relayout, but aren't going to draw, unset
mNextDrawUseBlastSync. Otherwise, we end up blocking indefinitely.
There would never be a draw callback so we would never unset that flag.
If there are no pending draws, report back immediately so we don't block
WMS since it could be waiting on the app to draw.
Test: enable shell transitions, unlock device
Bug: 175229445
Change-Id: I8e1f524862e2b9a48949cf6846141d67129c507c
For devices that are not Android TV devices and not connected to a TV via HDMI, KEYCODE_TV_POWER is ignored.
For the following Android TV devices, KEYCODE_TV_POWER is an alias of KEYCODE_POWER:
- Devices that don't support HDMI
- HDMI TV panel devices
- HDMI devices with POWER_CONTROL_MODE set to NONE
- HDMI devices with CEC control disabled
For all other HDMI devices, KEYCODE_TV_POWER is forwarded to the HDMI stack by calling toggleAndFollowTvPower(). For HDMI source devices, this results in
1. Toggling of the HDMI-connected TV power state over HDMI-CEC
2. The source device following the TV power state
Bug: 157402294
Test: adb shell input keyevent KEYCODE_TV_POWER, manually verified TV power toggle behavior on ADT3
Change-Id: I59cd3f2a5c2b7a551176ab40ef9c559ad502a974
This helps us to debug.
Bug: 175954493
Test: Locally make leashes invalid and check the log format.
Change-Id: Idcde497ffee1f10a4289520e154aa8b39eed1f78
Add API to set IME will temporarily consumes the input, for
this case, the cursor will be invisible in the app.
Bug: 175362887
Test: atest FrameworksCoreTests:TextViewTest
Test: atest CtsWidgetTestCases:TextViewTest
Change-Id: Ic04cacfd73f1f4cb254bb16caf6b04c00c91a318
Sends the "trigger" taskinfo associated with a transition when
applicable. This can be used by the transitionplayer to make
decisions about how to start and play transitions.
Additionally, TaskInfo is provided in each Change object if
they are tasks. This provides all the information needed to
choose how to handle split.
Shell's transitionplayer makes use of this to add support for
"handlers" to deal with specific transition requests. Currently
a single handler is added to process split-screen transitions.
Bug: 169035082
Test: Use split-screen (enter, exit via swipe up/down,
exit via dismiss top)
Change-Id: I53a03dd85cb260505e66d5d87a34afa4ab1f8cc8
* This does not inhibit the grouping behavior which demotes this image and shows it in a smaller square area on the left.
* This also converts the Notification class to calculate margins and sizes in DIP instead of PX, as that is more resilient.
Fixes: 175409684
Test: atest NotificationTemplateTest
Change-Id: I35d28c8df341dbbac2774026c6ca749e296c0482
This reverts the autofill API changes made in ag/9884022 (only the
autofill-related changes in that CL, not the rest). This is because
non-text content in autofill is now handled via a separate code path
rather than via an autofill type (the new pipe for rich content was
added in ag/12642608).
Bug: 168837034
Test: Manual (image suggestions in augmented autofill)
Test: atest FrameworksCoreTests:AutofillValueTest
Test: atest CtsWidgetTestCases:TextViewOnReceiveContentTest
Change-Id: I261148646d21474ea10662a3e6a5d8b0ba6708f4
Enable buffers to go through BLASTBufferQueue
in SurfaceView.
Bug: 168917217
Test: atest SurfaceViewBufferTests & manual tests see bug for history
Change-Id: I4636f51531b35208fb2f10334876d5e65b0bb364
* Only regular view's viewnode info is produced. Virtual view is not
support yet, for efficiency reasons.
Test: manual
Test: atest android.autofillservice.cts.inline
Test: atest android.autofillservice.cts.augmented
Bug: 141703532
Change-Id: Ib9aa75ebf8504d674513bd0e6528460ba9db2c34
Make sure the appearance or the behavior controlled by the new APIs
won't be affected by setting new LayoutParams.
This CL also makes ViewRootImpl#setLayoutParams won't modify the
caller's LayoutParams.
Fix: 175169461
Test: atest ViewRootImplTest
Change-Id: I4cdd846e8638f9813146e6461134e4dd1606bd50
Currently, ViewRootImpl drops events for several reasons. However, just
one reason is written to the log: "dropping event because the window
does not have focus".
But even if the window has focus, the event can be dropped.
Improve the logging by refactoring the "if" check inside ViewRootImpl
Test: atest ViewRootImplTest
Bug: 173675649
Change-Id: I2ba8270ba09dea63e6497bc830af4c704ada52ef
Since SurfaceView no longer enables blast sync transactions, a lot of
the code is no longer needed.
BlastSync is only set when ViewRootImpl calls relayout that returns the
blast sync flag. This means, we are guaranteed to pause the UI thread
since we don't want to allow overlapping relayouts. Because of this, we
can remove a lot of the complex code and variables.
1. We no longer need both mSendNextFrameToWm and
mNextDrawUseBLASTSyncTransaction. This is because if mSendNextFrameToWm
is true, we will pause the traverse and never set
mNextDrawUseBLASTSyncTransaction until mSendNextFrameToWm is set to
false.
2. Similarly, we don't need mRtNextFrameReportedConsumeWithBlast. This
was added to help with overlapping requests. Since that's no longer
possible, we can just remove this and use mSendNextFrameToWm as the
check
3. We also don't have to be thread safe with mRtBLASTSyncTransaction
since we only update it when the UI thread is paused.
4. We no longer need to call setNextTransaction with null since that was
only when SurfaceView was calling useBlastSyncTransaction and the main
window wasn't drawing. That no longer happens and we are guaranteed
that setNextTransaction is only set when a relayout occurs.
Test: Enable blast sync and use split/pip
Bug: 175229445
Change-Id: I0bebd15804ea3b960e85c20235ae5ce98bcc3f00
This change adds the default brightness to the ddc, and a fallback to
config.xml when the ddc doesn't exist.
It adds the minimum and maximum brightness constrtaints to the display
device config - which are currently sourced from config.xml.
Bug: 147415200
Test: manual
Change-Id: Ibbfbbbd495048114befb3f867bd5f4e26916ca9e
Since the display cutout is a type of insets and the display cutout can
be obtained from WindowInsets, it makes sense that InsetsState has the
display cutout instance. In this way, we can send the display cutout to
client via W#insetsChanged instead of W#resized.
This can be a step to remove the class of ClientWindowFrames, and can
also be a step to make client compute its window frame locally.
Fix: 175858810
Bug: 161810301
Test: atest WindowAddRemovePerfTest ImeInsetsSourceConsumerTest
InsetsControllerTest InsetsStateTest ViewRootImplTest
WindowInsetsControllerTests ActivityRecordTests
DisplayPolicyLayoutTests LaunchParamsControllerTests
TaskSnapshotSurfaceTest WindowMetricsActivityTests
WindowMetricsWindowContextTests WindowMetricsTest
WindowFrameTests WindowStateTests WmDisplayCutoutTest
Change-Id: I9a930b1d2f7df3cea2b29629b767a4a5f31bca17
The blur code in ViewRootImpl had a few issues
1. The transaction was applied or merged in frameCompleteCallback. This
is too late since the frame could have already been sent to
SurfaceFlinger and possibly latched already. We need to make sure we
apply or merge the transaction before latching. Therefore, moved the
blur request code into the frameCallback, which is invoked before the
buffers are swapped.
2. The blur code was using the blast sync transaction. This means the
blur would only get applied if a request to sync transactions was
called, which isn't very often. Instead, use mergeWithNextTransaction
which will send the transaction to the BBQ. The BBQ will either apply
it when the buffers are swapped or merge with a pending transaction that
is applied later to work with blast sync. This ensures the transaction
is synchronized with the correct frame
Test: manual
Bug: 174145445
Change-Id: Id36719c03f18739513e3198602c8a7ec4fd8da69
ag/12396996 introduces mInputToken, but it's only added to parcel
reading. It has thus caused a bug (parcel reading misalignment) in
the Wallpaper app as in our preview feature we passes a
SurfacePackage over from Launcher.
Test: manual
Fixes: 176248059
Change-Id: Ife46d6d67991964d63513c946318cffbaf4ffae9
Currently SV with blast sync requests a sync transaction from VRI and
merges its transactions with VRI's sync transaction. This can break if
we are not able to set the request in time.
Instead this change will merge SV transaction from the renderthread to
the VRI BlastBufferQueue specifying the framenumber which the
transaction should be merged with. The transaction will be queued until
we submit a VRI buffer with the requested frame number.
Test: open bubbles with sv blast
Test: atest SurfaceViewSyncTest
Bug: 175594838
Change-Id: I87ba346d782f615bab2e8a692adb2b3c49ef4021
- Add hasImeWindowSurface in TaskSnapShot
- Add InsetsSourceControl#getAndClearSkipAnimationOnce for skiping
IME showing animation once when starting window with IME surface
Bug: 166736352
Bug: 153145997
Test: manual as below steps
0) Enabling developer options -> Quick settings developer tiles ->
Window animation scale to slow down transition animation.
1) Launch an app with focusing an editor to show soft-input
2) Swipe out app task to back to launcher
3) Using quick switch or taping shortcut to bring back the app task
4) Verify that should be no IME showing animation happens during
task transition.
Change-Id: I83ffc03119e01da71ad12f8ad8043cf0730dfd50
1. Create InputMethodInfoList result callback and apply it to :
-. getInputMethodList
-. getEnabledInputMethodList
2. Apply IntResultCallback to getInputMethodWindowVisibleHeight
Bug: 163453493
Test: Manual test with keyboard
Test: atest CtsInputMethodTestCases
Change-Id: Iaa63e01453da4ff0e3f446eac036b3be3180cb73
Create InputMethodSubtype and InputMethodSubtypeList
result callback and apply it to :
-. getLastInputMethodSubtype
-. getCurrentInputMethodSubtype
-. getEnabledInputMethodSubtypeList
Bug: 163453493
Test: Manual test with keyboard
Test: atest CtsInputMethodTestCases
Change-Id: I646ef4ae0570aae1812ea267f309441fdec6938d