Commit Graph

11949 Commits

Author SHA1 Message Date
Rob Carr
30e984ca78 Merge changes from topic "remove-scoped-connection"
* changes:
  Remove usage of scoped connections.
  Allow SurfaceControl to be passed over AIDL.
2019-01-07 20:08:58 +00:00
Manpreet
18ebaa979c Merge "Null locale causing the VTS fail." am: 179f30a443 am: 9568191633
am: e9fe937245

Change-Id: I715e3b8126e1506c9d02f0be278fb8baad396018
2019-01-06 20:53:29 -08:00
Manpreet
e9fe937245 Merge "Null locale causing the VTS fail." am: 179f30a443
am: 9568191633

Change-Id: Iab284dfc831a9079e339c8c23fba8f3e7e4ec04d
2019-01-06 20:44:13 -08:00
Manpreet
9568191633 Merge "Null locale causing the VTS fail."
am: 179f30a443

Change-Id: I8ae92392e70c046194df1c8ebee0bd32ed9513cf
2019-01-06 20:30:46 -08:00
Treehugger Robot
179f30a443 Merge "Null locale causing the VTS fail." 2019-01-07 04:19:22 +00:00
Eric Holk
7751e68a1b Merge "Add tryCreateView to LayoutInflater" am: aa8f1b7033 am: 07b293f8af
am: 9b9c255b88

Change-Id: I26f0e3d18e8a27bd9fb7745f3a7af4ca347237fe
2019-01-04 17:40:54 -08:00
Eric Holk
9b9c255b88 Merge "Add tryCreateView to LayoutInflater" am: aa8f1b7033
am: 07b293f8af

Change-Id: Ia835f7a7488a084c72fd5722c91d01ddb427ea19
2019-01-04 17:27:45 -08:00
Eric Holk
07b293f8af Merge "Add tryCreateView to LayoutInflater"
am: aa8f1b7033

Change-Id: Ib89a1d1b292aca7404d646ff61974558422fc959
2019-01-04 17:17:28 -08:00
Jorim Jaggi
bc93e0f537 Merge "A brave new world for window insets (7/n)" 2019-01-04 23:21:24 +00:00
Eric Holk
29d0cd6fa1 Add tryCreateView to LayoutInflater
This method is needed so that precompiled layouts can reuse the factory logic
from the LayoutInflater.

Bug: 111895153
Test: atest android.view.cts.LayoutInflaterTest
Change-Id: Ifd1028906b655af2bd14247d586dc16b35550c82
2019-01-04 12:57:14 -08:00
Robert Carr
5fea55b2d2 Remove usage of scoped connections.
Tracking SurfaceFlinger changes. Now to construct a child surface
we need the SurfaceControl as opposed to just the surface, and so
we parcel the SurfaceControl across relayout.

Test: Manual
Bug: 62536731
Bug: 111373437
Bug: 111297488
Change-Id: I0a034767e92becec63071d7b1e3e71b95d505b77
2019-01-04 10:08:56 -08:00
Jorim Jaggi
cfd6f3b407 A brave new world for window insets (7/n)
Ensure that the client visibility state affects other subsystems,
like accessibility as well as input.

Test: WindowStateTest
Bug: 118118435
Change-Id: I8a50a0b82dc76e578861967197350eaa3867f837
2019-01-04 17:30:23 +01:00
Felipe Leme
af1a0e7543 Cosmetic ContentCapture fixes.
Test: atest CtsContentCaptureServiceTestCases
Bug: 121033016
Change-Id: Ibe82fa15660a268d6fec91374c6899dd9e3b4d8d
2019-01-03 18:02:34 -08:00
TreeHugger Robot
358acd5854 Merge "Ignore ContentCapture events after the activity stopped." 2019-01-04 00:35:37 +00:00
TreeHugger Robot
ee00fea76b Merge "Fix drag and drop (1/3)" 2019-01-04 00:11:26 +00:00
Felipe Leme
bef744c48c Ignore ContentCapture events after the activity stopped.
Test: atest CtsContentCaptureServiceTestCases
Bug: 121033016

Change-Id: I016f13748287f77b7c5f0ceb12a5af1bb2b555ea
2019-01-03 13:02:02 -08:00
chaviw
beb7a0cf50 Allow SurfaceControl to be passed over AIDL.
Test: Manual
Bug: 62536731
Bug: 111373437
Bug: 111297488
Change-Id: I52d9d314f1997560bc5498a1501827868db8b807
2019-01-03 10:50:39 -08:00
Adam He
f15c481604 Merge "Moved buffer for VIEW_TEXT_CHANGED events to MainContentCaptureSession." 2019-01-03 17:16:12 +00:00
Adam He
ac13265ed1 Moved buffer for VIEW_TEXT_CHANGED events to MainContentCaptureSession.
Bug: 121042846
Test: atest android.contentcaptureservice.cts.LoginActivityTest#testTextChangeBuffer
Test: atest CtsContentCaptureServiceTestCases
Change-Id: Ia0128c1c868d44da954e67b38dfb2bde6461b883
2019-01-02 14:44:03 -08:00
Eric Holk
d1a002605f Merge "[LayoutInflater] Cleanup - remove some nesting" am: 3a0fe2cdab am: a261d6e664
am: 6abf873683

Change-Id: I5b89a07c28f2d38af94a80137fd9a97d72b09091
2019-01-02 14:41:25 -08:00
Eric Holk
6abf873683 Merge "[LayoutInflater] Cleanup - remove some nesting" am: 3a0fe2cdab
am: a261d6e664

Change-Id: I8f6bb61ffc085ff224f631c916e19e05216faeed
2019-01-02 14:31:25 -08:00
Eric Holk
a261d6e664 Merge "[LayoutInflater] Cleanup - remove some nesting"
am: 3a0fe2cdab

Change-Id: I5f44de5983793c1a8e089977934d48bf032d0686
2019-01-02 14:13:34 -08:00
Eric Holk
bfc687007c [LayoutInflater] Cleanup - remove some nesting
The parseInclude method had some deep nesting that could be improved by
rearranging things a little.

Test: atest android.view.cts.LayoutInflaterTest
Change-Id: I2ee13c2ee80bcb220371d39a5a6da6044cfa245c
2019-01-02 11:11:24 -08:00
Mathew Inwood
8501ae1763 Merge "Limit access to suspected false positives." am: aeda49d185
am: 152d5a5dcd

Change-Id: I8e10322e69d2d479079df5cf8fec0287c7c117f1
2019-01-02 05:00:54 -08:00
Mathew Inwood
152d5a5dcd Merge "Limit access to suspected false positives."
am: aeda49d185

Change-Id: Ib24456aaad850d5aee46dd242513840511942536
2019-01-02 04:48:33 -08:00
Mathew Inwood
55418eada5 Limit access to suspected false positives.
Members modified herein are suspected to be false positives: i.e. things
that were added to the greylist in P, but subsequent data analysis
suggests that they are not, in fact, used after all.

Add a maxTargetSdk=P to these APIs. This is lower-risk that simply
removing these things from the greylist, as none of out data sources are
perfect nor complete.

For APIs that are not supported yet by annotations, move them to
hiddenapi-greylist-max-p.txt instead which has the same effect.

Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.

Bug: 115609023
Test: m
Change-Id: Ia937d8c41512e7f1b6e7f67b9104c1878b5cc3a0
Merged-In: I020a9c09672ebcae64c5357abc4993e07e744687
2018-12-28 14:26:35 +00:00
Mathew Inwood
18e35038be Merge "Limit access to suspected false positives." 2018-12-28 14:23:00 +00:00
Jorim Jaggi
e24ac5a8eb Merge "A brave new world for window insets (6/n)" 2018-12-28 13:58:36 +00:00
Mathew Inwood
31755f94e1 Limit access to suspected false positives.
Members modified herein are suspected to be false positives: i.e. things
that were added to the greylist in P, but subsequent data analysis
suggests that they are not, in fact, used after all.

Add a maxTargetSdk=P to these APIs. This is lower-risk that simply
removing these things from the greylist, as none of out data sources are
perfect nor complete.

For APIs that are not supported yet by annotations, move them to
hiddenapi-greylist-max-p.txt instead which has the same effect.

Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.

Bug: 115609023
Test: m
Change-Id: I020a9c09672ebcae64c5357abc4993e07e744687
2018-12-28 11:50:04 +00:00
TreeHugger Robot
2555a5d46f Merge "Fixes NotificationHeaderView layout." 2018-12-27 22:37:42 +00:00
Yohei Yukawa
0c1ebffdb3 Deprecate null IME token rule in IMM#setInputMethod()
With my previous CL [1], InputMethodManagerService#setInputMethod() is
now guaranteed to be called only from IInputMethodManager and
IInputMethodPrivilegedOperations as 'adb shell ime set' no longer
directly calls this method (with null IME token).

With this CL, IInputMethodManager#setInputMethod(), which has been
kept just for null IME token rule, is finally gone. This is achieved
by letting InputMethodManager#setInputMethod() directly update
DEFAULT_INPUT_METHOD (and SELECTED_INPUT_METHOD_SUBTYPE) secure
settings if a priviledged component still relies on this undocumented
null IME token rule.

 [1]: I6fd47b5cc1e7da7222774df20247a2c69a70f45b
      db25df71be

Fix: 114488811
Test: atest CtsInputMethodServiceHostTestCases
Change-Id: I42dd0325b01c527009bf85566ca8ba0766b2294e
2018-12-27 14:06:28 -08:00
Gus Prevas
c79816b005 Fixes NotificationHeaderView layout.
The layout method in NotificationHeaderView was incorrectly adding the
margins, width, etc. of views laid out on the right side to the position
it was tracking for views being laid out on the left side.  This change
fixes that error.

Test: manual
Change-Id: I747b318c621e6cf518e0752020ca8909c36c2ed7
Fixes: 122036911
2018-12-27 15:46:00 -05:00
Jorim Jaggi
e35c05982b A brave new world for window insets (6/n)
Mirror state back to server

In case the client does some local visibility modification to the
leash, the server needs to be informed for a couple of reasons:

- Dispatching state to other apps
- Updating accessibility services
- Updating SystemUI/IME system

For that we send the state back whenever we modified it and send
it via IWindowSession.insetsModified. The server ensures that
visibility state is only updated if we have a match for the
controlling app, and then updates the visibility state and
dispatches it to other apps.

We also invert mHidden to mVisible in InsetsSourceConsumer as it
was really really confusing.

Bug: 118118435
Change-Id: I92f187bf892a5f26b8b007ed7e6fbf4d2c7b13e6
2018-12-27 18:10:57 +00:00
Jelle Fresen
ba281ccf76 Merge "Add add/remove for AnimationListener's" 2018-12-27 07:52:37 +00:00
chaviw
59f532efad Fix drag and drop (1/3)
Add transferTouchFoucus API in SurfaceControl to pass info to native.

Test: Builds
Bug: 120463595
Change-Id: Ifb20a135c13de7380176e285dac273eef776ee19
2018-12-26 15:34:59 -08:00
Yohei Yukawa
6048d89453 Temporarily move MULTI_CLIENT_IME_ENABLED to frameworks.jar
This is a preparation to implement per-profile IME in
InputMethodManagerService (IMMS).

Multi-client IME is designed and implemented to be able to deal with
multiple profiles at the same time from its beginning [1].  This means
that when multi-client IME is enabled with system properties, it also
means that per-profile IME is enabled.

At the same time, the following classes need to change its behavior
whether per-profile IME is enabled or not.

 * android.provider.Setings
 * com.android.server.inputmethod.InputMethodManagerService
 * com.android.server.textservices.TextServicesManagerService
 * com.android.server.devicepolicy.DevicePolicyManagerService
 * com.android.server.devicepolicy.OverlayPackagesProvider

The problem is that android.provider.Setings lives in the
frameworks.jar.  Hence if we want to expose something like
PER_PROFILE_IME_ENABLED to android.provider.Setings, then such a flag
needs to live in frameworks.jar.

Note that this is expected to be a temporary change.  Once per-profile
IME becomes always enabled in IMMS, we can safely roll back this
change.

Note also that static initializer of InputMethodSystemProperty is
expected to be evaluated only once as long as
InputMethodSystemProperty is loaded before Zygote.

 [1]: I41dfe854557b178d8af740bc2869c936fc88608b
      bae5bea23c

Bug: 120709962
Test: prebuilts/checkstyle/checkstyle.py -f \
        frameworks/base/core/java/android/view/inputmethod/InputMethodSystemProperty.java
Test: Manually verified as follows:
  1. make -j MultiClientInputMethod
  2. adb install -r $OUT/system/priv-app/MultiClientInputMethod/MultiClientInputMethod.apk
  3. adb root
  4. adb shell setprop persist.debug.multi_client_ime \
       com.example.android.multiclientinputmethod/.MultiClientInputMethod
  5. adb reboot
  6. Make sure that multi-client IME is enabled
Change-Id: Iad8aba7edb1e60ccc1ce5192a11e01b6aa8d00a0
2018-12-25 09:57:31 -08:00
TreeHugger Robot
af6721f945 Merge "Re-work IMM#getShortcutInputMethodsAndSubtypes()" 2018-12-25 07:54:56 +00:00
Yohei Yukawa
4773ee18a2 Stop supporting null IME token in IMM#setInputMethodAndSubtype()
Hopefully no one has relied on this undocumented behavior that when
the caller has WRITE_SECURE_SETTINGS then null IME token is allowed in
IMM#setInputMethodAndSubtype().

Note that if the caller had WRITE_SECURE_SETTINGS they can achieve the
same goal by directly updating the following secure settings:
  * Settings.Secure.DEFAULT_INPUT_METHOD
  * Settings.Secure.SELECTED_INPUT_METHOD_SUBTYPE

Bug: 114488811
Test: CtsInputMethodServiceHostTestCases
Change-Id: Ic5c59299ace16778fc57a4ec2639508564f416a7
2018-12-24 21:13:53 -08:00
Yohei Yukawa
fefedc52bb Re-work IMM#getShortcutInputMethodsAndSubtypes()
It seems that InputMethodManager#getShortcutInputMethodsAndSubtypes()
was designed to be a bit more generalized concept, but in reality it
just ended up being a convenient API that returns a single Voice IME
subtype if exists.  As far as we can tell, It has never returned two
or mode pairs.  It also has never returned non-voice
InputMethodSubtype.

In order to support per-profile IME mode in InputMethodManagerService
without introducing a bunch of new complexity and technical debt, this
CL re-implements IMM#getShortcutInputMethodsAndSubtypes() based on how
it has been used actually in the ecosystem.

The first thing this CL changes is that
IMM#getShortcutInputMethodsAndSubtypes() no longer takes subtype
locale into account when looking for the best voice IME subtype. This
is because InputMethodSubtype is no longer a recommended way to
represent IME languages.  Ignoring subtype locale makes the
implementation much easier to understand and maintain.

The second thing this CL changes is that
IMM#getShortcutInputMethodsAndSubtypes() is now just a utility method
that is implemented in the client side on top of other well-defined
public APIs such as IMM#getEnabledInputMethodList() and
IMM#getEnabledInputMethodSubtypeList().  This means that this API
becomes per-profile IME ready for free once other public APIs become
per-profile IME ready.

 [1]: Ibd0f7ef5101013569c303820a3adc9038a97356d
      4e4569dab5

Bug: 120709962
Test: AOSP Keyboard still shows voice IME shortcut when the device has
      one or more IMEs that expose voice InputMethodSubtype.
Change-Id: Iaf31e9f3213f4e644b64c9658f1b59d371e3c2b4
2018-12-24 19:43:17 -08:00
Feng Cao
c5cd1325fc Merge "Fix augmented autofill window positioning to be right below the input field." 2018-12-21 18:57:13 +00:00
TreeHugger Robot
5f175e3d6f Merge "Move orientation request into hierarchy." 2018-12-21 16:52:05 +00:00
Jelle Fresen
65d2171d00 Add add/remove for AnimationListener's
FragmentManagerImpl in AndroidX currently uses reflection to read
mListener, so it can wrap it with another listener. Adding add/remove
methods for AnimationListener's next to setAnimationListener removes the
need for AndroidX to touch mListener, which is private API.

Bug: 117519981
Test: atest AnimationTest
Change-Id: I69cb19d61078215ca6697b3d41f4c536decc2e6e
2018-12-21 15:18:09 +00:00
Jorim Jaggi
99dc47483c Merge "A brave new world for window insets (5/n)" 2018-12-21 14:00:45 +00:00
Jorim Jaggi
5bb571dc40 A brave new world for window insets (5/n)
Implement controlWindowInsetsAnimation

Based on the leashes we have on the client, and the insets the
client has requested, we are able to move the surfaces around
such that the resulting insets will match what the client
requested.

Bug: 118118435
Change-Id: I0616e53455a6544aaf374c1b0eb10e258aced21d
2018-12-21 13:05:30 +01:00
TreeHugger Robot
84cdbdfc13 Merge "Send logs to TextClassifier by calling onTextClassifierEvent in NAS" 2018-12-21 02:36:32 +00:00
Feng Cao
023b84c35f Fix augmented autofill window positioning to be right below the input field.
Test: manual verification

Bug: 120932071

Change-Id: If8fc3b78fd6240bca54035b139f44e56ddb996dc
2018-12-20 17:25:57 -08:00
Robert Carr
049902d9eb Implement construction of container layers am: c1ea10447f
am: ef7f39f4f5

Change-Id: I20c5e72ec3d278a3d9dd36618c45f32f330f72c6
2018-12-20 15:11:37 -08:00
Robert Carr
ef7f39f4f5 Implement construction of container layers
am: c1ea10447f

Change-Id: I5a8f0080051d2ae66a4a2f99c4a88ef452f0a467
2018-12-20 14:59:10 -08:00
Treehugger Robot
321b208f0f Merge changes from topic "fw_container"
* changes:
  DO NOT MERGE Set ContainerLayer for buffer-less surface
  DO NOT MERGE: WM: Restrict SC Builder to set a single surface type
  Implement construction of container layers
2018-12-20 22:45:18 +00:00
Garfield Tan
90b042819f Move orientation request into hierarchy.
This CL also removes a hidden method in IWindowManager that's only used
inside of WM right now.

Also wire up Task level logic.

Bug: 113252523
Test: Manual test that app requested orientation still rotates the
display and WmTests.
Change-Id: I7c5046e9beaea79de4ec471eabc792e3593583a2
2018-12-20 13:39:00 -08:00