Commit Graph

10725 Commits

Author SHA1 Message Date
TreeHugger Robot
a2ade1b151 Merge "Fixing incorrect doc string" 2018-01-18 11:55:35 +00:00
Jan Althaus
1331068084 Fixing incorrect doc string
Test: N/A
Change-Id: I718c44902c44097b5883fd1f204ef66279b5cca4
2018-01-18 10:50:32 +01:00
Jorim Jaggi
1f2acb9a16 Merge "Add ability to register remote animation definitions per activity" 2018-01-18 00:17:26 +00:00
Dake Gu
d4356fdf4b Merge "autofill: support dpad/keyboard" 2018-01-18 00:14:36 +00:00
TreeHugger Robot
7500ef14c9 Merge "Fix API review javadoc issues in TextView/ExtractedText" 2018-01-17 23:35:50 +00:00
Dake Gu
67decfa7f8 autofill: support dpad/keyboard
To make autofill works on non-touch device such as TV, allow
fill ui window to gain window focus. Fill ui window does not
need IME. When IME and fill ui window are both shown, fill ui
window will intercept keyevent before IME.

Since autofill window will steal window focus from app window,
we no longer uses View.onWindowFocused() for enter/exit event.
Switched to use Activity onResume/onPause. When view
notifyViewEntered or notifyViewExited called when Activity is paused,
it will be ignored. Before Activity goes to pause state,
notifyViewExited() is fired on focus view, after Activity leaves
pause state, notifyViewEntered() is fired on focus view.

In CTS testDatasetAuthTwoFieldsUserCancelsFirstAttempt,  the
authentication activity finishes itself in onCreate() which will not
produce onPause/onResume in app activity, but it will produce window
focus loss/gain event. Since we switch from window focus to activity
onResume/onPause, we will be missing a show fill ui when return from
the never shown authentication activity. To solve this problem,
we added special code when receive ActivityResult from authentication
activity where we check if the authenticate activity never causes
onStop event, where we should issue an extra ACTION_VIEW_ENTERED
event to show fill ui.

Test: passed all existing autofilltest CTS on sailfish
      atest CtsAutoFillServiceTestCases
Bug: 70181616

Change-Id: Iafe4dca3be8f049fa6dfd34bac13ccb030c583b6
2018-01-17 14:42:16 -08:00
Jorim Jaggi
f84e2f60fe Add ability to register remote animation definitions per activity
This introduces a more stable way of setting a remote animation
than using overridePendingTransition: An activity can register
a set of remote animations which is broke down by transition type.
Whenever the activity is involved into such a transition, the
remote animation will be started.

Remote animations take precedence over regular animations, and
prefixOrderIndex in the hierarchy decides precedence within
multiple apps that set remote animation definitions such that
higher apps override lower apps.

Bug: 64674361
Test: go/wm-smoke
Test: Use with launcher
Change-Id: Id300ff62d9f60966ea2609168f6a02860b3de7af
2018-01-17 22:00:37 +01:00
Evan Rosky
e5518510e5 Merge "Enable new initial-focus behavior for P" 2018-01-17 20:56:24 +00:00
Jorim Jaggi
7e269fca40 Merge changes from topic "remote_animations"
* changes:
  Remote animations (app-controlled animations)
  Defer hiding clients until animation is done
2018-01-17 15:59:52 +00:00
Jorim Jaggi
33a701a55c Remote animations (app-controlled animations)
Adds the ability for another app to control an entire app
transition. It does so by creating an ActivityOptions object that
contains a RemoteAnimationAdapter object that describes how the
animation should be run: Along of some meta-data, this object
contains a callback that gets invoked from WM when the transition
is ready to be started.

Window manager supplies a list of RemoteAnimationApps into the
callback. Each app contains information about the app as well as
the animation leash. The controlling app can modify the leash like
any other surface, including the possibility to synchronize
updating the leash's surface properties with a frame to be drawn
using the Transaction.deferUntil API.

When the animation is done, the app can invoke the finished
callback to get WM out of the animating state, which will also
clean up any closing apps.

We use a timeout of 2000ms such that a buggy controlling app can
not break window manager forever (duration subject to change).

Test: go/wm-smoke
Test: RemoteAnimationControllerTest

Bug: 64674361
Change-Id: I34e0c9a91b28badebac74896f95c6390f1b947ab
2018-01-17 15:12:19 +01:00
TreeHugger Robot
9051eda805 Merge "WindowAttributes: Remove flags2" 2018-01-17 13:23:40 +00:00
Clara Bayarri
e0f35eea46 Fix API review javadoc issues in TextView/ExtractedText
Bug: 71555183, 71555182
Test: none, javadoc
Change-Id: I98d5d53f0cd4873d637b454bbc313b50fe2ca811
2018-01-17 12:17:53 +00:00
Phil Weaver
d63a259aa9 Merge "Additional behavior for a11y panes" 2018-01-17 05:44:16 +00:00
TreeHugger Robot
aea5cfe8c3 Merge "Beginning implementation of quickscrub (1/3)" 2018-01-16 21:59:43 +00:00
TreeHugger Robot
020b579dd4 Merge "DisplayCutout: LayoutInDisplayCutoutMode API" 2018-01-16 19:58:17 +00:00
Phil Weaver
e0f9bad42c Additional behavior for a11y panes
Content changes to panes are reported as window
state changes.

Changes to aggregated visibility are also reported
as window state changes.

Window state changes can now have content change
types.

Bug: 37479815
Test: Adding CTS tests in linked CL.
Change-Id: I35ef946398cac869b0f736708cb39ae96ab3ddb7
2018-01-16 10:34:31 -08:00
Adrian Roos
1002b03e52 WindowAttributes: Remove flags2
Bug: 65689439
Test: m check-api && m checkbuild
Change-Id: Iccaa16bb50d547b2fc713bfd6752fc611d780a23
2018-01-16 18:05:00 +01:00
Adrian Roos
fa02da6250 DisplayCutout: LayoutInDisplayCutoutMode API
Replace the FLAG2_LAYOUT_IN_DISPLAY_CUTOUT flag with a
dedicated layoutInDisplayCutout field; given the change
in behavior of SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN with respect
to the display cutout, apps that request this now also need
a way to request the same behavior as FLAG_FULLSCREEN.

Broadly, there's three categories of apps:

1) Apps that want to make dedicated use of the cutout
   area -> no letterbox ever

2a) Apps that hide the status bar, but don't expect the
    cutout to be there cutting into their content
    -> we want those to get letterboxed

 b) Some apps may only be transiently fullscreen, but always
    want to get letterboxed
     -> we want those to get letterboxed even if not currently
        fullscreen

3) Apps that never go fullscreen, and just draw the status
   bar background in the cutout area (i.e. the most common type
   of app)
   -> these need to get letterboxed whenever the cutout and
      status bar don't coincide (under our current guidelines
      that's only in fullscreen and landscape)

To cover each use case, we have:

ALWAYS: Always allow the app to draw into the cutout, never letterbox it; covers 1
NEVER: Never allow the app to draw into the cutout, always letterbox it; covers 2a and 2b
DEFAULT: Allow the app to draw into the cutout if that area is covered by the status bar
         anyways. This does the right thing for most existing apps (2a and 3).

Bug: 65689439
Test: atest PhoneWindowManagerLayoutTest
Change-Id: Ib8d551251e9be4ef9d580ca2151bf40a9678acae
2018-01-16 17:56:32 +01:00
TreeHugger Robot
4ae9eacc84 Merge "Unhide InputMethodService#requestShowSelf()" 2018-01-16 16:10:53 +00:00
Yohei Yukawa
fbc2f7acd5 Unhide InputMethodService#requestShowSelf()
This is a follow up CL to a recent CL [1], which aimed to move several
APIs only for InputMethodService from InputMethodManager to
InputMethodService.

This CL removes InputMethodService#hideSoftInputFromInputMethod(),
which is exactly the same as InputMethodService#requestHideSelf() that
is already available as a public API for IME developers.

This CL also virtually renames
InputMethodService#showSoftInputFromInputMethod() to
InputMethodService#requestShowSelf(), which has existed as a
private method but not been exposed to IME developers yet.

 [1]: I3163f3cbe557c85103ca287bee0874a3b4194032
      d8d03a8e1b

Bug: 70282603
Test: atest CtsInputMethodTestCases
Change-Id: If6a786c5774805d041ea9672ef2721e4a38df7fc
2018-01-16 08:09:11 -08:00
Yohei Yukawa
7a8c9aaad8 Add missing @Override when {@inheritDoc} exists
Otherwise, Checkstyle keeps nagging us with the following lint warning
whenever we touch the lines around them.

  Must include @java.lang.Override annotation when {@inheritDoc}
  Javadoc tag exists.

This CL also re-format the license header just to make Checkstyle
happy.

This is purely a no-op style change. There must be no behavior change.

Test: prebuilts/checkstyle/checkstyle.py -f frameworks/base/core/java/android/view/inputmethod/InputConnectionWrapper.java
Change-Id: I3d7cef4e6c1407a6c6d8ee75c0d8b75943d8701c
2018-01-15 19:43:38 -08:00
Yohei Yukawa
77efd914b5 Remove unnecessary qualifiers from InputConnection
Otherwise, Checkstyle keeps nagging us whenever we touch lines around
them.

This CL also re-formats the license header and keep all the lines
within 100 colmun just to make Checkstyle happy.

This is purely a no-op style change. There must be no behavior change.

Test: prebuilts/checkstyle/checkstyle.py -f frameworks/base/core/java/android/view/inputmethod/InputConnection.java
Change-Id: Ie0f43f545d8056884c5d20a601d0a501187062c7
2018-01-15 19:43:27 -08:00
Richard Ledley
9cfa60673a Add flag to control smart linkify.
Test: manual

Change-Id: If72f031b37ed313828d97d500af587bed6e8383b
2018-01-15 13:14:06 +00:00
TreeHugger Robot
1f31d9a8dd Merge "Making TextClassifier helper objects parcelable" 2018-01-15 11:26:06 +00:00
Yohei Yukawa
623e94b857 Use lambda when appropriate
This is a safe refactoring that should have no behavior change in
terms of semantics and performance characteristics.

Test: make -j checkbuild
Change-Id: I30b40c483e490ff42c1c707233ca5cc7b67da28f
2018-01-14 16:30:59 -08:00
Yohei Yukawa
b2a0e0509a Fix JavaDoc errors
Test: make -j checkbuild
Change-Id: Id68ebd3588cd286c821da49e3bda4299d311e8b9
2018-01-14 16:06:16 -08:00
Lucas Dupin
e1daf52b92 Merge "Allow custom keyguard "prompt reason"" 2018-01-13 01:13:26 +00:00
TreeHugger Robot
2d0a8c0248 Merge "Remove @hide for KEYCODE_ALL_APPS" 2018-01-13 00:41:56 +00:00
Evan Rosky
bdc66cb5a0 Enable new initial-focus behavior for P
This means that, by default, nothing gets initial focus
in touch-mode.

In order to have something focused in touch mode at
activity start, an app must explicitly provide a
<requestFocus /> tag. Since this tag uses the "default"
focus mechanism, it can be placed in a parent and focus
will go to whatever view is the default focusable in
that hierarchy.

This takes effect for targetApi >= P

Bug: 34520588
Test: Added CTS tests in View_InitialFocusTest
Change-Id: I74839bb86079558eaa5c96de52220a7d2c47d901
2018-01-12 12:58:42 -08:00
Matthew Ng
a8f2426df6 Beginning implementation of quickscrub (1/3)
When enabled via launcher, the home button is able to be be pulled to
the right side to send events to launcher via binder calls of when the
quick scrub operation starts, ends and progress changes between each
interval. Launcher will use this information to determine how the
recents apps are laid out with vibration feedback.

When the home button is pulled and released under 150ms, quick switch
will occur. A binder call will tell launcher to switch to the previous
app used.

While quick scrub or switch is active, launcher will not get any nav
bar motion events, only events for quick scrub and switch.

Bug: 67957962
Bug: 70180755
Test: enable new experience via launcher settings
Change-Id: I344f5d67f259ff454205ea4d2e95140f783d3b5c
2018-01-12 12:24:03 -08:00
Jan Althaus
0d9fbb9bd1 Making TextClassifier helper objects parcelable
- EntityConfidence is no longer generic because it doesn't mix well with
  being Parcelable.
- Deprecated OnClick listeners in TextClassification as they can't be
  parceled. (Outright removed the secondary listeners that were not part
  of any release)
- Classes that were present in previous releases have their parceling
  factored out into ParcelableWrapper helper classes for backwards
  compatibility.

Bug: 67609167
Test: Added
Change-Id: I820ca4abc6b80f90007ab4424bc5df2a14f797b0
2018-01-12 17:53:07 +01:00
Eugene Susla
c9f5091a2c Fix for bad merge between ag/2455811 and ag/3424187
Test: presubmit
Change-Id: Ib0b5d54cf94e2998eeb661fc57e9d0bfb2e1afdc
2018-01-11 16:03:34 -08:00
TreeHugger Robot
0b2249786f Merge "Move A11y events throttling away from View(RootImpl)" 2018-01-11 22:57:35 +00:00
Sujith Ramakrishnan
d2c9bc8304 Remove @hide for KEYCODE_ALL_APPS
- KEYCODE_ALL_APPS which was introduced late in O is now a
      proper & valid keycode in P

Bug: 64935695
Test: Manual: ALL_APPS: adb shell input keyevent 284
Test: also tested with --longpress for these keys

Change-Id: If56c5b87f88e927c52468485b790581fa19ad48b
2018-01-11 13:45:48 -08:00
Phil Weaver
ce35097eb6 Merge "A11y support for titles of "panes"" 2018-01-11 21:36:44 +00:00
Lucas Dupin
c80c67e7bc Allow custom keyguard "prompt reason"
Adds the possibility of presenting a custom message on
the keyboard if you're trying to dismiss the keyguard.

This is particularly useful when you're showing the
bouncer because custom authentication (SmarLock)
failed.

Test: launch FLAG_SHOW_WHEN_LOCKED activity and
      call KeyguardManager#requestDismissKeyguard
Fixes: 63940122
Change-Id: I0d88c0e59521887efa56d74874062b2b14970e4e
2018-01-11 13:15:31 -08:00
TreeHugger Robot
32308613b5 Merge "Concise toString for A11yEvent" 2018-01-11 20:38:49 +00:00
Phil Weaver
9f26b3de4c A11y support for titles of "panes"
Panes are a distinct portion of a window. Adding APIs to
support this concept.

Bug: 62231686
Test: Adding a new CTS test to verify that this value is
communicated properly to accessibility services.

Change-Id: I6edd08ec90e40640e71f5a3df292e8f15d5bcda4
2018-01-11 09:50:31 -08:00
TreeHugger Robot
d396b28c20 Merge "Dispatch DisplayCutout from DisplayAdapter" 2018-01-11 16:36:31 +00:00
TreeHugger Robot
a28ed766c4 Merge "Add WindowContainer proto definitions" 2018-01-11 15:30:00 +00:00
Adrian Roos
1cf585059c Dispatch DisplayCutout from DisplayAdapter
Adds a config resource to configure the main display's cutout and
dispatches it from the LocalDisplayAdapter.

WindowManager's DisplayContent then transforms it to match the current
rotation.

Also fixes an issue in EmulatedDisplayCutout where the Path was never
reset and changes the color to black. Also fixes the RoundedCorners
overlay such that it can layout within the cutout area.

Test: atest CoordinateTransformsTest DisplayContentTests
Bug: 65689439
Change-Id: If39c8ea3cb55c761517f270dcca292682c0918ad
2018-01-11 15:43:05 +01:00
TreeHugger Robot
e6050a4a0f Merge changes from topic "messaging_people"
* changes:
  Clipping to the top roundness when scrolling
  Made the notification side paddings consistent
  Changing messaging style and overall visual adoption
  Improved the MessagingStyle API with Person
  Added People to the Notification API
2018-01-11 03:07:09 +00:00
Eugene Susla
1abf48e8c0 Concise toString for A11yEvent
I found A11yEvents hard to parse in logs as they take ~3 lines on my
30" monitor, most of which denoting fields that rarely differ from default.

This CL adds an opt-in debug flag to not print default-valued fields, which
dramatically cuts down the noise when trying to parse logs.

Test: enable DEBUG in A11yManager, and observe logcat
Change-Id: I979200194ee3597c1a8501195437b4d4b8e21514
2018-01-10 17:35:37 -08:00
Selim Cinek
afeed29bdc Changing messaging style and overall visual adoption
The messaging style is changed to a bubble-less design.
In addition are we also updating a few spacings in
order for it to look nicer / more balanced.

Test: manual
Change-Id: I43326bd8a23cd1f1d5964d2d6740fde99d29c7e4
2018-01-10 20:14:03 +00:00
Vishnu Nair
04ab439865 Add WindowContainer proto definitions
Bug: 64831661
Test: verified proto dump from winscope
Change-Id: Id4d595a58f4ce0ce1891b3731ecbb5ce9b938006
2018-01-10 11:00:06 -08:00
Vishnu Nair
91e028dc9d Merge "Add window tracing functions to WindowMangerService" 2018-01-10 17:50:48 +00:00
TreeHugger Robot
381752d1c1 Merge "Lower FSP on window animation too" 2018-01-09 22:37:32 +00:00
Eugene Susla
e4d31b3c10 Move A11y events throttling away from View(RootImpl)
..and also extract common code into a common superclass

This also preserves the order of the throttled events
(TYPE_VIEW_SCROLLED & TYPE_WINDOW_CONTENT_CHANGED) with regards to the rest
of events by flushing any pending throttled events immediately if another
event is requested to be sent.

Test: ensure no new a11y CTS failures
Change-Id: I948a16716521974393aaa1cf822d0a0324e9ce3a
2018-01-09 13:28:59 -08:00
Eino-Ville Talvala
190e388ffe Merge "Camera2: Add MOTION_TRACKING capability/intent, and lens poseReference" 2018-01-09 21:08:00 +00:00
Makoto Onuki
b708cbe2b6 Lower FSP on window animation too
Test: manual test with setprop debug.hwui.fps_divisor 4
Bug: 66945974
Change-Id: I4b637ed30003a9eae008b093f9e3d8b2a2f09319
2018-01-09 12:40:35 -08:00