Commit Graph

11338 Commits

Author SHA1 Message Date
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
Abodunrinwa Toki
aec5981b88 Use FLAG_UPDATE_CURRENT for TC PendingIntents.
This way the newest PendingIntent will override any matching ones.

Bug: 78286917
Test: bit CtsViewTestCases:android.view.textclassifier.cts.TextClassificationManagerTest
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationTest
Change-Id: Ib130fa5979c3dab628e7be668331cb94d23e0829
2018-05-15 23:23:12 +01:00
Phil Weaver
10e49ae1e6 Merge "Update a11y when alpha changes" into pi-dev am: b504a2f65b
am: 291adf498d

Change-Id: I226fbf893ff7c92408bb64b7aa4d2a2d529c3232
2018-05-15 14:15:24 -07:00
Phil Weaver
b504a2f65b Merge "Update a11y when alpha changes" into pi-dev 2018-05-15 19:49:09 +00:00
Dake Gu
0afc76ede5 Merge "Autofill: allow switch IME when autofill is showing" into pi-dev am: 7b6ecb7668
am: 0c268a1a89

Change-Id: Ia0ec98c603ecd69f4b54793df1228468596c6df6
2018-05-14 18:46:16 -07:00
Dake Gu
7b6ecb7668 Merge "Autofill: allow switch IME when autofill is showing" into pi-dev 2018-05-15 01:02:41 +00:00
Phil Weaver
dac9591e7d Merge "Improve a11y ordering" into pi-dev am: 3789bbc476
am: fbcae9d732

Change-Id: I0c234b9e3f2778951c729ed6daed96bcc3b394d2
2018-05-14 16:49:43 -07:00
Phil Weaver
3789bbc476 Merge "Improve a11y ordering" into pi-dev 2018-05-14 23:25:07 +00:00
Phil Weaver
86b3260128 Improve a11y ordering
We use ids to break ties when sorting views just to
guarantee that we won't break sorting. But we don't
want to have our swipe order determined by arbitrary
ids.

Before resorting to such a crude tie-breaker, look at
a view's children to try to break a tie using their
bounds. That sort is more based on what's on the
screen, and will also produce the same result from
the same ui.

Bug: 78348191
Test: Switch access order is much more sensible on
Recents. Also ran a11y cts.

Change-Id: I918eae3b0d27e889a53d05a6ebe925e38ce5d7b4
2018-05-14 20:01:37 +00:00
Jan Althaus
5f84c4e6b3 Merge "Remove custom schema parsing in favor of Uri" into pi-dev am: e3125c7e89
am: 927c227845

Change-Id: Ic42e3a481e6ced6a74f795118e2d576f261790cc
2018-05-14 01:44:27 -07:00
Jan Althaus
e3125c7e89 Merge "Remove custom schema parsing in favor of Uri" into pi-dev 2018-05-14 08:21:40 +00:00
Abodunrinwa Toki
7c41320e8a Merge "Do not parcel legacy TextClassification fields" into pi-dev am: 6db14d01c2
am: 164183125c

Change-Id: I2a7b4323e815f5a4868085be69e417439729ff90
2018-05-13 14:52:24 -07:00
TreeHugger Robot
6db14d01c2 Merge "Do not parcel legacy TextClassification fields" into pi-dev 2018-05-13 21:32:20 +00:00
Winson Chung
10348578c8 Merge changes from topic "sysui_flags_drop" into pi-dev am: 53ae6a82cd
am: 59ff523949

Change-Id: I8d6fa49ba23b78648cf43fafe7c290f2e0c4b59f
2018-05-11 16:48:13 -07:00
Winson Chung
53ae6a82cd Merge changes from topic "sysui_flags_drop" into pi-dev
* changes:
  Clean up Recents animation api
  Expose the system ui visibility flags and translucent state with snapshot
2018-05-11 22:18:37 +00:00
Abodunrinwa Toki
c1116bc55b Merge "Fix TextClassifier logging." into pi-dev am: 1c60953f9d
am: c2aa28895a

Change-Id: Ia7efff7e3505053b21e4e7c6f55cc2394024f318
2018-05-11 13:40:26 -07:00
Dake Gu
ddf6c1e22c Autofill: allow switch IME when autofill is showing
IME used to allow startInput() *only* when window has focus.
This is no longer the case after we made changes to allow autofill
window to get window focus to receive physical keyevents.

The fix changed precondition of when InputMethodManager can startInput:
(hasWindowFocus() || isAutofillUIShowing()).

Test: manual test:
      - install two IMEs
      - install autofill sample service and autofill sample service
      - launch the Autofill sample app, click on edittext, both
        IME and autofill window are showing.
      - type "username", autofill datasets are being filtered.
      - click "globe" button in IME window to switch IME.
      - continue typing "username2" using new IME and autofill window
	continues to filtering.
      - also try the "IME switch" button in bottom bar to switch IME.
Bug: 79494235

Change-Id: I0d222b5fc13ad46834aa861647d8f2e1649093ec
2018-05-10 17:11:47 -07:00
Abodunrinwa Toki
ba196c5a3d Do not parcel legacy TextClassification fields
If we depend on legacyIntent, then TextClassifierService implementations
will have to always popuplate a deprecated field.
To avoid breaking legacy clients, the returned legacyOnClickListener should
represent the first pendingIntent (i.e. primary action) that was parcelled.

Bug: 78340399
Test: atest CtsViewTestCases:TextClassificationManagerTest
Test: atest FrameworksCoreTests:TextClassificationTest
Test: manual check with a TCS that only sets non-deprecated fields vs a
legacy TC client
Change-Id: I41d27a65f1ede6369dd2a66d92b2210edb0d11e2
2018-05-10 19:42:55 +01:00
Winson Chung
6802e2a553 Clean up Recents animation api
Bug: 73714156
Test: Ensure you can still swipe up

Change-Id: Ie70ed0edb05f54d17d3989895b86e07851c44c06
2018-05-08 17:56:05 -07:00
Phil Weaver
d2bebd43a4 Update a11y when alpha changes
We were only updating accessibility in View#setAlpha,
but View#setAlphaNoInvalidation would also change alpha,
and accessibility would never find out.

Bug: 78101543
Test: TalkBack now works on nightlight conditional and
battery saver slider.

Change-Id: I1ebb62aa7f4de700b2d7fbaae8dbbd1c84fc4ece
2018-05-08 15:22:17 -07:00
Nader Jawad
8633bbeec7 Merge "Removed logic to handle optimized software rendering pass for opaque Views" 2018-05-08 22:03:58 +00:00
Nader Jawad
70e7299b56 Removed logic to handle optimized software rendering pass for opaque
Views

Change-Id: I149b8297e432a3d038ce18e8bd76022a39006a00
Fixes: 71521014
Test: Re-ran CtsWidgetTestCases and CtsGraphicsTestCases
2018-05-08 13:32:16 -07:00
Abodunrinwa Toki
dfd3c653ce Fix TextClassifier logging.
No logs were being sent via the TextClassificationManagerService to
the TextClassifierService.
Also, SelectionEvent.getSessionId() is nullable. Handle appropriately.

Bug: 79418429
Test: manual - manually tested via a debugger. Auto tests coming soon.
Test: bit CtsViewTestCases:android.view.textclassifier.cts.TextClassificationManagerTest
Change-Id: I196885d9b03c0c11cae7686a5835d14791065e78
2018-05-08 18:35:29 +01:00
Jan Althaus
7dd7c5ceda Remove custom schema parsing in favor of Uri
This allows TextClassifier models to add support for additional protocols
after launch.

Bug: 79407639
Test: atest FrameworksCoreTests:TextClassificationManagerTest
Test: atest FrameworksCoreTests:TextClassificationTest
Test: atest CtsViewTestCases:TextClassificationManagerTest
Test: atest CtsViewTestCases:TextClassifierValueObjectsTest
Change-Id: I6781bf476f8c81d2106e2fb73b8f4629068bb0af
2018-05-08 15:30:04 +02:00
android-build-team Robot
9f7fc4af6f Merge "New FIELD_AUTOFILL_COMPAT_MODE field." into pi-dev am: 88cc74cd6b
am: a96a951269

Change-Id: I95154065ebb1660b06d933df367973fcab3a08ea
2018-05-07 17:51:23 -07:00
Felipe Leme
1116652087 New FIELD_AUTOFILL_COMPAT_MODE field.
This field is used on pretty much all Autofill metrics, except
AUTOFILL_USERDATA_UPDATED, AUTOFILL_SERVICE_DISABLED_SELF, and
AUTOFILL_INVALID_PERMISSION.

Test: atest CtsAutoFillServiceTestCases
Test: adb shell logcat -b events | grep sysui

Bug: 79351659

Change-Id: I2e2f3dcc780a3896162b158926f5ee89c7cb342d
2018-05-07 12:14:00 -07:00
android-build-team Robot
1cd00f3c8a Merge changes I5ed0feb5,I33faa3c8,Id2ee2e55,Iad0d4e94,I3ae5e544
* changes:
  Revert "Rotate IMEs (subtypes) by Meta+Space."
  Revert "Show toast when subtype is rotated by Meta-Space."
  Revert "Shift+Meta+Space should reverse-rotate subtypes."
  Revert "Shift+Meta+Space should reverse-rotate subtypes part 2."
  Revert "Make sure that Toast is always shown by Meta-Space."
2018-05-07 02:13:23 +00:00
Yohei Yukawa
fec8cef7ed Revert "Rotate IMEs (subtypes) by Meta+Space."
This reverts commit ae61f7118a [1].

Reason for revert: to deprecate Meta-Space short cut.

 [1]: I4005692215edfcf8bed3e86b1e07000148f986f5

Bug: 79150878
Test: Manually tested as follows.
  1. make -j SoftKeyboard
  2. adb install -r $OUT/system/app/SoftKeyboard/SoftKeyboard.apk
  3. adb shell ime enable com.example.android.softkeyboard/.SoftKeyboard
  4. Connect a hardware keyboard
  5. adb shell settings get secure default_input_method
  6. Hit Meta+Space on the hardware keyboard.
  7. adb shell settings get secure default_input_method
  8. Make sure that the results of step 5 and step 7 are the same.
Change-Id: I5ed0feb5a6d7171564d358644b04ee2a43e4d6b3
2018-05-04 12:53:40 -07:00
Rob Carr
b41cd31024 Merge "SurfaceControl: Close CloseGuard when destroying surface in transaction." into pi-dev am: 625de7758b
am: 15d55c26cf

Change-Id: I015977e3c79f0fe19fc60d028770fa00a9a669b8
2018-05-03 16:59:22 -07:00
Rob Carr
625de7758b Merge "SurfaceControl: Close CloseGuard when destroying surface in transaction." into pi-dev 2018-05-03 22:52:18 +00:00
android-build-team Robot
620a2eb96f Merge "WIDGET_TYPE_UNSELECTABLE_TEXTVIEW is missing in the WidgetType" into pi-dev am: d733159b45
am: d948b2cb63

Change-Id: I3084f6cd947f6687c425e8403fc10b602464414f
2018-05-03 07:35:41 -07:00
android-build-team Robot
d733159b45 Merge "WIDGET_TYPE_UNSELECTABLE_TEXTVIEW is missing in the WidgetType" into pi-dev 2018-05-03 14:05:00 +00:00