Commit Graph

11097 Commits

Author SHA1 Message Date
Jorim Jaggi
767e25ed61 Add ability to change context priority of RT GL context
Test: Use method, observe GPU preemption behavior
Bug: 75985430
Change-Id: Idc08d37f8c95f52c5aab7edf09c0cbff72b8482d
2018-04-06 12:12:07 +00:00
Rob Carr
d1366f604a Merge "Forward Activity stop signal to attached windows." into pi-dev 2018-04-05 19:03:29 +00:00
Richard Ledley
5f77b6a35a Add null check for Nullable argument.
Test: bit CtsViewTestCases:android.view.textclassifier.cts.TextClassificationManagerTest FrameworksCoreTests:android.view.textclassifier.TextLinksTest

Bug: 77624093
Change-Id: I527c4e7f6758c699d4d4e7258cf8474f833040c7
2018-04-05 17:30:24 +01:00
Richard Ledley
7b7e87eeb5 Merge "Use Collection instead of List for entity list" into pi-dev 2018-04-05 05:46:53 +00:00
TreeHugger Robot
2b26f83f12 Merge "autofill: fix window location in splitwindow and dialog" into pi-dev 2018-04-04 22:06:49 +00:00
Dake Gu
640e9b9bf4 autofill: fix window location in splitwindow and dialog
autofill should use relative location to app window as PopupWindow
is based on relative location.

The fixed reverted changes made in compatibility mode CL that made
autofill window TYPE_SYSTEM_DIALOG.

Changing PopupWindow to use absolute screen location is another fix
choice, but it does not allow autofill window to be automatically
moved when app window changes location (e.g. adjust split window
separator or bring up IME)

The autofill window switches to TYPE_APPLICATION_ABOVE_SUB_PANEL with
IME disabled. So it still appears above IME and most other app
windows, unless app window is TYPE_APPLICATION_ABOVE_SUB_PANEL too.

Fixes: 73555917
Bug: 77587135
Test: manually tested compability mode with chrome amazon login
      manually tested splitted window
      atest CtsAutoFillServiceTestCases

Change-Id: I6b8ecf3fe7a91cebea1f7a868f4b15fbed8b0051
2018-04-04 11:36:40 -07:00
Richard Ledley
ab669a01a7 Use Collection instead of List for entity list
Test: bit CtsViewTestCases:android.view.textclassifier.cts.TextClassificationManagerTest FrameworksCoreTests:android.view.textclassifier.TextLinksTest

Bug: 76448224

Change-Id: I354fa05f14b22075c2172624925f5b953956f3a4
2018-04-04 17:42:07 +01:00
Abodunrinwa Toki
ae82e7ad28 Fix TCS crash due to API changes.
- Brings by old deleted APIs and hides them
- Except parceling and hidden APIs that won't have been called anyway
- Option holds a reference to the Request object so we don't have to
  rebuild it

Bug: 77523413
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: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationTest
Test: bit FrameworksCoreTests:android.view.textclassifier.TextSelectionTest
Test: bit FrameworksCoreTests:android.view.textclassifier.TextLinksTest
Change-Id: I4277c48a950c3334439649373885ed7fe54f898e
2018-04-04 14:10:51 +02:00
TreeHugger Robot
3ec4b8ccfd Merge "Use client-side version of inTouchMode" into pi-dev 2018-04-03 23:25:34 +00:00
Robert Carr
3f7bd97df9 Forward Activity stop signal to attached windows.
Simply put there is nothing ensuring PopupWindow's stop using
the Surface before the app is stopped. Since PopupWindow's are
detached from the main View Hierarchy teardown of the main window
provides no such guarantee. It seems enough to forward the "WindowStopped"
signal from ViewRoot to other ViewRoot's using the token of that ViewRoot.

Bug: 62536731
Test: Manual
Change-Id: Ib431f49be7e06a6397a40c11ec7e842a8bc5caf9
2018-04-03 15:53:01 -07:00
TreeHugger Robot
5fa07c0986 Merge changes from topic "fw_quickstep_update" into pi-dev
* changes:
  Reparent recents animation task leash to app animation layer
  Allow recents animation to override divider minimized state
  Prevent unnecessary reordering of the home stack
2018-04-03 22:31:57 +00:00
Evan Rosky
2888404df8 Use client-side version of inTouchMode
Was bindering into WM service pretty often due to this which was
causing some jank

Bug: 72236832
Test: Related touchmode/focus CTS tests still pass
Change-Id: Ia0f89429b67464beea07c702d8fe2d8b813f8d38
2018-04-03 13:21:55 -07:00
TreeHugger Robot
ffe1c2a266 Merge "Restore saveLayer APIs back into the public API." into pi-dev 2018-04-02 14:28:48 +00:00
TreeHugger Robot
bf9dfb16be Merge "TextClassifier API updates." into pi-dev 2018-04-02 09:08:52 +00:00
Abodunrinwa Toki
080c8542b6 TextClassifier API updates.
1. Wraps TC queries in Request objects
2. Adds create/destroyTextClassificationSession system APIs
3. Adds the session Ids to system API calls
4. Change setSignature() to setId() on result objects
5. Plumbing to make the API updates work as things currently work
6. Hide Linkify.addLinksAsync APIs

Bug: 74461129

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: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationTest
Test: bit FrameworksCoreTests:android.view.textclassifier.TextSelectionTest
Test: bit FrameworksCoreTests:android.view.textclassifier.TextLinksTest

Change-Id: I933ada8b37ef9893331a265e3b4fc08e043f1029
2018-04-01 20:04:47 +01:00
TreeHugger Robot
e1059d9f5e Merge "Renamed KeyFallbackEvent to UnhandledKeyEvent and exposed dispatch" into pi-dev 2018-03-31 17:39:18 +00:00
Evan Rosky
4d0a5fd7e7 Merge "Restored focusableViewAvailable logic on visibility change" into pi-dev 2018-03-30 21:23:32 +00:00
Evan Rosky
4807ae257b Renamed KeyFallbackEvent to UnhandledKeyEvent and exposed dispatch
This new naming clashes less with the existing notion of FLAG_FALLBACK
in KeyEvents.

Bug: 72562800
Test: ViewTest#testUnhandledKeys
Change-Id: Ibd713860601e62d955443fe6811fd974b5bb0092
2018-03-30 19:52:58 +00:00
Derek Sollenberger
2d4f01ba7f Restore saveLayer APIs back into the public API.
The saveLayer APIs are restored from @removed but will treat input
as ALL_SAVE_FLAGS and generate exceptions on newer API levels.

We internally used these calls in one situation that now use a
different @hide API to support the previous behavior until we
refactor that code.

Partial revert of "Remove deprecated android.graphics.Canvas APIs"
This reverts commit 7b837616ae.

Bug: 77276963
Bug: 73777445
Test: CtsGraphicsTestCases
Change-Id: I7acd4ffd5ac41a58d2be8b48cf50119c2b896708
2018-03-30 14:40:04 -04:00
Winson Chung
f557c3b565 Allow recents animation to override divider minimized state
- When swiping up while in split-screen, the animation should be able to
  adjust the docked divider minimized state so that we don't wait until
  launcher is repositioned to the front in order for the divider to
  update.

Bug: 73118672
Test: Enter split screen, swipe up and ensure the dock divider moves
      (Note, there are still unrelated clipping issues)

Change-Id: Id71f91eaf2f06b3c33628a2199cc94c82e235471
2018-03-30 10:25:16 -07:00
Jan Althaus
a1652cfcce Switch reference time to ZonedDateTime
Bug: 74838195
Test: atest FrameworksCoreTests:TextClassificationManagerTest
Test: atest FrameworksCoreTests:TextClassificationTest
Test: atest CtsViewTestCases:TextClassificationManagerTest
Test: atest CtsViewTestCases:TextClassifierValueObjectsTest
Change-Id: I0df9dddf415fa558435553336a8a0a15621e9b05
2018-03-29 18:41:32 +02:00
Abodunrinwa Toki
119d10deb9 Merge "Implement Stateful TextClassifier APIs." into pi-dev 2018-03-28 20:58:47 +00:00
Jorim Jaggi
13c4b14e92 Merge "Add different animation for transitions with translucent apps" into pi-dev 2018-03-28 19:09:08 +00:00
Jan Althaus
08a75e0ee7 Merge "Change TextClassification to use RemoteActions" into pi-dev 2018-03-28 17:04:58 +00:00
TreeHugger Robot
59ecb96da9 Merge "Improve the JavaDoc for SOFT_INPUT_STATE_UNSPECIFIED" into pi-dev 2018-03-28 16:29:56 +00:00
Adrian Roos
95712fe0cb Merge "DisplayCutout: Add clarifying images to LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES" into pi-dev 2018-03-28 14:56:19 +00:00
Jorim Jaggi
98a9d206be Add different animation for transitions with translucent apps
None of the existing animation really work with transitions in
which a translucent app is appearing/disappearing. Add a separate
animation for that and change all existing transitions to these
new transition types in case we detect that only translucent
activities are appearing/disappearing.

Test: Sharesheet animations
Test: go/wm-smoke
Change-Id: Iffe57b7664dddf647d723c91d115ade60c12ad33
Fixes: 37953606
Fixes: 70730519
Fixes: 72649981
Fixes: 72686618
2018-03-28 16:46:41 +02:00
Adrian Roos
813a4bee76 Merge "DisplayCutout: Fix attrs.xml javadoc" into pi-dev 2018-03-28 14:29:08 +00:00
Adrian Roos
ad1da31764 DisplayCutout: Add clarifying images to LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES
Fixes: 76462084
Test: make doc-comment-check-docs, open $ANDROID_BUILD_TOP/out/target/common/docs/doc-comment-check/reference/android/view/WindowManager.LayoutParams.html, navigate to LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES
Change-Id: I8a9df979cbb062896fa874a163414a4f8a095b21
2018-03-28 15:00:45 +02:00
Jan Althaus
20d346eafe Change TextClassification to use RemoteActions
Behavioural changes:
- Every action now as an icon, and instead hints via RemoteAction whether
  the icon should be shown or not.
- Icons are now taken from the app default, not the activity.
  (That way, we can construct a lightweight resource backed Icon)
- Legacy intents are no longer parceled for security reasons.
  (TextClassificatio wasn't parcelable in O)
- TextClassifications built with the new API will always return null for
  getIntent, but provide a getOnClickListener.
- Accessibility descriptions are now provided for action mode items.

Testing changes:
- Removed URI checks from TCM test because PendingIntent hides this info.

Bug: 73950205
Test: atest FrameworksCoreTests:TextClassificationManagerTest
Test: atest FrameworksCoreTests:TextClassificationTest
Test: atest CtsViewTestCases:TextClassificationManagerTest
Test: atest CtsViewTestCases:TextClassifierValueObjectsTest
Test: atest CtsWidgetTestCases:TextViewTest
Test: atest CtsWidgetTestCases:EditTextTest
Change-Id: I6706d2c342a8bbb9de0146a48c8b8aac9d9c7d83
2018-03-28 11:41:39 +02:00
Abodunrinwa Toki
88be5a6cee Implement Stateful TextClassifier APIs.
Outstanding work tbd in other CLs
- Introduce request objects with session Ids
- Implement character based indexing for Selection events.

This CL hides the old Logger API but still keeps running so that we can
check that the modifications to the new API does not break anything.
We will remove the old Logger once we're convinced this is stable.

Please refer to I3c9ceea0863099fc4f0a5ce5e823c648ee9c4521 for previous
reviews related to this CL.

Bug: 74461129
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
Change-Id: Iea744f1fa5964b4399290c31863ebeffa99af8d3
2018-03-28 02:54:36 +01:00
Lucas Dupin
41c25cee06 Unload wallpaper bitmap and release HwuiContext
To decrease sysui memory usage

Test: adb dumpsys meminfo
Fixes: 74534423
Change-Id: I3cb4a5927e8d6b20a7aeba3fda253f0ba4cc18f6
2018-03-27 16:30:07 -07:00
Yohei Yukawa
a754785cf9 Improve the JavaDoc for SOFT_INPUT_STATE_UNSPECIFIED
SOFT_INPUT_STATE_UNSPECIFIED is a tricky mode because its de facto
spec is that the system can do whatever it thinks valid.

Despite the fact that this is the default value for newly created
Windows, unfortunatelly there is no clear spec about what would happen
regarding whether the system thinks the software keyboard should be
shown or dismissed.

This CL doesn't change the behavior, but it just attempts to clarify
the behavior in JavaDoc.

Bug: 73793727
Bug: 77152727
Test: make -j doc-comment-check-doc
Change-Id: I69dab7c7018da89ba57fe2f5c8e718ef95985307
2018-03-27 15:47:45 -07:00
TreeHugger Robot
828ffa45a1 Merge "Recover dataset picker when view fail to autofill." into pi-dev 2018-03-27 19:48:44 +00:00
Felipe Leme
49f08edf7d Recover dataset picker when view fail to autofill.
When a dataset is selected, the framework tries to autofill all views belonging
to it. But if one (or more view) failed to autofill, we should let the user
recover by tapping the view again.

This scenario typically happens when views are recycled.

Test: atest MutableAutofillIdTest#testViewGoneDuringAutofillCanStillBeFilled
Test: atest CtsAutoFillServiceTestCases # manually retrying flaky failures

Fixes: 76149637

Change-Id: I7a6352c68b4a7d5e4cb80a7346c66efd831f21c8
2018-03-27 10:50:36 -07:00
Adrian Roos
87526af33c DisplayCutout: Fix attrs.xml javadoc
Fixes an issue with the javadoc for windowLayoutInDisplayCutoutMode.
Removes @tags from enum javadocs, because they get merged into a table,
which does not support inner @tags. Instead, use <code> tags which work
in that context.

Also replaces @see tags with {@link} tags in the attr javadoc, because
the enum value table gets appended, but it is invalid to have text after
an @see tag.

Change-Id: Ib97e9aa82e173d99a467132a0d403793d7297e61
Fixes: 76448223
Test: make doc-comment-check-docs, verify output at $ANDROID_BUILD_TOP/out/target/common/docs/doc-comment-check/reference/android/R.attr.html#windowLayoutInDisplayCutoutMode
2018-03-27 17:44:19 +02:00
Derek Sollenberger
7b837616ae Remove deprecated android.graphics.Canvas APIs
Bug: 73777445
Test: compile
Change-Id: Ie68f2fbe3c3be82f3c20529d535875d4cc204b7c
2018-03-27 14:36:50 +00:00
TreeHugger Robot
992d078542 Merge "Integrate autofill session lifecycle with URL bar changes when on compat mode." into pi-dev 2018-03-27 05:15:20 +00:00
Felipe Leme
0c8ce322a3 Integrate autofill session lifecycle with URL bar changes when on compat mode.
The contents of a browser URL bar is typically changed for 2 reasons:

1.User entered a new URL.
2.Form was submitted and the URL changed.

On scenario #1, the current session should be canceled, while on #2 it should be
committed. Scenario #2 is already handled when the service sets a SaveInfo, so
this CL handles the other cases:

1.Focus on URL bar is ignored so it does not trigger a new partition.
2.If URL bar changed and service didn't set a SaveInfo, the session is canceled.

Fixes: 76027553

Test: manual test with Chrome
Test: new tests on VirtualContainerActivityCompatModeTest:
      testFocusOnUrlBarIsIgnored()
      testUrlBarChangeIgnoredWhenServiceCanSave()
      testUrlBarChangeCancelsSessionWhenServiceCannotSave
      testUrlBarChangeCancelsSessionWhenServiceReturnsNullResponse
Test: atest CtsAutoFillServiceTestCases

Change-Id: I19d2aa4c8b25def0d5eca1c59cfdc2ffe33dd388
2018-03-26 11:55:31 -07:00
Evan Rosky
c4d58b8978 Restored focusableViewAvailable logic on visibility change
Since visibility effects children, it's state change should
report focusableViewAvailable even though it, itself, may
not be focusable.

Bug: 76027633
Test: CTS View_FocusHandlingTest
Change-Id: I83f949ec33bcac02e75e21727a120d3018d9382a
2018-03-26 10:54:43 -07:00
TreeHugger Robot
e3d2c41344 Merge "Fix SurfaceView Background" into pi-dev 2018-03-23 23:21:04 +00:00
TreeHugger Robot
352da45bbb Merge "Properly set input type on autofill compat mode." into pi-dev 2018-03-23 22:49:25 +00:00
Todd Kopriva
1057fc37f5 Merge "docs: fixing bug 36982027 and 30636712, typos" into oc-mr1-dev
am: 5b0a4eea8d

Change-Id: Iff4044c52e7ccdf6f7f879b9d5457ce1458b21bd
2018-03-23 22:11:38 +00:00
TreeHugger Robot
87f9818319 Merge "Added TestApi for default focus highlight" into pi-dev 2018-03-23 22:04:04 +00:00
Felipe Leme
c380e18e31 Properly set input type on autofill compat mode.
Test: atest CtsAutoFillServiceTestCases:android.autofillservice.cts.VirtualContainerActivityTest#testAutofillSync\
CtsAutoFillServiceTestCases:android.autofillservice.cts.VirtualContainerActivityCompatModeTest#testAutofillSync

Fixes: 76173462

Change-Id: Ie400ed5d4426febc34b02f68d6be4d86bc11034f
2018-03-23 14:04:23 -07:00
Robert Carr
386fd70434 Fix SurfaceView Background
When refactoring to not use global transaction when setting
position  I failed to account for the forwarding done by the
background wrapper.

Bug: 76099976
Bug: 76110573
Test: Manual. go/wm-smoke
Change-Id: I2cff8e571f12e69cefbd1ea35538fd71beaf1ec4
2018-03-23 13:48:48 -07:00
John Reck
6045d66aa2 Merge "Add isPivotSet/resetPivot" into pi-dev 2018-03-23 19:26:50 +00:00
Felipe Leme
63df4e248a Merge "Improved autofill logging and dumping." into pi-dev 2018-03-23 05:48:26 +00:00
Evan Rosky
e1a0b347a0 Added TestApi for default focus highlight
Bug: 62864111
Test: View_DefaultFocusHighlightTest
Change-Id: I2a74de3274351f0a7662715e723c25f4d7f8f6ed
2018-03-22 19:37:50 -07:00
Felipe Leme
da9ea34c02 Improved autofill logging and dumping.
Bug: 76027553
Test: adb shell dumpsys autofill

Change-Id: I19ef88c71334c62292ed982e43d7a7e89b35f10e
2018-03-22 16:43:28 -07:00