Commit Graph

9080 Commits

Author SHA1 Message Date
TreeHugger Robot
d047116fad Merge "Remove unnecessary shadow damage calc in invalidate" 2016-12-15 02:43:05 +00:00
Chris Craik
8fb56d0272 Remove unnecessary shadow damage calc in invalidate
Test: builds, boots

Work already done in native, via RenderNode::damageSelf and
RenderProperties::getClipDamageToBounds.

Change-Id: Id96d00d58d61c629dabba49dde3bef1c7b079e89
2016-12-14 16:05:49 -08:00
TreeHugger Robot
7198ca863e Merge "Fix merge for OnDrawListener" 2016-12-14 20:12:35 +00:00
Phil Weaver
9a14b56b60 Merge "Add null check to a11y interrupt." 2016-12-14 18:49:30 +00:00
Vadim Tryshev
ce3264dac7 Adding public API for marking nodes as clusters and sections.
Clusters:
We need clusters to limit the size of the “tab loop” by
widgets related to the current context: working in the
app’s client area, choosing a command in the action bar
etc.

Clusters are a generalization of the current action bar’s
behavior.
An activity can have several clusters.
A cluster is a view or a view group group marked as such.
Pressing Tab loops inside the cluster, but you can exit it via
arrows.
You can teleport between clusters via special key combos.

Sections:
Sections live inside clusters.
They are needed for simplifying navigation in complex
hierarchies: instead of tabbing or arrowing, you can simply
teleport to the the next/previous section by pressing a
special key combo.
Example: think about panes in GMail app or dir/files
panels in a file manager.

Otherwise, sections are normal view groups: for example,
they don’t limit keyboard navigation in any way.

Bug: 32151632
Test: Checking for syntax errors and that Android starts.
Change-Id: Ic78495d0749db65d5177017553d37f870354c6bc
2016-12-13 11:10:51 -08:00
TreeHugger Robot
d4f08a007d Merge "AutoFill Framework refactoring." 2016-12-13 04:05:51 +00:00
Felipe Leme
1ca634a544 AutoFill Framework refactoring.
The AutoFill Framework uses the same AssitStructure provided by the Assist API
and so far it was using the same methods as well, both internally and externally
(public API).

Sharing that internal code internally is fine, but the public APIs must distinguish between the 2 cases so they can fill the assist structures accordingly (although the initial implementation still shares the same logic).

This CL also splits the original 'auto-fill' request in 2 types of requests,
which are set by View flags:

- ASSIST_FLAG_SANITIZED_TEXT
- ASSIST_FLAG_NON_SANITIZED_TEXT

It also added new methods and callbacks to handle save requests.

Bug: 31001899
Test: manual verification

Change-Id:  I4eb09099dc19a43cb7e053e64d939aed3704b410
2016-12-12 18:22:45 -08:00
Wale Ogunwale
72919d2c31 Untangle creation of Task from addition of AppToken in WM.
Makes it easier to follow what is going on and also clean-up in
preparation of stand way for AM to interact with containers in WM.

Test: Existing tests pass and manual testing
Change-Id: I91754b6d974dce2f696453cdaed175efb0f10c73
2016-12-12 15:09:03 -08:00
John Reck
9f8ec54244 Fix merge for OnDrawListener
Test: CTS tests for PixelCopy pass; without this
they time out as they never get the OnDraw call.

Change-Id: I6acced4699182b969f38a606a1314b2ffb38d760
2016-12-12 11:23:05 -08:00
Jorim Jaggi
40db029cfe Light navigation bar support (1/2)
Test: Open an app that has this flag set.

Test: android.systemui.cts.LightBarTests

Bug: 29058491
Change-Id: Idaff65fdd5c59b68ae9920726c9ea50b53f96675
2016-12-08 13:52:41 -08:00
Mark Renouf
cb566f368b Revert "Allow power button to close an input method" am: 28f0e5bf48
am: fc526f6e84

Change-Id: Ifcf2f842c91677128e458dd7256013263543937f
2016-12-07 17:38:13 +00:00
Mark Renouf
fc526f6e84 Revert "Allow power button to close an input method"
am: 28f0e5bf48

Change-Id: I678857531259617cc26941fcc832cb7670d25bfe
2016-12-07 17:29:25 +00:00
Mark Renouf
28f0e5bf48 Revert "Allow power button to close an input method"
This reverts commit d28e907183.
Test: manually tested

BUG: 33038203
Change-Id: I7a4c6e95a69abb2e40df73509b6e67b93eacf6ff
2016-12-06 17:43:28 +00:00
Ned Burns
df1710dc6e Modify SwipeDismissLayout to perform its own exit animation am: 7d6cb913de am: f9566827f2
am: 768f62aac1

Change-Id: Ibe1a8b9a7cf71b715ae7d4e0157b5cdf1d52e81d
2016-12-06 02:48:01 +00:00
Ned Burns
768f62aac1 Modify SwipeDismissLayout to perform its own exit animation am: 7d6cb913de
am: f9566827f2

Change-Id: I157e10afa6b8c0414c2af25d98bf5913928925f2
2016-12-06 02:38:47 +00:00
Ned Burns
7d6cb913de Modify SwipeDismissLayout to perform its own exit animation
Instead of relying on the window animation system, in the special
case of a swipe-dismiss, disable any default window exit animation
and perform a custom animation. This bypasses some bugs in the
window animator codebase and allows us to have a nice "rebound"
animation if the user doesn't swipe far/fast enough to trigger a
dismiss.

Bug: 33041168
Change-Id: Ied45700d35a59950bacef1ba0650eaa5bc60fadb
2016-12-05 19:38:14 -05:00
Phil Weaver
867ad35d9c Add null check to a11y interrupt.
Also adding same robustness to interrupt that we have for
sending a11y events.

Bug: 32507871

Test: Ran a11y CTS. Verified manually with sample app
that sends interrupt and accessibility service that
crashes when started. That case used to crash the
app, and doesn't anymore.
Change-Id: I5cf05dcbb54ea23ae876cb3258dd206c55dce775
2016-12-05 14:57:48 -08:00
Michael Kwan
319cfe16f1 Disable swipe-to-dismiss for not cancelable dialogs. am: f7964be938 am: 85ba660b16
am: 1805ba1d76

Change-Id: I23863328b64f95915a7ecb7ceb35448bc10bdfbe
2016-12-05 18:21:14 +00:00
Michael Kwan
85ba660b16 Disable swipe-to-dismiss for not cancelable dialogs.
am: f7964be938

Change-Id: I6d71bb4c6acdc9d994766eebd7a6320356aa3a23
2016-12-05 18:09:10 +00:00
Jorim Jaggi
6aa763bbed Merge "Deprecate FLAG_DISMISS_KEYGUARD" 2016-12-05 10:43:50 +00:00
Michael Kwan
f7964be938 Disable swipe-to-dismiss for not cancelable dialogs.
Bug: 33249829
Change-Id: Ib3d2c9982ece22d1b080b821eaf306f6b686d099
2016-12-02 17:33:56 -08:00
TreeHugger Robot
e9bf7c8436 Merge "Introduce PathInterpolator to native animators" 2016-12-01 20:21:13 +00:00
Mark Renouf
cf952e74b0 Allow power button to close an input method am: d28e907183 am: 8da4ced46c
am: 9a21708ec6

Change-Id: I63d939d4dbd889cbd6f83ef101d817ccd561d707
2016-12-01 01:41:56 +00:00
Mark Renouf
8da4ced46c Allow power button to close an input method
am: d28e907183

Change-Id: I0324d14bde85e3461d0fe605f3b83496b25b9c75
2016-12-01 01:29:11 +00:00
Doris Liu
9e9eeeeb78 Introduce PathInterpolator to native animators
For interpolators defined with a path, PathInterpolator is more accurate
and likely less costly for longer animations than what are currently
using as a substiute - LUTInterpolator.

Test: manual test and added a unit test
BUG: 32830741
Change-Id: I867c7a28e4261392cce9c45a2992ab4fd120c496
2016-11-30 16:03:23 -08:00
Chet Haase
a8ba43d288 Merge "Add layout_marginHorizontal|Vertical attributes" 2016-11-30 23:05:31 +00:00
Mark Renouf
d28e907183 Allow power button to close an input method
BUG: 33038203
Change-Id: I5c44dc49db6b960b4e3e42545bfbbab62f357f08
2016-11-30 16:01:42 -05:00
Sergei Vasilinetc
c1e6a12ab5 Merge "Add createHardwareBitmap on GraphicBuffer for SysUI" 2016-11-30 20:53:43 +00:00
sergeyv
9a02987642 Add createHardwareBitmap on GraphicBuffer for SysUI
Test: none
bug:30999911
Change-Id: Ic396e25d9e587665e634c3192e14ef4bc3dc78f7
2016-11-30 10:47:12 -08:00
Chet Haase
40b2de5d1c Add layout_marginHorizontal|Vertical attributes
These two new attributes are a short-hand way for specifying the
separate left/right (or start/end) and top/bottom margin attributes.
It is common to use the same margin on both edges, so these new
attributes make that common case easier and less verbose.

Issue: 30261490 Better way to define paddingTop/Bottom/Left/Right in XML if vertical paddings are the same and horizontal paddings are the same
Test: new CTS test in ViewGroup_MarginLayoutParamsTest
Change-Id: I183ace956892187b6ea086e61ed5b195c8903d7d
2016-11-30 07:39:57 -08:00
TreeHugger Robot
d25cf04e98 Merge "Add explicit method to dismiss Keyguard" 2016-11-29 14:30:46 +00:00
Selim Cinek
0ec10ac7cf Merge changes from topic 'dyson'
* changes:
  Improved the transformation to an icon further
  Fixed a bug where the last notification could be invisible / faded
  Adapted the shelf color when transitioning
  Fully removed the bottom stack
  Fixed a bug where the first notification was cut off
  Fixed a a bug where clear all was invisible
  Fixed a flicker when expanding quicksettings on the lockscreen
  Added appear and disappear animations for the shelf icons
  Implemented a nicer transition when the icons overflow
  Added the possibility to animate X and refactoring
  Modified heads up experience
  Fixed a bug with not-gone notifications
  Adapted the animation to the full shade
  Fixed the lockscreen positon with a single notificaton
  Made heads up work again
  Fixed the transformation into the shelf
  Used different curve for the icons when expanding
  Refactored the stack animation logic
  Refactored shelf transformation code to support animations
  Improved the transition into the statusbar
  Adapted the icon transformation into the shelf
  Fixed the appearance of the shelf on the lockscreen
  Introduced the Notification shelf
  Refactored the viewstates for more modularity
2016-11-29 00:29:01 +00:00
Jorim Jaggi
0796187e95 Deprecate FLAG_DISMISS_KEYGUARD
Since we now have an explicit dismiss method the flag is only
dangerous for falsing. The behavior will be migrated in the
following way:

- Insecure: Treat as FLAG_SHOW_WHEN_LOCKED
- Trusted: Actually dismiss Keyguard.
- Secure: Show bouncer.

We also restore the behavior to not allow dismissing the Keyguard
while it is occluded, which was the case in Nougat.

Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test
android.server.cts.KeyguardTests

Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test
android.server.cts.KeyguardLockedTests

Test: Insecure: Launch FLAG_DISMISS_KEYGUARD activity, make sure
Keyguard is occluded.

Test: Secure: Launch FLAG_DISMISS_KEYGUARD from SHOW_WHEN_LOCKED, make
sure bouncer is shown.

Test: Trusted: Launch FLAG_DISMISS_KEYGUARD from SHOW_WHEN_LOCKED, make
sure Keyguard gets unlocked.

Test: Trusted: Launch FLAG_DISMISS_KEYGUARD, lock screen, make sure
Keyguard is not dismissed/occluded.

Change-Id: I0d1ec9397a83975adb065c6cb81bf23b08c55395
2016-11-23 17:35:32 +01:00
Jorim Jaggi
241ae10b21 Add explicit method to dismiss Keyguard
The flag is a bit clunky for most cases, and a method is more
clear.

Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test
android.server.cts.KeyguardTests

Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test
android.server.cts.KeyguardLockedTests

Test: runtest systemui -c
com.android.systemui.keyguard.DismissCallbackRegistryTest

Bug: 30961403
Bug: 27422134
Change-Id: I39de90c7cfecd99350a74f72cd76418e337f2b79
2016-11-23 16:27:35 +01:00
Baligh Uddin
b1df48d326 Merge remote-tracking branch 'goog/cw-f-dev' into fix_merger
Bug: 32849428

* goog/cw-f-dev: (98 commits)
  Revert "Catch KeyStoreException for setting profile lock"
  Fix createConfirmDeviceCredentialIntent for wear for CTS.
  Fix default dialog background colour for watch devices.
  Catch KeyStoreException for setting profile lock
  Add cross-links between FINE and COARSE location permissions. bug: 25371600
  Fixed a bug with the emergency affordance in multi user
  Zygote: Additional whitelists for runtime overlay / other static resources.
  Import translations. DO NOT MERGE
  Import translations. DO NOT MERGE
  Import translations. DO NOT MERGE
  Import translations. DO NOT MERGE
  Import translations. DO NOT MERGE
  Import translations. DO NOT MERGE
  Import translations. DO NOT MERGE
  Zygote : Block SIGCHLD during fork.
  colors: add missing accent_material_{700,50} resources.
  Import translations. DO NOT MERGE
  Import translations. DO NOT MERGE
  Zygote : Block SIGCHLD during fork.
  DO NOT MERGE ANYWHERE Revert "DO NOT MERGE ANYWHERE libhwui: make setSurface asynchronous"
  ...

Change-Id: I63468da5bfa21ed9ac5985bbdbf3a61d4c389aa0
2016-11-22 17:19:45 -08:00
Vladislav Kaznacheev
f847ee3c3d Implement tooltip support in View
Adding View.setTooltip/getTooltip and 'tooltip' layout attribute.
Following Material Design spec for styles and behavior.

Bug: 31515376
Test:  cts-tradefed run singleCommand cts -m CtsViewTestCases
  --test android.view.cts.TooltipTest

Change-Id: I2d2527f642cd7446ffc88d4beffc7b81d7a2f6d6
2016-11-22 09:32:07 -08:00
Selim Cinek
0242fbb9fd Adapted the icon transformation into the shelf
The transformation is now more refined.

Test: Add notifications, scroll
Bug: 32437839
Change-Id: I2d553b2305fae508d2eb94ca4cee18faa41815a1
2016-11-21 14:33:44 -08:00
Selim Cinek
281c202784 Introduced the Notification shelf
Started the implementation of a new notification
scrolling model that dynamically transforms notifications
into a new icon shelf.

Test: Add notifications, scroll!
Bug: 32437839
Change-Id: Ic28cc1c82f2cda2ffa7a312648903b5bc2408820
2016-11-21 14:33:40 -08:00
TreeHugger Robot
0d11dc0cbb Merge "Switch back to NativeAllocationRegistry" 2016-11-17 01:20:33 +00:00
John Reck
b99fff5d48 Switch back to NativeAllocationRegistry
Bug: 32881864

Partial revert of 3acf0382da

Test: none

Change-Id: Ie749e0ef0a84ff820b1ea445422cf28112d62209
2016-11-16 15:30:16 -08:00
Andrii Kulian
db8e106fa3 Don't include sysUI insets on secondary displays
Currently there is a single instance of WindowManagerPolicy
used in Window Manager and it is configured according to
primary display settings. Because of that it reports display
size with navigation bar insets even for secondary displays.

This CL adds displayId param, so it can adjust reported metrics
correctly when requested.

Bug: 32910901
Test: android.display.cts.DisplayTest
Change-Id: I14967fc13907c4fde17aed6a769d03cbde3ec1be
2016-11-16 05:04:03 +00:00
Sudheer Shanka
dc589ac82b Update usage of ActivityManagerNative.
- Remove references to ActivityManagerProxy.
- Add isSystemReady to ActivityManager.

Bug: 30977067
Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test android.server.cts
      adb shell am instrument -e class com.android.server.am.ActivityManagerTest,com.android.server.am.TaskStackChangedListenerTest \
          -w com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
Change-Id: I07390b6124fb1515821f5c0b37baf6ae74adc8fa
2016-11-14 11:27:12 -08:00
TreeHugger Robot
18fe8f6359 Merge "Added a callback for AutoFillService." 2016-11-14 17:56:59 +00:00
Yohei Yukawa
f1ce47bdea Merge changes Ibf5ac3d2,Ie4b216db
* changes:
  Introduce EditorInfo.IME_FLAG_NO_PERSONALIZED_LEARNING
  Add comments for some int fields in EditorInfo
2016-11-12 01:41:32 +00:00
Felipe Leme
29a5b0d0f1 Added a callback for AutoFillService.
So far AutoFillService only received the assist data from framework; in
this CL, it also offers a method where the auto-fill provider can send
the auto-fill data back to framework.

The workflow is:

- AFMSI calls a new AM method (requestAutoFillData(), instead
  of requestAssistContextExtras()).
- The assist receiver is located in the app, not on system service.
- AM uses a new request type (ASSIST_CONTEXT_AUTOFILL) to request the
  assist data to the activity.
- ViewStructure has a new setAutoFillId() method which is used to set an
  unique id for the view.
- View uses the accessibility id to implement the auto-fill id.
- When the activity fullfills the request, it creates an IAutoFillCallback
  remote object - that will be used to set the auto-fill fields - and
  returns it in the assist bundle (using the
  VoiceInteractionSession.KEY_AUTO_FILL_CALLBACK key).
- The app-visible AutoFillService class offers an onFillRequest() method,
  which contains the assist data and a FillCallback used to handle it.

BUG: 31001899
Test: manually built and ran it

Change-Id: I3d208c14e81022dc96dd03f38bbe25a778b24a67
2016-11-11 16:02:55 -08:00
Yohei Yukawa
5959af13d0 Introduce EditorInfo.IME_FLAG_NO_PERSONALIZED_LEARNING
In some situations it would be useful if the application can give a
hint that the user is not likely to want the IME to update
personalized data such as typing history and personalized language
model based on what the user typed the input area.

Typical use cases are:
 * When the application is in a special mode, where user's activities
   are expected to be not recorded in the application's history.
   Some web browsers and chat applications may have this kind of
   modes.
 * When storing typing history does not make much sense. Specifying
   this flag in typing games may help to avoid typing history from
   being filled up with words that the user is less likely to type
   in their daily life. Another example is that when the application
   already knows that the expected input is not a valid word (e.g.
   a promotion code that is not a valid word in any natural language).

Applications need to be aware that the flag is not a guarantee, and
some IMEs may not respect it.

Since this is basically about the general behavior that can be
combined with any of type of input types, this CL uses
EditorInfo.imeOptions instead of EditorInfo.inputType.

Also so far it look OK to do nothing in EditorInfo#makeCompatible()
regarding this flag because 1) this bit (0x1000000) has never been
used and 2) it is less likely that just passing that bit to an IME
that do not know about this bit causes any issue.

Bug: 28157942
Test: compile only as this is just a hint and OS does nothing
Change-Id: Ibf5ac3d2b8f39542baf2635c0cadbe242b059f81
2016-11-10 20:18:30 -08:00
Yohei Yukawa
e9b99f8260 Merge changes I7918c0a3,I19d87fc1
* changes:
  Support content URIs w/ userId in IC#commitContent
  Fix up content URI for different users
2016-11-11 03:40:32 +00:00
Yohei Yukawa
3933a6e0c3 Support content URIs w/ userId in IC#commitContent
With this CL, one can specify a content URI with an embedded user ID to
InputContentInfo, like such a URI is supported in
Context#grantUriPermission().

Note that such a scenario is actually possible when 1) an application
running as User X sets a content URI to the system clipboard then 2) the
IME runing as User Y who share the clipboard with User X obtains the
content URI from the system and tries to create a new instance of
InputContentInfo.

Bug: 32427307
Bug: 32778718
Test: 'adb shell dumpsys activity permissions' with a custom IME that
      instantiates InputContentInfo from the content URI obtained from
      the clipboard.
Change-Id: I7918c0a379b8f3e7e64b106447b42447876f9057
2016-11-11 03:39:25 +00:00
Yohei Yukawa
16e67edb36 Fix up content URI for different users
Currently Commit Content API work only when the content URI provided by
the IME is accessible to the target application.  This is non-trivial if
the target application is running as a different user (profile) and it
is actually a possible scenario when managed profile is enabled.

This CL takes care of such a situation, by fixing up the content URI
when and only when InputContentInfo#getContentUri() is called from a
different user than the owner of the content URI.

This CL also makes it clear that we currently do not support content
URIs that already have embedded user IDs.  Since
IActivityManager#grantUriPermissionFromOwner() does not support such
URIs, we should have had a special handling for such a case, which will
be addressed in a subsequent CL.

Bug: 32427307
Bug: 32778718
Test: Made sure that Commit Content API works as expected on a managed
      profile created by
      https://github.com/googlesamples/android-testdpc
Change-Id: I19d87fc19beea248f49b59ec5a5711b95bcbb466
2016-11-11 03:38:15 +00:00
Winson Chung
fa7053789f Adding experiment for minimized pinned stack.
- Also refactoring the PIP touch handling to be independent gestures

Test: Enable the setting in SystemUI tuner, then drag the PIP slightly
      offscreen. This is only experimental behaviour, and
      android.server.cts.ActivityManagerPinnedStackTests will be updated
      accordingly if we keep this behavior.

Change-Id: I5834971fcbbb127526339e764e7d76b5d22d4707
2016-11-10 23:09:17 +00:00