Commit Graph

13513 Commits

Author SHA1 Message Date
TreeHugger Robot
97c8746c2d Merge "Adding shell command to dump view hierarchies of all visible windows" 2019-11-15 18:19:12 +00:00
TreeHugger Robot
7abb91a9c3 Merge "Skip deleteSurroundingText when there is an invalid selection" 2019-11-15 09:14:58 +00:00
lumark
bf3ce30a69 Skip deleteSurroundingText when there is an invalid selection
Since InputConnection#deleteSurroundingText the design is to delete the
text before the selection start and after the selection end range,

it would be possible that the exception may happened when the obsolete
selection range which is not aligned with the current text content.

Add a check to make sure the text will be deleted when the number of
text before / selection the selection is > 0.

Also, skip the delection when the selection is not yet attached

Bug: 130979263
Test: atest BaseInputConnectionTest
Change-Id: I93b69b71531bcab4ae204c1c1287b8fbe0224ea8
2019-11-15 11:59:15 +08:00
TreeHugger Robot
d0c0dd1129 Merge "Delete invalid legacy code." 2019-11-15 02:40:37 +00:00
Taran Singh
a784fc40eb Merge "Freeup lock when IME is set inactive and unbound" 2019-11-15 01:46:17 +00:00
John Reck
6572dcfaa0 Merge "Revert "Be less slow"" 2019-11-14 23:38:54 +00:00
Hongming Jin
94aedad77c Delete invalid legacy code.
Bug: 136286274
Test: n/a
Change-Id: I3b079a638afb9a469510f9b72c5ea471d2ef430d
2019-11-14 23:20:25 +00:00
Tarandeep Singh
322ee9bf9e Freeup lock when IME is set inactive and unbound
Any pending windowGainedFocus future should be cancelled when IME is
switched/unbound.
Additinally, startInputInner() inside synchronized block blocked
WINDOW_FOCUS_GAIN from executing. Its fine to remove synchronization
here since startInputInner() already has relevant synchronized blocks.

Change-Id: I98cb044d8cbfb80480312a3923f168aefa9b7e7d
Fix: 144103599
Bug: 139806621
Test: Manually using the steps in bug.
2019-11-14 11:12:23 -08:00
Chiawei Wang
532431d1b2 Merge "Add ability to make task snapshots store in RGB565" 2019-11-14 03:21:39 +00:00
Sunny Goyal
b217bdedfb Adding shell command to dump view hierarchies of all visible windows
Bug: 64101886
Test: Verified that the zip dump is created when running the command
Change-Id: I549895781405260356fbce5a2be09907d0f856d0
2019-11-13 16:33:20 -08:00
John Reck
ab149238c8 Revert "Be less slow"
This reverts commit f2d03d2279.

Reason for revert: unexpected app-compat impact

Change-Id: I59dac6564b9e6c43f5bee82a7a8cd7e6f52f4f1d
Fixes: 144190081
Bug: 123756136
Test: none
2019-11-14 00:19:48 +00:00
TreeHugger Robot
e51f6ffd44 Merge "Add explicit note that LayoutInflater is not thread-safe" 2019-11-13 16:58:27 +00:00
TreeHugger Robot
bc7671b9fb Merge "Add @UnsupportedAppUsage to test apis that are known to be used by apps." 2019-11-13 15:46:27 +00:00
Alan Viverette
302092af9e Add explicit note that LayoutInflater is not thread-safe
Bug: 143353100
Change-Id: I8ac72ba3db9ebb707ab071bc7f9c56888c15d18c
Test: n/a docs only
2019-11-13 15:27:13 +00:00
Chiawei Wang
02202d109f Add ability to make task snapshots store in RGB565
Bug: 123338864
Bug: 135150273
Test: run app-launch-perf test (go/platform-startup)
Test: launch apps manually and measure the execution time of
      snapshotTask(), writeBuffer(), and loadTask()
Change-Id: I9841c6dad99b1f4d4ba0044b7fe06fe021c295a0
2019-11-13 14:08:24 +00:00
Artur Satayev
f0b7d0ba51 Add @UnsupportedAppUsage to test apis that are known to be used by apps.
go/testapi-enforcement

Bug: 133832325
Test: m
Change-Id: Ifc8db120640a1554dcbf1722e61e09c7ddc65dd6
Merged-In: Ifc8db120640a1554dcbf1722e61e09c7ddc65dd6
2019-11-13 12:58:29 +00:00
Jorim Jaggi
5b80fbe00e Merge "Kill overscan insets and outsets" 2019-11-13 11:19:39 +00:00
TreeHugger Robot
3d2b00f3aa Merge "A few methods are missing in TextClassificationSession" 2019-11-13 07:08:46 +00:00
Evan Rosky
5b2a94dab2 Merge "Give SystemUI a chance to participate in display rotation" 2019-11-12 20:54:34 +00:00
TreeHugger Robot
786904b62f Merge "[Shadows] Add an api to draw shadows around a surface. (1/n)" 2019-11-12 20:42:12 +00:00
Jorim Jaggi
f081f06a48 Kill overscan insets and outsets
Also remove WindowManagerStressTest because that has been replaced
with proper perf test.

Test: Boots
Bug: 143255833
Change-Id: I1d293cda7c82d0aa1c3a6cc694c74bf7d10cc974
2019-11-12 17:49:51 +01:00
Evan Rosky
69cace4057 Give SystemUI a chance to participate in display rotation
This adds support for registering a single DisplayRotationController
to WMS. It gives a chance for the controller to suggest some
task changes to be executed along with a display rotation. There
is only one because it's a 2-way communication and there is only
intended to be one client for now.

This allows us to move Split and PiP presentation/layout logic out
of WM into systemui because WM no-longer needs to be the one
calculating the new bounds of everything during rotation.

This uses the windowcontainer transaction because all the
configuration changes and the display rotation need to happen
synchronously; otherwise, relayouts can occur after the display
is rotated, but before the configuration changes are applied.
When this happens, apps get incorrect bounds/insets which can
trigger erroneous lifecycle events in the app.

The flow is like this:
1. DisplayContent/Rotation freezes screen
2. DisplayRotationController is notified of a rotation and provided a
   callback.
3. The Controller then evaluates/queues some task changes in
   a transaction and, when done, fires the provided callback.
4. The callback applies the config change transaction and continues
   the rest of the rotation synchronously.

The DisplayWindowController is sys-ui piece that serves as an
interface between system-ui components and display-related wm
logic. For now it just facilitates the rotation calculation, but
in the future it will have more general utility for display logic
like inset/bounds calculation.

Bug: 124011688
Bug: 133381284
Test: Added some wmtests and coretests.
Change-Id: If10695f44fa076725ba17746842f6fbd64da5d20
2019-11-11 18:10:08 -08:00
Jorim Jaggi
5fdaa0c9af Merge "Remove FEATURE_SWIPE_TO_DISMISS functionality" 2019-11-11 13:10:30 +00:00
Jorim Jaggi
263f6dd52b Merge "Remove PRIVATE_FLAG_INHERIT_TRANSLUCENT_DECOR" 2019-11-11 12:10:28 +00:00
Jorim Jaggi
a2e648e370 Remove PRIVATE_FLAG_INHERIT_TRANSLUCENT_DECOR
Unused

Test: Boots
Change-Id: I35b6fa41de1da8ac3b3435ec4a8506e88bdd6db7
Bug: 144257103
2019-11-11 10:53:16 +00:00
Taran Singh
4e3f6af6f1 Merge "Window with FLAG_NOT_FOCUSABLE cant be IME target." 2019-11-11 04:11:43 +00:00
Joshua Baxter
386d18cccb Merge "docs: remove incorrect (default) identifiers" into qt-dev am: 2c7d94c7ed am: b2a8b29d10 am: 311218304a
am: 6d92ef5ea5

Change-Id: If87405cf3776f3823b722a0cc54728c2ee7932a5
2019-11-08 15:42:37 -08:00
Joshua Baxter
6d92ef5ea5 Merge "docs: remove incorrect (default) identifiers" into qt-dev am: 2c7d94c7ed am: b2a8b29d10
am: 311218304a

Change-Id: I9a27040720cbf66e070403c3ae70f3fe5ce0c001
2019-11-08 15:34:36 -08:00
Joshua Baxter
311218304a Merge "docs: remove incorrect (default) identifiers" into qt-dev am: 2c7d94c7ed
am: b2a8b29d10

Change-Id: Ie1d730b2777f85cd2a2d601576aeedd5e3728620
2019-11-08 15:26:57 -08:00
Joshua Baxter
b2a8b29d10 Merge "docs: remove incorrect (default) identifiers" into qt-dev
am: 2c7d94c7ed

Change-Id: I3b86d60b47443b7b3d50deccc81048b78c0e1dc7
2019-11-08 15:18:53 -08:00
Tarandeep Singh
0ffa15ab5f Window with FLAG_NOT_FOCUSABLE cant be IME target.
Any window that sets FLAG_NOT_FOCUSABLE should not be considered IME target.
IME subsystem starts input on a window when it receives focus, if window never
intended to receive focus, it should not considered an IME target either.
Also, fix the broken javadoc for ALT_FOCUSABLE_IM.

Fix: 143898978
Bug: 140641950
Test: atest WindowStateTests
      atest FocusHandlingTest
      atest WindowManager_LayoutParamsTest
      Also manually using steps:
      1. Launch gmail compose activity
      2. start typing in receipient field
      3. verify that suggestions popup window w/ FLAG_NOT_FOCUSABLE doesn't
         become IME target.

Change-Id: Ifa8e7345c2c9ad3730df86100003918b12fb533e
2019-11-08 11:23:35 -08:00
Tony Mak
017aa94fc7 A few methods are missing in TextClassificationSession
Fixes: 144163980

Test: atest frameworks/base/core/tests/coretests/src/android/view/textclassifier/TextClassifierTest.java

Change-Id: I195b622923de997eebdb448b8bf58a44c19da217
2019-11-08 18:08:35 +00:00
Artur Satayev
3be4d59369 Merge "Add @UnsupportedAppUsage annotations for max-p." am: 8893f158c6
am: da4d6567c2

Change-Id: Iff80c388dec2c6f8184b739be6fb38b8ec8a1a49
2019-11-08 09:49:03 -08:00
Artur Satayev
da4d6567c2 Merge "Add @UnsupportedAppUsage annotations for max-p."
am: 8893f158c6

Change-Id: I2f249063c274b54a58a24cda23f1d5a60fa14540
2019-11-08 09:38:12 -08:00
Artur Satayev
ee9c6e7571 Add @UnsupportedAppUsage annotations for max-p.
See go/UnsupportedAppUsage for more details.

These have already been greylisted, however due to bugs/omissions in the tooling have been kept in go/greylist-txt instead of being annotated in the code.

Bug: 137350495
Test: m
Change-Id: I5aa29a49b193db47aaee4d3a756c17f48cc9f0b1
Merged-In: I5aa29a49b193db47aaee4d3a756c17f48cc9f0b1
2019-11-08 16:17:13 +00:00
Derek Sollenberger
36cf8b2c12 Merge "Remove native calls to HWUI from Surface and use the public API instead" 2019-11-08 13:40:22 +00:00
TreeHugger Robot
79733bbf03 Merge "Update input policy to handle embedded windows" 2019-11-08 10:39:55 +00:00
Joanne Chung
b26a6c567a Merge "Allow to use ExtService as TextClassifierService" 2019-11-08 05:15:30 +00:00
Yunfan Chen
a232661f36 Merge "Hook up TaskDescription into set bar color calls (6/N)" 2019-11-08 02:22:05 +00:00
Vishnu Nair
5cf2531977 Update input policy to handle embedded windows
ANR - If embedded windows are slow in handling inputs the system should blame the embedded app.

PointerDownOutsideFocus - if a user taps outside the currently focused window onto an
embedded window, treat it as if the host window was tapped.

Rename blessInputSurface -> grantInputChannel and add a name to embedded windows.

Bug: 134365580
Test: b WindowlessWmTest
Test: atest CtsWindowManagerDeviceTestCases:WindowlessWmTests

Change-Id: If88970cf6ce17669b41fec995535151a492fab12
2019-11-07 15:54:27 -08:00
Hongming Jin
b640dac6e4 Merge "Convert AccessibilityAction into a parcelable." 2019-11-07 18:11:34 +00:00
Yunfan Chen
91b3a1bd14 Hook up TaskDescription into set bar color calls (6/N)
This patch will update the task description when the app calls
setStatusBarColor or setNavigationBarColor. The status bar is updated
but the information is not reflected in the task description without
this patch.

Bug: 132756841
Bug: 113253712
Test: Test with the test app in b/132756841. The task description is
      updated as expected.
Test: go/wm-smoke
Change-Id: I4ba1e5e7dd0f096cba40221450a8861e3d578e3c
2019-11-06 16:57:05 -08:00
TreeHugger Robot
d660afae57 Merge "Be less slow" 2019-11-07 00:41:21 +00:00
Vishnu Nair
d87984dff5 [Shadows] Add an api to draw shadows around a surface. (1/n)
Bug: 136561771
Test: go/wm-smoke

Change-Id: Ibbf87d93ec30109dae0fbb112e4e20bae5a096f2
2019-11-06 14:43:22 -08:00
Joshua Baxter
5411869170 docs: remove incorrect (default) identifiers
Change-Id: I4ce6bc8a7b0e2f18055416a21f465cd2cfe4ec66
test: make ds-docs
bug: 112679894
2019-11-06 22:14:11 +00:00
Joshua Baxter
7d7562e9ac Merge "docs: fix typos" into qt-dev am: d732cbb7bd am: 77514bd077 am: 208e73ca76
am: fc66e118db

Change-Id: I2f3df59cdd979fc3543dc18ef9beb3ea06061030
2019-11-06 14:11:41 -08:00
Joshua Baxter
fc66e118db Merge "docs: fix typos" into qt-dev am: d732cbb7bd am: 77514bd077
am: 208e73ca76

Change-Id: I492eb05a7292f17df50190ae5325e5c99bb0407e
2019-11-06 13:57:03 -08:00
Joshua Baxter
11cffb4eb2 Merge "docs: fix typos" into qt-dev am: 7bd7afabb8 am: 53fba24239 am: 20148858f5
am: e9a62d5f86

Change-Id: I5a3342cbe5e225806315ab6454fc6b874f21f3a2
2019-11-06 13:50:30 -08:00
Joshua Baxter
208e73ca76 Merge "docs: fix typos" into qt-dev am: d732cbb7bd
am: 77514bd077

Change-Id: I57d192cc779667458923fed99f71c7bf0ae1b8ff
2019-11-06 13:41:26 -08:00
Joshua Baxter
e9a62d5f86 Merge "docs: fix typos" into qt-dev am: 7bd7afabb8 am: 53fba24239
am: 20148858f5

Change-Id: Ibf2e7a9c1b8e31669226e4b27c5a09ae2ed1a219
2019-11-06 13:41:00 -08:00