Commit Graph

13935 Commits

Author SHA1 Message Date
TreeHugger Robot
368e62fbf9 Merge "Always get window insets from server" 2020-02-14 03:22:32 +00:00
Jackal Guo
4e2e8a3e6e Merge "Support accessibility on embedded hierarchies (3/n)" 2020-02-14 01:51:30 +00:00
TreeHugger Robot
5de200eb17 Merge "Added OWNERS file for inputmethod" 2020-02-13 22:36:46 +00:00
Wale Ogunwale
ecf66058ea Added OWNERS file for inputmethod
Bug: N/A
Test: N/A
Change-Id: I0dd7bad55dec4f2332d7819d4ccb1e0da7a2d9b7
2020-02-13 13:14:24 -08:00
Derek Sollenberger
f5273a6bd9 Merge "Remove unnecessary UnsupportedAppUsage annotation" 2020-02-13 20:23:56 +00:00
Jorim Jaggi
29aa0e81ae Merge "Abort dispatching animation callbacks if the root view is gone" 2020-02-13 18:19:54 +00:00
Tiger Huang
f0ef89a522 Abort dispatching animation callbacks if the root view is gone
This CL prevents possible NullPointerExceptions.

Bug: 118118435
Bug: 149479853
Test: atest AnimatedVectorDrawableParameterizedTest
Change-Id: I966a15c0886b80317a34541fb315b2886981af16
2020-02-13 18:19:38 +00:00
Derek Sollenberger
6103f4363e Remove unnecessary UnsupportedAppUsage annotation
These annotations were part of the initial bulk assignment of
annotations, but do not have any active usage. Further, the
start() method is not annotated so there is no clear way for
applications to trigger any meaningful behavior.

Bug: 149293249
Test: built and surveyed for potential API usage
Change-Id: I4118d6d54562079c3c4e4a83fd0e40b50cb08434
2020-02-13 10:57:54 -05:00
Wale Ogunwale
595316bb20 Merge "Revert "Revert "Revert "Enable insets flag for IME"""" 2020-02-13 13:18:56 +00:00
Wale Ogunwale
13c9a90696 Revert "Revert "Revert "Enable insets flag for IME"""
This reverts commit 925c658631.

Reason for revert: Causing WindowManager pre-submits to fail.

Change-Id: I11dfc87e7fb2741b237688865eeefbd9e29dc981
2020-02-13 13:17:45 +00:00
Jackal Guo
ac234d6608 Support accessibility on embedded hierarchies (3/n)
Link embedded hierarchy for accessibility when #setChildSurfacePackage
is invoked.

Bug: 137593247
Test: a11y CTS & unit tests
Change-Id: I6e9cfb387c863314b0affc5b48fb3c4c62cdf950
2020-02-13 13:45:17 +08:00
Siarhei Vishniakou
b0f1fe887a Merge "New VerifiedInputEvent api" 2020-02-12 22:55:00 +00:00
Taran Singh
31af9f3ea6 Merge "Revert "Revert "Enable insets flag for IME""" 2020-02-12 21:24:24 +00:00
Taran Singh
925c658631 Revert "Revert "Enable insets flag for IME""
This reverts commit d01913ae83.

Reason for revert: We're ready to re-enable the flag since b/149121559 is fixed

Change-Id: I1aca81bb6c2dbb544841a2a6d17ef477cb8bdc9e
2020-02-12 19:07:46 +00:00
TreeHugger Robot
806bb8bb38 Merge "Apply Insets animation when hw acceleration unavailable" 2020-02-12 10:02:29 +00:00
Shawn Lin
328e659c2d Merge "Make SHORT_EDGES mode only extends on the short edges" 2020-02-12 06:09:19 +00:00
shawnlin
465b7dea75 Make SHORT_EDGES mode only extends on the short edges
- In R, we allow long edge cutouts and therefore a new ALWAYS flag is
added which allow apps to be laid out in all edges. So now we have to
ensure apps with SHORT_EDGES mode to be laid out only in short edges.

- Set wallpapaer window to ALWAYS mode

Bug: 146876976
Test: atest DisplayPolicyLayoutTests
Test: atest WallpaperTests
Change-Id: Iaf820b5c8105927e61b30d389a659b9d28db3f94
2020-02-12 11:26:44 +08:00
Charles Chen
3e857ec536 Always get window insets from server
The previous implementation of computeWindowInsets is to
use last view from WM#addView, which may be invalid because
the last added view is removed and throws NPE when getting
property from the invalid view.
In this CL, we change the approach to always obtain window
insets from server.

fixes: 148789183
Test: atest FrameworksCoreTests:WindowMetricsTest
Test: atest WindowMetricsTests

Change-Id: Ic5512c31f86c597d99e13d29df654d3f527d6b55
2020-02-12 11:09:25 +08:00
Adrian Roos
e8d7ecdbb1 Merge "Insets Animation: Add CancellationSignal to controlWindowInsetsAnimation" 2020-02-12 02:45:41 +00:00
Tarandeep Singh
7eb2bed224 Apply Insets animation when hw acceleration unavailable
On certain midrange and lower-specced devices, apps could be running
without hardware acceleration. Insets animation relied on ThreadRenderer's
frame-by-frame callbacks to animate system bars / IME.
When hardware acceleration is not available, we should just animate it
without any frame sync for now.

Bug: 111084606
Bug: 149342281
Test: Manually tested on Go device
     1. Use app like Messages which don't have hw accelaration
     2. Tap on editor to verify IME appears.

Change-Id: Icf453f09f4236a5092cf3ff7be99f98ece073979
2020-02-11 17:35:22 -08:00
Adrian Roos
3406fb97f4 Insets Animation: Add CancellationSignal to controlWindowInsetsAnimation
Fixes an API deficiency where the request to control the animation
could not be cancelled until it has succeeded (or failed). To address that,
we return a CancellationSignal.

Bug: 143556682
Test: make checkapi; atest InsetsControllerTest
Change-Id: I03d1bcc7013c10d2deac7b1059b99894b7103230
2020-02-11 14:50:22 -08:00
TreeHugger Robot
715aa7add9 Merge "Query for BLAST flag outside of constructor" 2020-02-11 22:07:22 +00:00
Valerie Hau
bdb905a691 Query for BLAST flag outside of constructor
WindowManagerGlobal should query for flag only when the service has
successfully been retrieved.  Moving query into block where
sWindowManagerService is initalized

Bug: 149243163
Test: build, boot, adb shell device_config put
window_manager_native_boot wm_use_blast_adapter true/false

Change-Id: I864d60158236059fda9844844b07299bb97ee6d1
2020-02-10 17:19:10 -08:00
Jackal Guo
a459b199c1 Support accessibility on embedded hierarchies (2/n)
Introduce AccessibilityEmbeddedConnection. This interface provides
to the host view to the latter can interact with the view hierarchy
in SurfaceControlViewHost.

Bug: 137593247
Test: a11y CTS & unit tests
Change-Id: I9c4f5478c5ecd3bda7f688fa23660f372b59512b
2020-02-11 08:56:10 +08:00
TreeHugger Robot
4b5b834e13 Merge "Fix memory leak in TCMS when TCSession.destroy() is not called." 2020-02-10 22:20:30 +00:00
Siarhei Vishniakou
cf07528a0e New VerifiedInputEvent api
The Verified{Input/Key/Motion}Event api are the same as
{Input/Key/Motion}Event api.
The VerifiedMotion class is the same as the MotionEvent class, but
contains less information. It only contains the information that the
system is able to verify.
Same applies to VerifiedKeyEvent.

The class VerifiedInputEvent contains common information applicable to
both Key and Motion.

Test: atest VerifiedKeyEventTest VerifiedMotionEventTest
Bug: 134977432
Change-Id: I4770104eb4c025263da7efeea9c7a658dff74ac9
2020-02-10 13:43:55 -08:00
Valerie Hau
4345673369 Merge "Move BLAST flag to WindowManagerService" 2020-02-10 20:13:42 +00:00
Jorim Jaggi
6043739952 Merge "Refine logic about controlling transient bars" 2020-02-10 19:51:32 +00:00
Steven Thomas
890e80dbd1 Merge "Fix IllegalArgumentException from Surface.release()" 2020-02-10 19:11:08 +00:00
TreeHugger Robot
d0db68c890 Merge "To add new marker to support long edge cutout" 2020-02-10 06:53:49 +00:00
Charles Chen
40eb219600 Merge "Fix AccessibilityInputFilterTest" 2020-02-10 02:12:48 +00:00
TreeHugger Robot
4b41675b13 Merge "Refine surrounding text logic and test case readability." 2020-02-10 02:07:19 +00:00
Greg Kaiser
498fded002 Merge "Revert "Enable insets flag for IME"" 2020-02-08 02:12:56 +00:00
TreeHugger Robot
fef7f67173 Merge "Remove an obsolete comment" 2020-02-08 01:21:25 +00:00
Greg Kaiser
d01913ae83 Revert "Enable insets flag for IME"
This reverts commit 1f0b27532f.

Reason for revert: Crashes android.anim on a wembley
Bug: 149121559
Test: Local build of wembley with this reverted doesn't crash android.anim.

Change-Id: Ie2b9ce95114082d07fa6fddd1ec6d0cb345bd860
2020-02-08 00:24:10 +00:00
Valerie Hau
779af293d4 Move BLAST flag to WindowManagerService
Querying flag property in preloaded class static initialization
removes it from preloading and increases boot time.  Move query
to WindowManagerService instead when constructed

Bug: 148614188
Test: build, boot, adb shell device_config put
window_manager_native_boot wm_use_blast_adapter true/false
check that BLAST adapter is turned on/off as expected

Change-Id: I02e2327b5c2cb11a231d02fc2c5c8c1ac200aaf0
2020-02-07 16:06:03 -08:00
Steven Thomas
408dc961c4 Fix IllegalArgumentException from Surface.release()
ag/9659388 introduced a problem where calling Surface.release() would
possibly result in an IllegalArgumentException. Fix the order of
deletions in release() to avoid this.

Bug: 144862317
Test: Ran a cts test that was failing with the exception, confirmed it
      no longer fails with this CL in place.

Change-Id: Ib3fa67d49457aee304512642afe34ed6a887e6eb
2020-02-07 15:30:10 -08:00
Yabin Huang
5b2fe96610 Merge "Fix View backward navigation bug" 2020-02-07 23:08:38 +00:00
Yohei Yukawa
fbb017ac10 Remove an obsolete comment
This is a follow up CL to our previous CL [1], where we forgot to
remove an obsolete comment, which was dded in our previous attempt to
tackle IME focus handling in InputMethodManager [2].  As the line
mentioned in that CL is now gone, there is no reason to keep that
stale comment.

There should be no behavior change in this CL.

 [1]: Ib455704fe1e9d243f93190a84f230210dbceac2a
      970d9d2e0c
 [2]: I219394178e4172bc47864297f1418e677dba25e5
      5f05965f54

Bug: 141738570
Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Change-Id: Iee92a7eb4dfcfb059b0e1fc105f78dd9bdecbbfc
2020-02-07 14:24:09 -08:00
Evan Rosky
a85b3f1828 Merge "Add hierarchy operations to container transaction" 2020-02-07 19:19:12 +00:00
TreeHugger Robot
7f6598257e Merge "Enable insets flag for IME" 2020-02-07 19:10:16 +00:00
TreeHugger Robot
cceb2c2e61 Merge "Send autofill assist structure data to content capture" 2020-02-07 18:41:58 +00:00
Mihir Patel
4770be2d60 Send autofill assist structure data to content capture
Test: manual
Change-Id: I23339a8f90dbb6c31f473e6163ba0866518cb0a4
Bug: 147232107
2020-02-07 10:40:15 -08:00
TreeHugger Robot
aab0c36259 Merge "Providing new accessibilityNode action" 2020-02-07 17:31:57 +00:00
Tarandeep Singh
1f0b27532f Enable insets flag for IME
Test: atest CtsInputMethodTestCases WindowManagerSmokeTest
      CtsWindowManagerDeviceTestCases CtsInputMethodTestCases
      FrameworksCoreTests
Bug: 111084606
Change-Id: I34b17174cc57fdb1427749dc28664f6bb5b3abca
2020-02-07 08:46:06 -08:00
Tony Mak
53195e0da7 Fix memory leak in TCMS when TCSession.destroy() is not called.
TCMS stores sessions in a Map and remove it when the session is
destroyed. Memory leak happens if the client forget to call
TCSession.destroy() or does not have a chance to call before the process
is dead.

Solution:
1. Use linkToDeath() to remove the cached session when client process
   is dead. TCSessionID now contains a binder to make this possible.
2. Install a Cleaner to TCSession object such that destroy() is called
   whenever the session object is going to be GCed. This is needed
   because some clients may have a long lifecycle, e.g. apps that are
   bounded by system.

BUG:149012454

Test: Write an app that creates a TC session, but not calling destory().
      Then make sure TCMS removed the session in the following situations:
      1. The app is killed
      2. TCSession object is GCed (By forcing GC)
      By checking the output dumpsys textclassificataion, we can know
      that the session object is removed
Test: mts-tradefed run mts-extservices
Test: Sanity test: smart selection + smart replies

Change-Id: Ifb7dcb23e1f50d4b3e97a6ce40e63b57193f2892
2020-02-07 11:54:26 +00:00
Chris.CC Lee
4de5306e7e Refine surrounding text logic and test case readability.
1. Follow up refinement for CL[1].
2. Test case to verify the InitialSurroundingText parcel
wrapping/unwrapping logic.

[1] c486acc4d2, Ie04f2349b1157408aa8ed9044aea12ce99132cb4

Bug: 148035211
Test: atest FrameworksCoreTests:EditorInfoTest
Change-Id: I9609b8a7dabb6285ed673cb0890bb3019e3b7caa
2020-02-07 19:15:40 +08:00
Tiger Huang
a166340304 Refine logic about controlling transient bars
- Use copied InsetsSourceControl to prevent the leash from being
  released while the control gets revoked while playing transient
  bar animations.
- Start the animation after mAnimationControl gets assigned to prevent
  NullPointerException.
- Let SystemUI to change the bar mode to transient mode before WM
  plays the transient bar animation.
- Remove a redundunt call to the super method.
- Fix InsetsPolicyTest
- Fix InsetsStateControllerTest
- Fix misc things

Bug: 118118435
Test: Manually swipe to show transient bars many times.
Test: atest InsetsSourceProviderTest InsetsStateControllerTest
            InsetsPolicyTest WindowStateTests CommandQueueTest
            RegisterStatusBarResultTest InsetsFlagsTest
            LightBarControllerTest RegisterStatusBarResultTest
            ViewRootImplTest DisplayPolicyInsetsTests
            DisplayPolicyTests TaskSnapshotSurfaceTest
            InsetsAnimationControlImplTest
Change-Id: I7d445b7dc6f47a64048937cd439bdd5ffa7fa3a3
2020-02-07 18:19:21 +08:00
Felka Chang
489cf260aa To add new marker to support long edge cutout
Currently, the cutout only exists in short edge of a display. It means
that the cutout only locates in short edge of the display in portrait
mode. The method to parse the cutout only supports top boundary or bottom
boundary cutout.

To modify the parser of cutout specification supports the long edge cutout
feature. CutoutSpecification handles the parsing rulers extracted from
DisplayCutout.

In order to make parsing faster, it doesn't use regular expression to parse
specification and String.split.

Test: atest \
    FrameworksCoreTests:android.view.DisplayCutoutTest \
    FrameworksCoreTests:android.view.CutoutSpecificationTest \
    SystemUITests:com.android.systemui.ScreenDecorationsTest \
    CorePerfTests:android.view.CutoutSpecificationBenchmark

Bug: 146875639
Change-Id: Ice3ad28ef29a6f11875c4946cf4a60ee792f1270
2020-02-07 16:30:05 +08:00
Charles Chen
4741084716 Fix AccessibilityInputFilterTest
The root cause is that we use WM#getCurrentMetrics(New API) instead of
Display#getSize in ViewConfiguration .
However, we use a stub display in AccessibilityInputFilterTest, which
don't have a corresponding DisplayContent in WMS.
Use getDisplayContentOrCreate to create a DisplayContent if it is not
yet created, and throws exception if display object is invalid.

fixes: 148823816
Test: atest AccessibilityInputFilterTest
Test: atest WindowMetricsTests

Change-Id: I36c6b020faafebbf609a46dfdeb0c9580e115e01
2020-02-07 16:16:48 +08:00