Commit Graph

97051 Commits

Author SHA1 Message Date
Jelle Fresen
ba281ccf76 Merge "Add add/remove for AnimationListener's" 2018-12-27 07:52:37 +00:00
Lucas Dupin
de64ee0126 make wake event trigger a pulse
Test: manual
Test: atest ScrimControllerTest
Bug: 111405682
Bug: 111395593
Change-Id: I5a7b9024ecd5aea691ac5e3f23e70818186fc37c
2018-12-26 13:28:41 -08:00
Remi NGUYEN VAN
708c409598 Merge "Add NetworkStack app" am: d01eaecbd2 am: e1922923fc
am: 5673820f9b

Change-Id: Idcd7b9b6eb50a98bcee67f89b0112b91cd1b40fb
2018-12-25 17:21:18 -08:00
Remi NGUYEN VAN
5673820f9b Merge "Add NetworkStack app" am: d01eaecbd2
am: e1922923fc

Change-Id: Iebe5aa5ea7cd235b8a6e734bde0f9a14dce5acdc
2018-12-25 17:09:42 -08:00
Remi NGUYEN VAN
e1922923fc Merge "Add NetworkStack app"
am: d01eaecbd2

Change-Id: Ia85036ce0aa4c00b0d4eb49377cdef1ae22baf1a
2018-12-25 16:59:19 -08:00
Remi NGUYEN VAN
d01eaecbd2 Merge "Add NetworkStack app" 2018-12-26 00:48:25 +00: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
TreeHugger Robot
8a0e78af42 Merge "Stop supporting null IME token in IMM#setInputMethodAndSubtype()" 2018-12-25 05:22:05 +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
Remi NGUYEN VAN
c094a5402c Add NetworkStack app
The app is not started yet, and does not contain any service for now.

Test: built, booted
Bug: b/112869080
Change-Id: Id5a0fd02c891100e85d86b1040e53beec3581950
2018-12-25 11:42:42 +09:00
Shafik Nassar
4808660569 Merge "Mitigate Intent Capturing vulnerability" 2018-12-24 16:13:03 +00:00
Andrii Kulian
60e88ecdca Merge "Add API to check if activity can be started on a display" 2018-12-23 20:43:03 +00:00
Adam Bookatz
89e8be4121 Merge "Statsd logs directly from Wifi & add Multicast tag" 2018-12-23 16:40:13 +00:00
Chandan Nath
9dc26b0fb6 Merge "[Backup cleanup] remove unused (and no-op) method setBackupProvisioned" 2018-12-23 14:50:13 +00:00
TreeHugger Robot
da398f05af Merge "New APIs for ContentCaptureService: onConnected() and onDisconnected()" 2018-12-22 10:55:19 +00:00
TreeHugger Robot
fee326de33 Merge changes I43386a3f,I097c226c
* changes:
  Refactored ContentCaptureService (and infra) to have just one RemoteService.
  Refactored ServiceNameResolver to take userId.
2018-12-22 08:53:24 +00:00
TreeHugger Robot
cccb6d3a19 Merge "Remove unused badged wifi API/drawables." 2018-12-21 23:55:53 +00:00
Felipe Leme
bb98ed6521 New APIs for ContentCaptureService: onConnected() and onDisconnected()
Bug: 117944706
Test: atest CtsContentCaptureServiceTestCases:android.contentcaptureservice.cts.BlankActivityTest#testDisconnected
Test: atest CtsContentCaptureServiceTestCases

Change-Id: Iba3c1ae774221946a550fad95539d3a9771ae3d7
2018-12-21 15:11:49 -08:00
TreeHugger Robot
8f161cea9a Merge "[wv] Update WebView factory provider class name." 2018-12-21 21:36:20 +00:00
Felipe Leme
50b33dce59 Refactored ContentCaptureService (and infra) to have just one RemoteService.
The initial implementation of AbstractPerUserService assumed the
AbstractRemoteService instances would be created in demand, because that was
the aproach used by Autofill (to minimize the time system service is bound to
the autofill service process).

But for other systems like ContentCapture, it makes more sense to keep a
permanent connection to the remote service, which is running all the time, so
this change changes the infra to allow such permanent connection (which includes
defining an idle timeout value that never unbinds).

Bug: 117779333
Test: atest CtsContentCaptureServiceTestCases CtsAutoFillServiceTestCases

Change-Id: I43386a3fddc56f1dfd6e4e55f243eaa297921123
2018-12-21 13:25:07 -08:00
TreeHugger Robot
dd6ea3bf12 Merge "Users can change zen policy for system dnd rules" 2018-12-21 21:16:38 +00:00
TreeHugger Robot
317288d513 Merge "Add nullability to obtainStyledAttributes methods." 2018-12-21 20:19:34 +00: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
Dario Freni
ce3083dcb4 Merge "Send a broadcast for staged session state changes." 2018-12-21 16:17:41 +00:00
Paul Hu
b059128f73 Merge "Unhide LinkProperties, NetworkCapabilities, NetworkRequest APIs" am: 41a0a5dd75 am: 668112800b
am: 9b3671b1d4

Change-Id: I65cd4c326a1fe64c09b131f1b1924f12e522a664
2018-12-21 07:57:58 -08:00
Beverly
1219670629 Users can change zen policy for system dnd rules
- Check consolidated zen policy in volume dialog, seek bar volumizer
and ZenModeControllerImpl instead of default notification policy
- Save ZenPolicy changes on restore

Test: atest ZenModeHelperTest
Test: atest ZenModeControllerImplTest
Bug: 111475013
Change-Id: I43b6dc8c6453739c50c874fe37415d425223d8c4
2018-12-21 10:57:54 -05:00
Paul Hu
9b3671b1d4 Merge "Unhide LinkProperties, NetworkCapabilities, NetworkRequest APIs" am: 41a0a5dd75
am: 668112800b

Change-Id: Ic641472bab2e5aa7b443caaac13deae260c3902d
2018-12-21 07:48:38 -08:00
Tobias Sargeant
b58d556772 [wv] Update WebView factory provider class name.
Test: existing CTS tests.
Change-Id: Ib64c0655a605cb38aea1e2db2a45c9a09079c9ae
2018-12-21 15:39:33 +00:00
Paul Hu
668112800b Merge "Unhide LinkProperties, NetworkCapabilities, NetworkRequest APIs"
am: 41a0a5dd75

Change-Id: Ib1f7c272192bf4a6b44d0d7c47267ec0fe0317d6
2018-12-21 07:37:22 -08:00
Paul Hu
41a0a5dd75 Merge "Unhide LinkProperties, NetworkCapabilities, NetworkRequest APIs" 2018-12-21 15:21:03 +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
TreeHugger Robot
90a78ef003 Merge "Break shared library adds into populate and modify" 2018-12-21 14:00:54 +00:00
Jorim Jaggi
99dc47483c Merge "A brave new world for window insets (5/n)" 2018-12-21 14:00:45 +00:00
shafik
69df96321f Mitigate Intent Capturing vulnerability
ResolverActivity now identifies that the intent is a browsable intent,
and thus omits the Always button and replaces it with a settings button
tha can be used to configure the user's wanted behaviour.
Also prints out a message explaining that the user is giving the app
an access to open URLs from a specific host.

Bug: 116610086
Test: manually tested on device (Pixel 2XL) - will add unit test to
document behaviour

Change-Id: I81988b9a4d082bc1e6491186d39532fd283f2ede
2018-12-21 12:33:21 +00:00
Chandan Nath
91824ff096 [Backup cleanup] remove unused (and no-op) method setBackupProvisioned
Bug: 120120742

Test: 1) atest RunBackupFrameworksServicesRoboTests
2) atest $(find \
frameworks/base/services/tests/servicestests/src/com/android/server/backup \
-name '*Test.java')
3) atest CtsBackupTestCases
4) atest CtsBackupHostTestCases
5) atest GtsBackupTestCases
6) atest GtsBackupHostTestCases

Change-Id: I7b712f346f851ca4f2b6b7d62a0a8fdcc7c77a56
2018-12-21 12:11:23 +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
Junyu Lai
698e26bfc7 Merge "Deprecate NetworkInfo" am: a244ccd86d am: df8ed1524d
am: f3176ea037

Change-Id: Iefce7f71ac10d0b9c96ce7d6af345e96880cfa1c
2018-12-21 02:28:11 -08:00
Junyu Lai
f3176ea037 Merge "Deprecate NetworkInfo" am: a244ccd86d
am: df8ed1524d

Change-Id: Ia646a8754bcd5ef62573e3b1730df3987bf9fd15
2018-12-21 02:16:39 -08:00
Junyu Lai
df8ed1524d Merge "Deprecate NetworkInfo"
am: a244ccd86d

Change-Id: I4ac76b4bb3edb85e22440c8bfa4f0979c42c0cbd
2018-12-21 02:06:09 -08:00
Junyu Lai
a244ccd86d Merge "Deprecate NetworkInfo" 2018-12-21 09:56:39 +00:00
TreeHugger Robot
434cf654db Merge "Set UID appops mode instead of package appops mode" 2018-12-21 07:22:09 +00: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
Philip P. Moltmann
159d98bda1 Set UID appops mode instead of package appops mode
In PermissionManagerService and DefaultPermissionGrantPolicy.

This mirrors what the permission controller is doing. Better make sure
all modules changing app-ops for runtime permissions do it the same way.

Test: Looked at pre-grants after boot, changed permissions after boot
Change-Id: I88386ec6842324b28ab408ea5cd113c9cc7de9fe
2018-12-20 16:08:01 -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