Commit Graph

9166 Commits

Author SHA1 Message Date
Andrii Kulian
6c7dcd8a46 Merge "Relayout window when rotated landscape <-> seascape" 2017-01-17 19:32:00 +00:00
Phil Weaver
0a78adea72 Merge "Provide hint text to accessibility." 2017-01-17 18:11:22 +00:00
Tadashi G. Takaoka
e12a6fff14 Add supportsDismissingSelfWindow attribute of IME
When a virtual keyboard is shown on some configurations (e.g. Phone),
the System UI may change the back navigation button to a different UI
element in order to dismiss the virtual keyboard. Such UI modification
is unnecessary when the virtual keyboard has a dismissing button on
its own window. This new attribute hints the System UI that the
virtual keyboard may have a UI element to dismiss itself. This will be
also useful for Tablet System UI which may not show a navigation bar
when a virtual keyboard is shown.

Bug: 34133139
Test: Add unit test InputMethodInfoTest
Change-Id: I0f6b130a7df57557e40b52a7b7ac00be965a17c3
2017-01-16 12:22:54 +09:00
Chris Craik
2553b92c0c Support shadows and reordering in ViewOverlay am: 36d9a6dfba
am: 2369a6d753

Change-Id: I1f6574a4b9a1d24ccd4fc78cbc7e3368d815f8f5
2017-01-14 00:35:02 +00:00
Chris Craik
2369a6d753 Support shadows and reordering in ViewOverlay
am: 36d9a6dfba

Change-Id: I1e7c33d68b5e2350b8b0ac589c46fdc250424b1a
2017-01-13 22:07:43 +00:00
Chris Craik
36d9a6dfba Support shadows and reordering in ViewOverlay
Bug: 32726440
Test: manual
Change-Id: Ic5d7efdee5a493b7768b9db8150f65f97b3f0a64
2017-01-12 19:17:19 -08:00
Andrii Kulian
b2e3780299 Relayout window when rotated landscape <-> seascape
When 180 degree rotation happens there is no real configuration
change, so an application window could miss an update, which
caused visual artifacts.
In this CL layout is forced when rotation changes.

Test: Unit tests in ag/1778638.
Bug: 33607506
Change-Id: Ia1e3375212bade9061d6e1d9679604e67c50da20
2017-01-13 01:28:18 +00:00
Robert Carr
6486d31dcb Expose SurfaceControl method to screenshot to GraphicBuffer.
A graphic buffer is most useful, as we can both attach it
to starting windows, and directly use it in Sys-UI. The old
codepath for starting windows/saved surfaces, is co-existing
at the moment, so I don't make large attempts to clean up
the existing screenshot code.

Bug: 31339431
Test: Manual test in combination with other branches
Change-Id: I562fdd5460dbce3201ba090272e8731850780f20
2017-01-12 11:16:34 -08:00
Jorim Jaggi
e2c77f9035 Handle content insets for snapshots
Pass information about content insets of a snapshotted task to
SystemUI and use it there to correctly offset the snapshot
when drawing.

Test: Open app, go to recents, make sure app aligns before
and after the animation.
Bug: 31339431
Change-Id: I2ff9bd44534bd8f66b591385da1e1e3aec40b6c5
2017-01-12 16:28:19 +01:00
Jorim Jaggi
02886a82d8 Initial implementation of snapshots
All this functionality is hidden behind a flag. If this flag is
active, we disable the regular screenshots.

Instead, we take a screenshot when an app transition for which a
task is disappearing is starting. The screenshot gets stored
into a gralloc buffer. SystemUI uses a new method to retrieve
a snapshot gralloc buffer and then draws it using GraphicBuffer.
createHardwareBitmap().

When starting an existing activity in an existing tasks, or when
bringing an existing tasks to front from recents, we add a new
snapshot starting window. For that, we reuse the existing
starting window, but when creating the window, we use a fake
window that draws the contents of the starting window.

Test: runtest frameworks-services -c
com.android.server.wm.TaskSnapshotControllerTest
Bug: 31339431
Change-Id: If72df07b3e56f30413db5029d0887b8c9665aaf4
2017-01-12 16:28:01 +01:00
TreeHugger Robot
393a954d5f Merge "API for setting default focus per cluster." 2017-01-12 04:19:16 +00:00
Vadim Tryshev
5ca739817d API for setting default focus per cluster.
UX spec requires us to allow apps to specify default focus per
cluster.

This change introduces a boolean attribute for Views to do so.

API is designed for cases when the view hierarchy is inflated,
manually constructed, as well as for hybrid scenarios.

The implementation piggybacks the recently introduced logic for
saving/restoring last focus in a cluster. To accommodate new needs,
the focus-saving were rename-generalized in this CL.

Bug: 32151632
Test: Manual checks; CTS are coming after feature freeze.
Change-Id: Ia92600c3a886db9a0d4df9dd9fd0e3479e68e7a4
2017-01-11 16:40:06 -08:00
Phil Weaver
9fa89381bf Merge "Add flag and listener for a11y volume requests." 2017-01-11 21:57:09 +00:00
Wale Ogunwale
e1fe7fa288 Added TaskWindowContainerController
For linking TaskRecord in AMS to Task window container in WMS.

Bug: 30060889
Test: bit FrameworksServicesTests:com.android.server.wm.AppWindowContainerControllerTests
Test: bit FrameworksServicesTests:com.android.server.wm.TaskWindowContainerControllerTests
Test: Existing test pass and manual testing.
Change-Id: I16248f3e96e5087ba24198a48a3bd10a12ae76a6
2017-01-11 09:19:35 -08:00
Phil Weaver
74bf350176 Merge "Accessibility support for ClickableSpan" 2017-01-11 16:42:29 +00:00
Jorim Jaggi
d8f2268e3c Merge "Clean up starting window to prepare for saved surfaces" 2017-01-11 14:58:50 +00:00
David Stevens
e97cac4962 Merge "Fix calculation of duration in AnimationSet" 2017-01-11 05:36:25 +00:00
TreeHugger Robot
5f1d1cf744 Merge "YAMAFFR - Yet Another Major AutoFill Framework Refactoring" 2017-01-11 04:20:01 +00:00
David Stevens
ab9e3b5369 Fix calculation of duration in AnimationSet
Unfortunately, AnimationSet.getDuration is defined incorrectly, so
this fix doesn't actually affect any behavior.

Test: None
Change-Id: I8328b603aee23252b5fab4acfd34d3f0e8fe06c0
2017-01-10 19:19:56 -08:00
Santos Cordon
f85ab8306f Add Brightness setting for VR Mode.
am: d6a5660a2c

Change-Id: If371f485471eb1ab0a3e07964c197cb9b8ef1c9f
2017-01-11 03:12:05 +00:00
Santos Cordon
e89ba5222c Merge "Add Brightness setting for VR Mode." 2017-01-11 03:02:02 +00:00
Santos Cordon
3107d29c8f Add Brightness setting for VR Mode.
This change saves and loads a different brightness setting when the user
goes in and out of VR Mode.

Test: runtests frameworks-core
Test: Turn vr mode on and change brightness (should remain separate from
normal brightness)

Bug: 30984614
Change-Id: If3c3e81b592e0c6fd037e5783559683e5cb58379
2017-01-10 17:16:04 -08:00
TreeHugger Robot
5df7f1ab61 Merge "Provide non-blocking SurfaceView draw notification path." 2017-01-10 22:16:19 +00:00
Tao Wu
a3c801bac4 Merge "Remove unused variable." am: f3b1881bb2 am: f338ed34f9
am: cab27fbbf4

Change-Id: I454d6359029bdbffa5e124e31759f30d6aec5f76
2017-01-10 21:39:19 +00:00
Tao Wu
cab27fbbf4 Merge "Remove unused variable." am: f3b1881bb2
am: f338ed34f9

Change-Id: Ia2ab8632bfe5e5b4751bb89aad30c3c739112469
2017-01-10 21:34:20 +00:00
Treehugger Robot
f3b1881bb2 Merge "Remove unused variable." 2017-01-10 21:15:02 +00:00
Felipe Leme
6d553874be YAMAFFR - Yet Another Major AutoFill Framework Refactoring
- Explicitly split View methods into Assist and AutoFill methods, rather
  than use an overloaded method that takes flags.
- Simarly, renamed ASSIST_FLAG_SANITIZED_TEXT and
  ASSIST_FLAG_NON_SANITIZED_TEXT flags to
  AUTO_FILL_FLAG_TYPE_FILL and AUTO_FILL_FLAG_TYPE_SAVE respectively.
- Created a AutoFillUI class to host the auto-fill bar and other UI
  affordances.
- Moved the temporary notifications to AutoFillUI (eventually that
  class will host the real UI).
- Moved FillData to android.app.view.autofill package.
- Split IAutoFillCallback in 2 (IAutoFillAppCallback and
  IAutoFillServerCallback, residing at the app and system_server
  respectively), so service cannot fill the app directly (which lets
  the framework control the UI).
- Moved assist's IResultReceiver to AutoFillServiceImpl so
  system_server can act as a mediator between the AutoFillService
  implementation and the app being auto-filled.
- Replaced FillData and FillableInputFields by a bunch of new objects:
  - FillResponse contains a group of Datasets, each representing
  different values
    that can be used to auto-fill an activity (for example, different
    user accounts), optional id of fields the service is interested
    to save, and an optional bundle for service-side extras.
  - Dataset contains a name, Fields, and an optional bundle for
    service-side extras.
  - Fields contain an AutoFillId (parcelable) and a value (Bundle)
- Changed the temporary notifications to emulate the new workflow:
  - Initial notification requests the auto-fill data but do not
    auto-fill.
  - Once service calls back, a new notification is shown with the
    results.
  - Then if the user selects a dataset, the activity is auto-filled
    with it.
  - It also shows a notification to emulate what can be saved.
- Created an VirtualViewDelegate for views that uses a virtual
  hierarchy for assist data.
- Added new methods on ViewStructure to add children with virtual ids.
- Added 2 methods on View to support auto-fill:
  - autoFill(Bundle) to auto-fill the view.
  - getAutoFillType() to return how the view can be auto-filled.
- AutoFillType defines the input fields that support auto-fill:
  - Text fields (like EditText)
  - Toggle fields (like CheckBox)
  - Lists (like RadioGroup)
- AutoFillType can also have a sub-type representing its semantic (for
  now only text fields have it, and it's the same as getInputType()).
- etc :-)

Bug: 31001899
Test: manual verification
Change-Id: I2dd2fdedcb3ecd1e4403f9c32fa644cb914e186f
2017-01-10 12:50:47 -08:00
Tao Wu
e68b7ca20c Remove unused variable.
Code search show nobody referenced it and aosp image still compiles after
remove it.

Test: make -j18 systemimage userdataimage ramdisk

Change-Id: I3e37ea590610091b938296c999dceb3caf919906
Merged-In: I3e37ea590610091b938296c999dceb3caf919906
Signed-off-by: Tao Wu <lepton@google.com>
2017-01-10 19:20:18 +00:00
John Reck
d14cafc272 Merge "Remove unused variable." 2017-01-10 18:36:30 +00:00
Chris Craik
6f225cae06 Merge "Revert "Revert "Fast-path for ViewGroup#invalidateChild, invalidate tests""" 2017-01-10 18:15:57 +00:00
Jorim Jaggi
ba41f4b9e3 Clean up starting window to prepare for saved surfaces
- Move all starting window logic to AppWindowContainerController
- Use startingView to hold any kind of contents for startingWindow
- Remove some conflicting code which looks very old and doesn't
apply anymore.

Test: Make sure starting window still works.

Bug: 31339431
Change-Id: I018dd013ab7e64a44932b6d54ae9bb4a47f315d3
2017-01-10 18:38:32 +01:00
Phil Weaver
193520e3df Accessibility support for ClickableSpan
Bug: 17726921
Test: Adding CTS tests for new behavior in linked CL.
Change-Id: Ifa85c309106d5ef29bb130edff9e2e0b88547a8f
2017-01-09 18:12:30 -08:00
Santos Cordon
d6a5660a2c Add Brightness setting for VR Mode.
This change saves and loads a different brightness setting when the user
goes in and out of VR Mode.

Bug: 30984614
Change-Id: If3c3e81b592e0c6fd037e5783559683e5cb58379
2017-01-09 17:33:14 -08:00
Eugene Susla
2ddcb077ac Merge "Unit test to keep a11y cache critical events up to date" 2017-01-09 22:59:39 +00:00
Tao Wu
f7fee94d75 Remove unused variable.
Code search show nobody referenced it and aosp image still compiles after
remove it.

Test: make -j18 systemimage userdataimage ramdisk

Change-Id: I3e37ea590610091b938296c999dceb3caf919906
Signed-off-by: Tao Wu <lepton@google.com>
2017-01-09 14:53:16 -08:00
TreeHugger Robot
e2489c67e1 Merge "Using official names for clusters and sections." 2017-01-09 20:25:45 +00:00
Robert Carr
25cfa13483 Provide non-blocking SurfaceView draw notification path.
SurfaceView needs to notify the window manager that
drawing has been completed, so that animations and such
can begin. Currently this is implemented through
having the SurfaceView user block in surfaceRedrawNeeded
(called from  UI thread) until a frame has been completed.
This blocking can be unnecessary serialization during startup, and
also clumsy to implement for some users.

Test: GLSurfaceView and takeSurface API Demos, android.server.cts.SurfaceViewTests
Bug: 31850030
Change-Id: Idda02098a635f25cf392f2d59a3abbe54a1d64d4
2017-01-09 10:44:58 -08:00
Chris Craik
3f06c6de08 Revert "Revert "Fast-path for ViewGroup#invalidateChild, invalidate tests""
Bug: 33797688

This reverts commit 1cb8b08ae4.

Change-Id: I322b550d65d48be4a99faf1790d138d26a996d7e
2017-01-09 18:30:35 +00:00
Chris Craik
2294458565 Merge "Fix NPE in RenderNodeAnimator ALPHA when used outside ViewPropertyAnimator" 2017-01-09 18:15:32 +00:00
Chris Craik
686d972e12 Fix NPE in RenderNodeAnimator ALPHA when used outside ViewPropertyAnimator
Bug: 33797688
Test: new RenderNodeAnimatorTest passes

Other clients use RenderNodeAnimator now, so call
ensureTransformationInfo to be safe.

Change-Id: I837d6f5b00bb368d2bbf77b94d4c19a8426b9927
2017-01-06 16:18:31 -08:00
Sergei Vasilinetc
ab08c65533 Merge changes I68d56d76,Iad432577
* changes:
  Hidden method to get a graphic buffer from a hardware bitmap
  Move GraphicBuffer to graphics package
2017-01-06 20:36:41 +00:00
Vadim Tryshev
311a5b5497 Using official names for clusters and sections.
Per the bug, “clusters” and “sections” are already the official names,
and for a general name for both, we use “keyboard navigation
groups”.

Bug: 33708251
Test: N/A.
Change-Id: Ieb1d2e8a1ad758f902b0a925fbe5d187e0f7ea06
2017-01-06 11:42:15 -08:00
Phil Weaver
4acc16d1b6 Add flag and listener for a11y volume requests.
We're adding a dedicated volume level for accessibility. Services
can use the new flag to request that this volume be activated for
accessibility usages.

To let AudioManager know when the request state changes, adding a
hidden convenience method to check if any active service requests
the a11y volume stream. This method can be used to enable the
stream and to decide when to show the UI to change its volume.

AudioManager wanted a listener for changes to this flag, so rather
than add yet another special-purpose listener, I've added one that
gets called back whenever there are state changes in a11y services.
These changes happen infrequently enough that we shouldn't need
more targeted methods.

Bug: 30448020
Bug: 27899567

Test: Adding CTS in linked CL.
Change-Id: Ifc53314dc7d9a6ee3d50b04ebcc1a87280cafa5e
2017-01-06 09:38:53 -08:00
Wale Ogunwale
26c0dfed7a Support for WindowContainer controllers and listeners
- WindowContainerController class allows a component outside window manager
to create a window container and communicate directly with it to make
changes. For example, the ActivityRecord class in activity manager uses the
AppWindowContainerController class to create and communicate with
AppWindowToken window container class which is its counterpart on the window
manager side.
- WindowContainerListener interface allows a component outside WM to get
notified of changes to a window container. For example, the ActivityRecord
class in AM implements the AppWindowContainerListener interface to get
notified of changes to the AppWindowToken container.

Bug: 30060889
Test: Existing tests pass and manual testing.
Test: bit FrameworksServicesTests:com.android.server.wm.WindowContainerControllerTests
Test: bit FrameworksServicesTests:com.android.server.wm.WindowContainerTests
Change-Id: I2896bfa46a80b227052528c7da8cf4e56beab4bc
2017-01-06 09:11:02 -08:00
Vladislav Kaznacheev
7039cbc6f3 Add content description and tooltip to menu item
Bug: 34076597
Test: manual
Change-Id: Ide32463252457721286c929ab2f8f7bae241835d
2017-01-05 09:57:40 -08:00
sergeyv
0a0f23163a Move GraphicBuffer to graphics package
Test: locally tested Bitmap.createHardwareBitmap method
bug: 30999911
Change-Id: Iad432577f26f2362ede9e77cd8a5425c010692e5
2017-01-04 14:01:52 -08:00
TreeHugger Robot
c587433dd1 Merge "Introducing teleportation between sections." 2017-01-04 20:43:44 +00:00
Eugene Susla
74c6cbaa63 Unit test to keep a11y cache critical events up to date
Unit test AccessibilityCache.CACHE_CRITICAL_EVENTS_MASK, introduced in Icbdb91803b646fa06aaf11996d350f6f65c1e809

Bug: b/32642665
Test: Ensure the introduced unit test passes
Change-Id: I60741c42334c61af8cd695e20c3a1f6be706824d
2017-01-04 11:45:08 -08:00
TreeHugger Robot
f2acf9df65 Merge "Fix custom pointer icon caching in ViewRootImpl" 2017-01-04 19:35:14 +00:00
Vadim Tryshev
8957f2ddda Introducing teleportation between sections.
The key combos differ from the ones in the spec because key combos
including Meta key don’t get delivered to apps. To fix this, I’ll
implement necessary plumbing after the feature freeze. Meanwhile,
temporary combos are used.

Given that the section and cluster teleportation have a lot in common,
I’m not introducing new methods, but adding a param to the cluster
teleportation ones. I should have also changed the names to something
like findNextKeyboardNavigationCluster => findNextFocusGroup, where
“FocusGroup” is a generalized name for clusters and sections.
However, that name depends on b/33708251, so I’m not doing it now. I
don’t rename existing identifiers, and using “focusGroup” for new
ones. Admittedly, this creates mess that will be resolved based on
the outcome of the mentioned bug.

Bug: 32151632
Test: Manual checks; CTS are coming after feature freeze
Change-Id: I01b5d6e5a9689b8f643fa4af695d2ce61265f374
2017-01-03 18:18:36 -08:00