Commit Graph

9703 Commits

Author SHA1 Message Date
Felipe Leme
20ab6c550d Merge "Some Autofill API changes." into oc-dev am: fe1bddfbb5
am: a4d2749cf8

Change-Id: I460229f5bf0c4fc832256e00746a813fd08991ea
2017-04-19 05:18:57 +00:00
Felipe Leme
fe1bddfbb5 Merge "Some Autofill API changes." into oc-dev 2017-04-19 05:05:48 +00:00
Lucas Dupin
74411669a2 Merge "Fix for SurfaceView out of a view hierarchy" into oc-dev am: 9cd92959e6
am: 9169df47c5

Change-Id: I52ee3b55f0e6e7735738ec1ac07dd0e44d04124d
2017-04-19 03:29:45 +00:00
TreeHugger Robot
9cd92959e6 Merge "Fix for SurfaceView out of a view hierarchy" into oc-dev 2017-04-19 03:17:50 +00:00
Philip P. Moltmann
e43fe0af9d Merge "Add a way to read the last AutofillSelection." into oc-dev am: 42775f2a89
am: ded76ed806

Change-Id: I8cf4a959e9d60bd15c61955a802115904a2baead
2017-04-19 02:56:07 +00:00
TreeHugger Robot
42775f2a89 Merge "Add a way to read the last AutofillSelection." into oc-dev 2017-04-19 02:43:08 +00:00
Felipe Leme
e5f9c30688 Some Autofill API changes.
- Added View.IMPORTANT_FOR_AUTOFILL_YES_INCLUDE_DESCENDANTS
- Added View.IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS
- Added FillResponse.Builder.setIgnoredIds()
- Fixed javadoc links.

These changes are not implemented yet....

Bug: 37424141
Bug: 36171235
Test: m update-api

Change-Id: I604960443ab08cd3f2a84a70b0a2cece7cb0a00c
2017-04-18 19:27:58 -07:00
Philip P. Moltmann
cc684ed41f Add a way to read the last AutofillSelection.
- Check UID to make sure one service cannot read FillSelections of other
  services
- Add id to Dataset to allow to tag the datasets. This id is then found
  in the FillSelection.Event
- Add clientState to FillSelection to allow service to store more data

Fixes: 36871500
Test: CtsAutoFillServiceTestCases
Change-Id: Ice894245508227265294a1c59ea97842175e5aec
2017-04-18 16:59:40 -07:00
Evan Rosky
e01b955c27 Merge "Ignore nested keyboard navigation clusters" into oc-dev am: 7906d47f69
am: 9e140d9c91

Change-Id: Id8d414b684a576f288288aa439c15f3e59646889
2017-04-18 23:12:10 +00:00
Evan Rosky
7906d47f69 Merge "Ignore nested keyboard navigation clusters" into oc-dev 2017-04-18 22:54:08 +00:00
Lucas Dupin
0c207340b9 Fix for SurfaceView out of a view hierarchy
At most of the time, developers rely on GLSurfaceView to manage
the OpenGL lifecycle. This means that a SurfaceView might not
always have a ViewRootImpl.

Test: select timelapse wallpaper and set it.
Bug: 37363390
Change-Id: I3cdb1ec2a6e91cfad65fd823a7436f0010c0859c
2017-04-18 10:01:34 -07:00
Winson Chung
95d1b07936 Merge "Account for content insets in source rect hint for transition into PiP" into oc-dev am: eef5d285f9
am: 60c9403f10

Change-Id: I9d14c0aaeaa84548c307c315b022729092cd0e49
2017-04-18 02:43:19 +00:00
Yohei Yukawa
b48118187f Merge "A new power button mode to hide the IME when shown" into oc-dev am: eb9fb8e0d0
am: e075fe1035

Change-Id: Ie82bee897cc80b6784856fef1600d331ba8bbe33
2017-04-18 02:39:38 +00:00
Winson Chung
6c63afbd0c Merge "Tightening up rotation behavior for PIP (3/3)" into oc-dev am: c2627353c4
am: 302c49a559

Change-Id: Ie6e2713060cd58fc14eab62d8b7b059b9585b98d
2017-04-18 02:09:47 +00:00
TreeHugger Robot
eef5d285f9 Merge "Account for content insets in source rect hint for transition into PiP" into oc-dev 2017-04-18 01:33:28 +00:00
TreeHugger Robot
eb9fb8e0d0 Merge "A new power button mode to hide the IME when shown" into oc-dev 2017-04-18 01:13:04 +00:00
TreeHugger Robot
c2627353c4 Merge "Tightening up rotation behavior for PIP (3/3)" into oc-dev 2017-04-17 23:50:27 +00:00
Yohei Yukawa
d6475a682d A new power button mode to hide the IME when shown
As discussed in Bug 33038203 on certain platforms there is a demand
that the power button can change the behavior depending on whether an
IME window is shown on the screen or not.  The behavior requested here
can be summarized into two parts:

  * Hide the IME window if it is shown [1]
  * Go to the home screen if no IME window is shown

This CL implements the above request by introducing a new config mode
for config_shortPressOnPowerBehavior.  Note the definition of when an
IME is shown is often tricky than people would expect.  The way this
CL is implemented is to propagate IME window state from
InputMethodManagerService (IMMS) to PhoneWindowManager via
WindowManagerService regarding when the back button on the NavBar for
phones/tablets should be shown as an IME dismiss key [2].

 [1]: Even with this CL the IME still is allowed to ignore the request
      to hide the software keyboard. Currently there is no official
      protocol to forcefully hide the software keyboard.  How to deal
      with such a situation is a long standing TODO task.
 [2]: Internally this is controlled by the following IMMS fields:
       - InputMethodManagerService#mImeWindowVis
       - InputMethodManagerService#mBackDisposition
      Note that those fields rely on self-report from the IME.  To be
      precise, the base implementation of InputMethodService is
      responsible for report back its internal state to IMMS when
      necessary.  The important point is that, although this could
      allow a malicious IME to confuse the system UI to some extent,
      supporting malicious IMEs is not clearly a goal of Android.
      Anyway, the definition of when an IME is shown is a kind of
      hot topic in several system services recently.  Hopefully we
      can come up with better definition and reliable mechanism in
      a future release.

Fixes: 33824860
Test: Manually verified as follows
       1. Change config_shortPressOnPowerBehavior to "5"
       2. Rebuilt the OS image and flash it to the device
       3. Make sure that the power button works like a home button
          if software keyboard is not shown.
       4. Open dialer and focus in to the text field shown on top
       5. Make sure that the AOSP keyboard is shown.
       6. Run 'adb shell dumpsys input_method' to observe the
          following line:
            mImeWindowVis=Active|Visible
       7. Tap the power button to make sure that the AOSP keyboard
          gets dismissed.
       8. Tap the power button again to make sure that it works
          as if a home button.
Test: Manually tested as follows
       1. Open dialer and focus in to the text field to show an IME
       2. Run 'adb shell dumpsys window policy' to make sure
            mDismissImeOnBackKeyPressed=true
       3. Tap the back button to dismiss the IME
       4. Run 'adb shell dumpsys window policy' to make sure
            mDismissImeOnBackKeyPressed=false
Change-Id: I20721547c73360a70b5fc5cbe06824d577d1768a
2017-04-17 23:22:56 +00:00
Winson Chung
8802eac3d8 Account for content insets in source rect hint for transition into PiP
- As a part of transitioning into PiP, we remove the content insets, and
  as a result, we also need to adjust the source hint rect for the change
  in insets as well.

Bug: 37418994
Test: Enter PiP from YT, ensure no jump at the end

Change-Id: I74219b05c91d3c8b8466dd8fff4d6dd692f08725
2017-04-17 16:11:28 -07:00
Philip P. Moltmann
955b263deb Merge "Allow to finish session when all views are gone" into oc-dev am: 3440e92009
am: 88a9bd73bb

Change-Id: I90aa430b7bcb5494804abc3960273c32b1c1bf81
2017-04-17 22:10:49 +00:00
Winson Chung
ef4dc81d50 Tightening up rotation behavior for PIP (3/3)
- Fixing up edge case when SysUI resizing conflicts with updating the
  display rotation bounds.  When an interaction causes both a display
  rotation and a resize from SystemUI, we should defer the resize animation
  until the rotation has been propagated to SystemUI, otherwise the bounds
  used will be incorrect.

Bug: 36879891
Test: android.server.cts.ActivityManagerPinnedStackTests
Change-Id: Ife1b7ab0c2f1f11f33cbc9614778ff49a28c79f6
2017-04-17 14:49:31 -07:00
Philip P. Moltmann
494c3f5da2 Allow to finish session when all views are gone
An service can option to finish the session once all views that it
declared as important. Views that are important are all autofillable
views of any partition and the saveable fields of the last partition.

Test: CtsAutoFillServiceTestCases
Fixes: 35708237
Change-Id: I0ccade8ebb427e5d8928697ef0007c75d3f83df0
2017-04-16 21:36:25 -07:00
Svetoslav Ganov
6359d85658 Merge "Add support for multiple fill contexts" into oc-dev am: 41200eac71
am: 721b28f029

Change-Id: I1e3da29514943c1e7476db8bc6a1cbba46b7a116
2017-04-15 03:37:56 +00:00
Svetoslav Ganov
41200eac71 Merge "Add support for multiple fill contexts" into oc-dev 2017-04-15 03:29:13 +00:00
Yohei Yukawa
03a4f5a225 Merge "Support flagNoPersonalizedLearning in layout XML" into oc-dev am: e61d56fb70
am: 7096e0e076

Change-Id: I8138d58c3fade77ea2311faa728224d0199ae3f6
2017-04-15 01:59:05 +00:00
TreeHugger Robot
e61d56fb70 Merge "Support flagNoPersonalizedLearning in layout XML" into oc-dev 2017-04-15 01:44:37 +00:00
Philip P. Moltmann
64429fe511 Merge "Remove autofillMode attribute" into oc-dev am: a05f1fdd93
am: a624433bf0

Change-Id: Idd7b711a67378287eb5a6da3374f2d84e4710a8c
2017-04-15 01:22:16 +00:00
TreeHugger Robot
a05f1fdd93 Merge "Remove autofillMode attribute" into oc-dev 2017-04-15 00:50:51 +00:00
Svet Ganov
013efe173e Add support for multiple fill contexts
When saving data filled by the user the platform provides to
an autofill provider the state of the UI allowing the provider
to interpret this state and store relevant information.

A limitation of the current design is that the fill provider
needs to interpret the screen content twice, once handling a
fill request and once handling a save request. To address this
we are introducing a id for each fill request allowing the
autofill provider to associate arbitrary state with each fill
request and store it in the client data bundle later passed
to save.

Another limitation of the current design is that if the screen
changes dynamically while the user interacts with the app the
UI state passed on save represents a static snapshot, therefore
it is not possible to the autofill provider to determine the
context in which the data in the UI was filled. We could
keep the views and have deltas for views being removed/added
/moved/changed but this is not enough as the fill provider
needs to know not only what changed but what changed for every
fill request and in one session there could be multiple fill
requests. To address this we provide a list of fill contexts
on save each of which has the id of the corresponding fill
request. This allows the fill provider to know the exact context
in which the data was popuplated and also use its custom client
state for this fill request if desired.

This change deprecates the old APIs and the new ones delegate
to the old ones. Once the clients migrate to the new APIs we
will remove the old ones.

Test: all autofill CTS tests pass

Change-Id: Idcebcc671aa3c078a305d8c358e225274fccc588
2017-04-14 17:37:31 -07:00
Philip P. Moltmann
fe48dab741 Merge "Fix some racines in AutofillManager" into oc-dev am: 2ddd69ce1a
am: ae774ec189

Change-Id: Ic035560141f16118a4fefb3bb0f65edd6bd228cc
2017-04-14 22:16:02 +00:00
Philip P. Moltmann
44a4336027 Remove autofillMode attribute
Bug: 36171235
Test: CtsAutoFillServiceTestCases
Change-Id: I69f0e1c4fa3c68f73049726e7ae8f10d9d81bf5e
2017-04-14 14:35:14 -07:00
Yohei Yukawa
d91860d9ce Support flagNoPersonalizedLearning in layout XML
In my previous CL [1] a new flag IME_FLAG_NO_PERSONALIZED_LEARNING
was added for EditorInfo.imeOptions.  What was missed in the
previous CL is that new flag definition for layout XML and as a
result currently IME_FLAG_NO_PERSONALIZED_LEARNING is the only
IME option flag that cannot be specified in layout XML.

For instance, EditorInfo.IME_FLAG_FORCE_ASCII can be specified as
follows.

 <EditText
     android:id="@+id/edittext_force_ascii"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:imeOptions="actionSend|flagForceAscii" />

With this CL, application developers can specify
IME_FLAG_NO_PERSONALIZED_LEARNING as follows.

 <EditText
     android:id="@+id/edittext_no_personalized_learning"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:imeOptions="actionSend|flagNoPersonalizedLearning" />

 [1]: Ibf5ac3d2b8f39542baf2635c0cadbe242b059f81
      5959af13d0

Bug: 28157942
Fixes: 37305520
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Change-Id: Ifca0b13bf336cdc609af820aadcdb1b45ca1d5ba
2017-04-14 13:46:37 -07:00
Philip P. Moltmann
e048a65639 Fix some racines in AutofillManager
- The session might be gone by the time the handler is called, hence check
  the sessionID
- Access getClientLocked() and mSession only under mLock.

Test: cts-tradefed run cts-dev AutoFillServiceTestsCases
Change-Id: I445a24557589afadb1f5372b63ef9db88021b609
2017-04-14 12:50:03 -07:00
Alan Viverette
14b3375e43 Merge "Remove unnecessary casts on calls to findViewById" into oc-dev am: 7c8ab2651b
am: efc602c307

Change-Id: Id991d413933d8435a05b129bf13e917941371c01
2017-04-14 18:25:53 +00:00
Andrii Kulian
7ce72dac6d Merge "Hide flag SHOW_WITH_INSECURE_KEYGUARD" into oc-dev am: c66b6ff997
am: aa412973d9

Change-Id: I2e6394ce9c7bc72f5aa4de90e294defeb2dbf222
2017-04-14 17:46:46 +00:00
Svet Ganov
19feef5229 Merge "Allow custom buttons in autofill UI" into oc-dev am: 249c4d709a
am: 489cef380a

Change-Id: I846ea7cbd275323cf65ed57d37a0acf13b010085
2017-04-14 17:38:13 +00:00
Svet Ganov
3b436b15b7 Merge "Check for non-null parent before delegating to it am: 3a74243ae4" into oc-dev-plus-aosp
am: 37933ae25b

Change-Id: I264ce0527b8d4b4cc751487a9c14eda35cf733fe
2017-04-14 17:23:00 +00:00
TreeHugger Robot
7c8ab2651b Merge "Remove unnecessary casts on calls to findViewById" into oc-dev 2017-04-14 16:56:28 +00:00
Evan Rosky
3efa8c8fed Merge "Improve rect-level focus ordering" into oc-dev am: 197052d6cb
am: d6072f2900

Change-Id: Ide53aafb83aa1ca71adb966472ad5a411197e3f3
2017-04-14 16:23:44 +00:00
Alan Viverette
51efddbd3b Remove unnecessary casts on calls to findViewById
Just frameworks/ this time. More paths to come.

Bug: 24137209
Test: make -j32
Change-Id: Iff27abd26fa43296ac2fff8f534fc6742d2ae80c
2017-04-14 11:15:50 -04:00
Andrii Kulian
c66b6ff997 Merge "Hide flag SHOW_WITH_INSECURE_KEYGUARD" into oc-dev 2017-04-14 05:05:25 +00:00
TreeHugger Robot
249c4d709a Merge "Allow custom buttons in autofill UI" into oc-dev 2017-04-14 04:22:10 +00:00
Svet Ganov
3a74243ae4 Check for non-null parent before delegating to it
Test: manual

bug:37289681

Change-Id: If3055747471d4b7771256d8adaaa08b73641c09d
2017-04-14 02:31:53 +00:00
Evan Rosky
197052d6cb Merge "Improve rect-level focus ordering" into oc-dev 2017-04-13 23:06:18 +00:00
Andrii Kulian
22512e8a22 Hide flag SHOW_WITH_INSECURE_KEYGUARD
Bug: 36555156
Test: android.server.cts.ActivityManagerDisplayTests
Change-Id: I831ada0ffd35ab96af8ae821588c9f6e0ff30e5a
2017-04-13 11:35:40 -07:00
Robert Carr
f6347e104b Merge "ViewRoot: More surgically fix child-life time." into oc-dev am: 22762b2283
am: 92d7df7455

Change-Id: I1d57123db0dd800ea587f3a709742122089ffed2
2017-04-13 08:42:17 +00:00
TreeHugger Robot
22762b2283 Merge "ViewRoot: More surgically fix child-life time." into oc-dev 2017-04-13 08:25:10 +00:00
Tadashi G. Takaoka
53042fc5b2 Merge "Remove supportsDismissingSelfWindow attribute of IME" into oc-dev am: d280bfea23
am: 6c8c498b5b

Change-Id: I2da5392ab850cdf9053cfd16d216feffe9afada5
2017-04-13 08:03:37 +00:00
Tadashi G. Takaoka
d280bfea23 Merge "Remove supportsDismissingSelfWindow attribute of IME" into oc-dev 2017-04-13 07:41:34 +00:00
Robert Carr
4684ba6c9e Merge "Stack APPLICATION_MEDIA_OVERLAY windows with relative layering." into oc-dev am: 9d5ac93cc3
am: b3871981f2

Change-Id: I2b413c9ba1d36fc8f8b3dffedf72331de82a4b40
2017-04-13 07:34:22 +00:00