Commit Graph

11369 Commits

Author SHA1 Message Date
Jorim Jaggi
6fece60313 Merge "Move nulling of nextFrameCallback" into pi-dev am: e4e9ee7951
am: 981b2b1311

Change-Id: Ie600840052e1fcaae07b2abfaaa8715ee60ddd13
2018-06-07 18:35:46 -07:00
TreeHugger Robot
e4e9ee7951 Merge "Move nulling of nextFrameCallback" into pi-dev 2018-06-07 22:14:51 +00:00
Laura Davis
a3902bd637 Merge "docs: Changed language to be gender-neutral." into pi-dev am: b6e3e61850
am: dd18cae009

Change-Id: I9bd713d310d1d3a13b53f8751028bfb021fe697f
2018-06-07 11:45:01 -07:00
Jorim Jaggi
e6a026bdfe Move nulling of nextFrameCallback
If draw() invokes postDraw that sets the next callback, the
callback will never be invoked.

Test: Long-swipe-up from navigation bar
Change-Id: If2e4dfff8a845b73fa77426305d5ece1921857e5
Fixes: 109701914
2018-06-07 17:49:01 +02:00
Laura Davis
890662c3c4 docs: Changed language to be gender-neutral.
Test: make ds-docs

Bug: 75324366
Change-Id: Ia2dbcbe4bec303791cbbb004bab6a0b585c5dfb6
2018-06-05 16:02:42 -07:00
Jorim Jaggi
33ac22827f Merge "Crashing can not override Keyguard transit" into pi-dev am: 44121059dc
am: 6d79f45783

Change-Id: I6d4daa349f03891fee1901fb5f5ff96096665f42
2018-06-05 04:58:49 -07:00
Felipe Leme
e42868974b Merge "Document AutofillValue.forText() thread safety..." 2018-06-04 20:43:50 +00:00
Aurimas Liutikas
e701dc1799 Fix broken links in @see tags in framework docs.
doclava was accidentally suppressing all these broken links
in @see tags. This CL fixes issues so we can start enfocing
checks for broken @see links.

Test: make docs
Change-Id: If7830ece85f8d1f27c991eae282230814726e115
Exempt-From-Owner-Approval: Fixing @see javadoc link issues that are currently completely broken
2018-06-04 10:15:22 -07:00
Felipe Leme
a11aaddb31 Document AutofillValue.forText() thread safety...
...and logs a warning when it's not called from the UI thread.

Fixes: 79159377

Test: atest CtsAutoFillServiceTestCases

Change-Id: I2976dbe294db695796a2a9db9600a333ffb66f26
2018-06-01 14:09:09 -07:00
Aurimas Liutikas
62786b4431 Merge "Fix broken links in @see tags in framework docs." 2018-06-01 17:16:09 +00:00
Aurimas Liutikas
7f6953369a Fix broken links in @see tags in framework docs.
doclava was accidentally suppressing all these broken links
in @see tags. This CL fixes issues so we can start enfocing
checks for broken @see links.

Test: make docs
Exempt-From-Owner-Approval: Fixing @see javadoc link issues that are currently completely broken
Change-Id: I767e9fb9842494e5eccef2a7bdeee3877c488b5d
2018-06-01 17:15:55 +00:00
Jorim Jaggi
9c52ebbf96 Crashing can not override Keyguard transit
If an app crashes during Keyguard transition, make sure to keep
Keyguard transition

Test: AppTransitionTests
Test: go/wm-smoke
Change-Id: I80b80952f93d2b5611754f05a3dc333905cd1c86
Fixes: 80132133
2018-06-01 16:32:44 +02:00
TreeHugger Robot
427ae7d48e Merge "DisplayCutout: make cutout info available on Display object" 2018-06-01 09:39:35 +00:00
John Reck
5b02c629bd Attempting to fix the black flicker
Bug: 79231206
Test: Repro steps from bug

Merged-In: I4c2810c42a7a4358f64584da3ab0cdf1499e71b6
Change-Id: I4c2810c42a7a4358f64584da3ab0cdf1499e71b6
2018-05-31 12:56:28 -07:00
John Reck
cc2eee89c8 Attempting to fix the black flicker
Bug: 79231206
Test: Repro steps from bug

Change-Id: I4c2810c42a7a4358f64584da3ab0cdf1499e71b6
2018-05-31 19:55:54 +00:00
Adrian Roos
a4904791bf DisplayCutout: make cutout info available on Display object
Change-Id: I2e00f6b4966b61a0561ae0adf3a74f8ff3df8028
Fixes: 79205749
Test: m check-api
2018-05-31 19:48:39 +02:00
Evan Rosky
ee4376a290 Merge "Fixed a bug where sometimes unhandled handler would consume all keys" into pi-dev am: 7ba4c2b254
am: 9bf11ede69

Change-Id: I3e1eb6884cedb86ec144e5ada09b4252ee266c96
2018-05-30 15:10:41 -07:00
Evan Rosky
7ba4c2b254 Merge "Fixed a bug where sometimes unhandled handler would consume all keys" into pi-dev 2018-05-30 21:47:25 +00:00
Adrian Roos
657c313cde Merge "WindowInsets: Never dispatch negative insets" into pi-dev am: 8997b7e4c9
am: 40b9c13052

Change-Id: I5fb7dc2c515c20db676f347101838f7624302cf3
2018-05-28 07:59:15 -07:00
Adrian Roos
8997b7e4c9 Merge "WindowInsets: Never dispatch negative insets" into pi-dev 2018-05-28 14:40:20 +00:00
Evan Rosky
cd80e611ca Fixed a bug where sometimes unhandled handler would consume all keys
In a situation where a focused view consumed only the UP of a key
and the unhandled key manager would focus a listener, it wouldn't
drop focus unless the original key was pressed/released again.

This updates the record of captured keys before it can be consumed
in the view hierarchy.

Bug: 79993136
Test: Added a test for this to cts ViewTest#testUnhandledKeys
Change-Id: I5dfdcf16c5c41e9ad51cb62b385580c5493e8520
2018-05-25 16:18:57 -07:00
Adrian Roos
7419a17d92 WindowInsets: Never dispatch negative insets
Bug: 80204753
Test: atest ViewRootImplTest
Change-Id: Idace95ae57c6a3a1667b95ce8c3ac7d2bfe06f94
2018-05-25 14:54:09 +02:00
Felipe Leme
ce3ae87da9 New Autofill field: FIELD_AUTOFILL_SESSION_ID
This field contains the autofill session id (Thank You, Captain Obvious!), which
is useful to correlate autofill metrics that are not logged on
AUTOFILL_REQUEST.

Test: atest CtsAutoFillServiceTestCases # to make sure it didn't break anything
Test: manually run some test and watched
      'adb shell logcat -b events | grep sysui'. Example:
     [757,913,758,4,806,android.autofillservice.cts,871,android.autofillservice.cts.LoginActivity,914,2,915,2,1456,-2045861404

Fixes: 80093094

Merged-In: If4b1c9ab616b2ba580745096894997eb7edb3e34
Change-Id: If4b1c9ab616b2ba580745096894997eb7edb3e34
2018-05-25 06:22:25 +00:00
Felipe Leme
833c99b9d1 New Autofill field: FIELD_AUTOFILL_SESSION_ID
This field contains the autofill session id (Thank You, Captain Obvious!), which
is useful to correlate autofill metrics that are not logged on
AUTOFILL_REQUEST.

Test: atest CtsAutoFillServiceTestCases # to make sure it didn't break anything
Test: manually run some test and watched
      'adb shell logcat -b events | grep sysui'. Example:
     [757,913,758,4,806,android.autofillservice.cts,871,android.autofillservice.cts.LoginActivity,914,2,915,2,1456,-2045861404

Fixes: 80093094

Change-Id: If4b1c9ab616b2ba580745096894997eb7edb3e34
(cherry picked from commit 064c562c23edcb2c220be45450274869b529a8ee)
2018-05-24 23:20:35 -07:00
Felipe Leme
b838a09af3 Added the class name of activity being autofilled on (most) autofill metrics.
Test: atest CtsAutoFillServiceTestCases # to make sure it didn't break anything
Test: manually run some test and watched
      'adb shell logcat -b events | grep sysui'

Fixes: 80151641

Change-Id: I5b83e6ceb549a641d10c39bbfd4f24d0a43d1a23
(cherry picked from commit 212b1614f4)
2018-05-24 21:19:58 -07:00
TreeHugger Robot
41a60f4033 Merge "Added the class name of activity being autofilled on (most) autofill metrics." into pi-dev 2018-05-25 00:55:42 +00:00
Michael Wright
8d0c2bdcb8 Merge "Use TCM context if application context is unavailble." into pi-dev am: 87631c2d29
am: c4e7c86a60

Change-Id: Ie0e1260edc7749c557cefcc4faa966c8756af438
2018-05-24 17:38:08 -07:00
Felipe Leme
212b1614f4 Added the class name of activity being autofilled on (most) autofill metrics.
Test: atest CtsAutoFillServiceTestCases # to make sure it didn't break anything
Test: manually run some test and watched
      'adb shell logcat -b events | grep sysui'

Fixes: 80151641

Change-Id: I5b83e6ceb549a641d10c39bbfd4f24d0a43d1a23
2018-05-24 13:59:06 -07:00
Michael Wright
b112f26cce Use TCM context if application context is unavailble.
In TextClassificationManager, we use the application context to reduce
the likelihood of leaking the underlying Activity. Unfortunately, some
places (e.g. auto, system_server) don't actually provide us an
application context, so we need to fall back to whatever context was
passed in to TCM in the first place.

Bug: 80188317
Test: none
Change-Id: Ib4b2e6ed543d3ed56cefd8f56717855158cdc0fe
2018-05-24 14:15:04 +01:00
TreeHugger Robot
d6f175d727 Merge "Allow keycode lookup without KEYCODE_ prefix" 2018-05-23 16:55:32 +00:00
Siarhei Vishniakou
de1f904713 Allow keycode lookup without KEYCODE_ prefix
Currently, KeyEvent.keyCodeFromString(String name) requires the string
to either start with "KEYCODE_", or be directly convertible to an int.
However, the string representation of every keycode starts with
"KEYCODE_", so this requirement is redundant. Relax this requirement to
alllow both of the following usages:
1) keyCodeFromString("KEYCODE_BUTTON_A")
2) keyCodeFromString("BUTTON_A")

Currently, only 1) is supported.

The other usage,
3) keyCodeFromString("29")
is unchanged.

The input is no longer case-sensitive.
Improved the example of usage in the documentation: the input
"1001" suggests that the string must contain binary representation for
usage 3), while in fact it is supposed to be a base 10 number.

Test: atest cts.KeyEventTest#testKeyCodeFromString
Bug: 36069459

Change-Id: I54d7f9d1270748854143cc9d1e8af48c9ec0cd0f
2018-05-22 07:23:34 -07:00
Adrian Roos
ab2f888137 Merge "Display Cutout: Fix ActionBarOverlayLayout to properly dispatch cutout" into pi-dev am: 177ee3d7a1
am: 6098f6db68

Change-Id: Idf260e2dd6e0bbfdcaefc1d3f85ac82dadf31050
2018-05-18 15:27:56 -07:00
TreeHugger Robot
177ee3d7a1 Merge "Display Cutout: Fix ActionBarOverlayLayout to properly dispatch cutout" into pi-dev 2018-05-18 22:12:30 +00:00
Adrian Roos
f7b7426d81 Display Cutout: Fix ActionBarOverlayLayout to properly dispatch cutout
ActionBarOverlayLayout used to drop WindowInsets, extract the content insets
as a rect, and then dispatch a modified rect to the content view; this because
there was no way to retarget the WindowInsets to the content view, and the
WindowInsets were not truly immutable. That means however, that other kinds of
insets than the content insets do not get dispatched, such as the display cutout.

To fix this, we add APIs to inset WindowInsets, make them immutable. Note that
a similar change is needed for the support lib.

Bug: 79733300
Test: atest ActionBarOverlayLayoutTest
Change-Id: I6a69d8462163ca5e66fdb53f83def6bc4063f8aa
2018-05-18 20:58:38 +00:00
Jorim Jaggi
da6e14bc53 Merge "Schedule trimMemory after drawing the frame" into pi-dev am: 6b8014f5c8
am: 7b7d830f5a

Change-Id: I7b56dc55c46db0dff80b3d0ace439f5e83599100
2018-05-18 12:24:55 -07:00
Jorim Jaggi
b29e318e03 Schedule trimMemory after drawing the frame
Fixes jank issues where trimMemory gets scheduled during an
animation. trimMemory likely hits code that is not in the
page cache anymore, leading to high execution time because of page
misses. Scheduling it after the next frame has been drawn
minimizes the risk that this page miss actually causes jank.

Test: Boot, switch between a couple of apps.
Bug: 78611607
Change-Id: Ia1fc411fbe6ca07861183ae484124406681118e5
2018-05-18 18:26:30 +02:00
Jorim Jaggi
e4a8d4c7e9 Merge changes I608d4b61,Ia7900e75 into pi-dev
* changes:
  Follow up to Ia7900e753b29187a7a7b81f393666687e8b8e04b
  Apply surface parameters in sync with RenderThread
2018-05-18 11:49:56 +00:00
Abodunrinwa Toki
228460c709 Merge "Refresh TCM settings when they change" into pi-dev am: 3fa564030f
am: f08646f13e

Change-Id: I2a7fc61dac52817b053a680b82c18514f76ec6b8
2018-05-17 11:13:47 -07:00
TreeHugger Robot
3fa564030f Merge "Refresh TCM settings when they change" into pi-dev 2018-05-17 17:46:24 +00:00
Abodunrinwa Toki
cfb880c6e0 Merge "Use FLAG_UPDATE_CURRENT for TC PendingIntents." into pi-dev am: 2085646c7d
am: 402a57bac2

Change-Id: Ia8bb7755472d05b74a9d9efb6b4e6df7b4d52b8a
2018-05-17 03:36:59 -07:00
Abodunrinwa Toki
c2449b8361 Refresh TCM settings when they change
Approach here is to register a content observer that invalidates the
TC settings whenever updates to the settings happen.

This CL also ensures that the TC is invalidated when a settings
update happens. This is because the settings may change what
TC the system returns.

TextView's SelectionActionModeHelper has been updated to not cache
the settings and get them directly from TCM (which caches the settings).

NOTE that we expect TC settings to rarely change.

Bug: 77539576
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Test: bit CtsViewTestCases:android.view.textclassifier.cts.TextClassificationManagerTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Test: manual - Made changes to TC settings and observed logs / app behaviour

Change-Id: I88bbb6f951708b17323fac1a72385fe808d270a5
2018-05-17 11:29:29 +01:00
TreeHugger Robot
2085646c7d Merge "Use FLAG_UPDATE_CURRENT for TC PendingIntents." into pi-dev 2018-05-17 10:11:19 +00:00
Dieter Hsu
6ce3db4976 Merge "Trigger action for app ops icon for keyboard navigation" into pi-dev am: 7f91c59b3e
am: a30db99a93

Change-Id: I230703ca8de3ca0e7949f212cc2af1c95ffcc38c
2018-05-16 23:22:11 -07:00
Dieter Hsu
7f91c59b3e Merge "Trigger action for app ops icon for keyboard navigation" into pi-dev 2018-05-17 06:04:13 +00:00
Dieter Hsu
3a9b5a98dc Trigger action for app ops icon for keyboard navigation
Bug: 79671932
Test: manually check talkback, switch access and kb navigation
Change-Id: I8a2ed0fc8e6b565e923954fa87e61a20c83438c0
2018-05-17 06:03:58 +00:00
Jorim Jaggi
64be98d5d2 Apply surface parameters in sync with RenderThread
Otherwise it could lead to parameters applied in the wrong frame,
leading to jank.

Test: Open notification
Bug: 78611607
Change-Id: Ia7900e753b29187a7a7b81f393666687e8b8e04b
Merged-In: Ia7900e753b29187a7a7b81f393666687e8b8e04b
2018-05-17 01:57:31 +00:00
Tony Mak
25e3969ccf Merge "TextSelection.Builder.setId should take null as well" into pi-dev am: 10f8ed0cf8
am: ed8e0f6fe6

Change-Id: Ie518095729244f18e9c5cebb2616b98be1b33ce1
2018-05-16 17:15:38 -07:00
TreeHugger Robot
10f8ed0cf8 Merge "TextSelection.Builder.setId should take null as well" into pi-dev 2018-05-16 23:52:14 +00:00
Tony Mak
84368781ec TextSelection.Builder.setId should take null as well
TextSelection#Id is nullable, so the builder should take null as well.

Bug: 79779551
Test: Build
Change-Id: Iacabcab2befcbd4cb1c8674c253fe9a26cb877bf
2018-05-16 01:05:35 +00:00
Jorim Jaggi
7a5addd2b7 Apply surface parameters in sync with RenderThread
Otherwise it could lead to parameters applied in the wrong frame,
leading to jank.

Test: Open notification
Bug: 78611607
Change-Id: Ia7900e753b29187a7a7b81f393666687e8b8e04b
2018-05-15 17:31:33 -07:00