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
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
Ensure that the client visibility state affects other subsystems,
like accessibility as well as input.
Test: WindowStateTest
Bug: 118118435
Change-Id: I8a50a0b82dc76e578861967197350eaa3867f837
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
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
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
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
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
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
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
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
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
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
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
* 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
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