Commit Graph

9009 Commits

Author SHA1 Message Date
TreeHugger Robot
14f9635110 Merge "Use IBinder#shellCommand() for 'adb shell ime'" 2017-12-12 14:49:25 +00:00
Yohei Yukawa
926488d70d Use IBinder#shellCommand() for 'adb shell ime'
This is a preparation CL to add a new command to 'adb shell ime'.

Currently 'ime' command is written in Java language that relies directly
on the internal Binder IPC interface IInputMethodManager.

This is not ideal because:

 1. We have to keep maintaining IInputMethodManager methods used
    only by the 'ime' command.
 2. Adding new options to the 'ime' command is tedious when it
    requires new methods in IInputMethodManager.

With this CL, all features of 'ime' command are re-implemented inside
InputMethodManagerService (IMMS) on top of Binder's "shell command"
feature [1].  Like 'am' command was gone recently [2], now 'ime' command
is also a simple shell wrapper to forward options to 'cmd input_method',
which allows us to 1) reduce the code duplication and 2) give non-zero
status code when the command fails with Java exception.

 [1]: I76518ea6719d1d08a8ad8722a059c7f5fd86813a
      9461b6f91f
 [2]: Ia8187196af597046fd2e7092dbf19ce1dc1ea457
      1704e3cf0c

Bug: 70475949
Test: adb shell ime
Test: adb shell ime help
Test: adb shell ime dump
Test: adb shell ime list -a
Test: adb shell cmd input_method
Test: adb shell cmd input_method help
Test: adb shell cmd input_method dump
Test: adb shell cmd input_method list -a
Change-Id: I9a2dbbf1d4494addbe22c82e2c416eedc4d585f2
2017-12-11 17:24:55 -08:00
susanta.patra
02775c7852 Merge "Fixed button bar alignment issue in RTL languages" am: 403c8f72e3 am: 2063b1f792
am: bf62defed2

Change-Id: I7113cb185049848344c01b857e8a8646e9967432
2017-12-11 20:00:17 +00:00
susanta.patra
bf62defed2 Merge "Fixed button bar alignment issue in RTL languages" am: 403c8f72e3
am: 2063b1f792

Change-Id: I7493a720ef88f0b40ebed483d474a34ad9ee5da4
2017-12-11 19:41:40 +00:00
Treehugger Robot
403c8f72e3 Merge "Fixed button bar alignment issue in RTL languages" 2017-12-11 19:10:46 +00:00
Jorim Jaggi
096959932b Merge "Lock free animations (1/2)" 2017-12-09 14:23:37 +00:00
Jorim Jaggi
21c39a7771 Lock free animations (1/2)
First CL that introduces SurfaceAnimator/LockFreeAnimator

We start our synchronized app transition journey by showing that
the concept works by using WindowState animations as proof of
concept.

The main class in this CL are SurfaceAnimator and
SurfaceAnimatorRunner. When we start an animation on a Window, we
create a new bufferless surface, called "The Leash", in the
hierarchy and attach the surface of WindowState onto it, while
attaching the leash onto the old surface parent which is still
responsible for z-layering.

Then, we pass off the Leash into SurfaceAnimationRunner, which then
changes the surface properties of Leash in every animation frame,
without holding the WM lock. While it's doing that we can still
update the z-layering of the window, or even relayout the window
of needed - the important surfaces for this are still under WM's
control.

In case the animation is finished the window surface gets
reparented to its original parent, and the leash is abandoned.
Note that the reparenting is done in the same transaction as
processing the animation finish, such that we don't end up with
a flicker in case of a disappearing animation, where the window
surface gets destroyed.

In case the animation needs to be cancelled, WM can revoke control
of the leash by reparenting the window surface. Even if the
cancellation signal is heavily delayed, WM immediately regains
control over the surface by reparenting it within a transaction.

We also introduce the concept of animating a WindowContainer. We
clean up isAnimating:
- isLocalAnimating: is the container itself animating
- isAnimating: is the container or one of its parents animating
- isSelfOrChildAnimating: is local animating or any child
animating.

SurfaceAnimationRunner also needs it's own thread so it's not getting
bogged down by any WM lock contention by processing regular
animation frames. We call that thread android.anim.lf (lockfree).

Now, imagine that SurfaceAnimationAnimator would sit behind an IPC in
another process and instead of animating WindowState, we'd animate
AppWindowToken. Then, synchronized app transitions would be done.

Test: go/wm-smoke
Test: SurfaceAnimatorTest
Test: SurfaceAnimationRunnerTest
Test: WindowContainerTests
Bug: 64674361
Change-Id: I10d41f7a289ab2158da3f2f1c3ddd78edd1efc86
Exempt-From-Owner-Approval: Tiny change unrelated to display management.
2017-12-09 14:23:03 +00:00
Siyuan Zhou
89df84bfb4 Merge "BootReceiver: Added an event log after the dropbox file copy is successful." am: 5323d42b82
am: c044749416

Change-Id: If096fea07e31abbd8c5c418c776296c1200009d9
2017-12-09 03:18:08 +00:00
Siyuan Zhou
070e318501 BootReceiver: Added an event log after the dropbox file copy is successful.
The log can be used to test if LAST KMSG or other items are copied
to dropbox successfully, especially in user builds without root
privilege.

BUG: 69685635

Test: manually verified the desired log from bugreport on user
and userdebug builds.

Change-Id: I6570d95538d678c98d261690ca3c20416d7a31c6
Merged-In: Ie6033bf04c7f79fc596761ab751aa5fcea2c1130
(cherry-picked from commit bafcd7b595)
2017-12-08 22:51:23 +00:00
Siyuan Zhou
bafcd7b595 BootReceiver: Added an event log after the dropbox file copy is successful.
The log can be used to test if LAST KMSG or other items are copied
to dropbox successfully, especially in user builds without root
privilege.

BUG: 69685635

Test: manually verified the desired log from bugreport on user
and userdebug builds.

Change-Id: Ie6033bf04c7f79fc596761ab751aa5fcea2c1130
2017-12-08 09:52:17 -08:00
susanta.patra
1b0b22ce08 Fixed button bar alignment issue in RTL languages
Buttons should be aligned opposite to English in RTL languages.

Test: 1. RTL language
      2. Create an alert dialog having positive, negative and neutral button.
      3. Check the button bar alignment
Bug: 70363698

Change-Id: I783dfdcf9cb3f85402a4ff3fa4c2d1d1caf5c3da
Signed-off-by: susanta.patra <susanta.patra@lge.com>
2017-12-08 11:55:40 +05:30
TreeHugger Robot
9ebf8233dd Merge "Disable RT animations for notification actions" 2017-12-08 02:04:06 +00:00
Tarandeep Singh
ab39cc5797 Merge "Add support for VR InputMethod." 2017-12-08 00:57:20 +00:00
Tarandeep Singh
89a6c48a8b Add support for VR InputMethod.
This change adds support for VR-only IMEs in InputMethod framework.
In order to set this VR IME, setVrInputMethod(ComponentName) should be
called by VrManager.

When VrManager calls setVrInputMethod(), IMMS changes updates
the selected input method in a transient way i.e. it doesn't
update the Settings or input history. Once VR mode finishes,
it restores last input from settings.

Bug: 63037786
Test: Manually using the sample app in bug.

Change-Id: I1db7981b5198e7e203d4578cae7e5b6d20037d0d
2017-12-08 00:55:11 +00:00
John Reck
4aef52667d Disable RT animations for notification actions
Bug: 69474443
Test: systrace'd an inline reply
Change-Id: Ifb4d615f6b141d7925565f89cf776a6eb81a75f8
2017-12-07 14:55:26 -08:00
Mike Digman
6e15c2a89a Merge "Extend RotationPolicy to lock the screen at a specific rotation" 2017-12-07 21:53:13 +00:00
TreeHugger Robot
33203ffd18 Merge "Display Cutout: Dispatch Cutout from WindowManager" 2017-12-07 20:36:13 +00:00
Adrian Roos
5c6b622328 Display Cutout: Dispatch Cutout from WindowManager
Adds the logic to dispatch a DisplayCutout from DisplayFrames
through WindowState to the View hierarchy. Does however not yet
change how windows are laid out in response to a DisplayCutout.

The display cutout is currently never present, the following CL
will add logic to emulate a display cutout on devices that do
not have a physical one.

Bug: 65689439
Test: runtest -x frameworks/base/services/tests/servicestests/src/com/android/server/wm/WindowFrameTests.java
Change-Id: Ie4cd4b575755b66a7ffead31e28640983ef4894e
2017-12-07 19:43:33 +01:00
TreeHugger Robot
347a6f8862 Merge "Change shared looper tag from ACTIVITY_MANAGER to SYSTEM_SERVER" 2017-12-06 18:00:32 +00:00
Mike Digman
6ca8711b7b Extend RotationPolicy to lock the screen at a specific rotation
Test: manual
Change-Id: Ic39fed014d614c4c473f6728dd922ca0f1ad2244
2017-12-06 09:46:52 -08:00
Phil Weaver
3834e91e13 Merge "Allow a11y shortcut to toggle framework features" 2017-12-06 17:39:04 +00:00
TreeHugger Robot
b5f48b2392 Merge "Add latency logging for rotation" 2017-12-06 16:54:45 +00:00
TreeHugger Robot
57a69f683c Merge "Revert "Don't generate irrelevant a11y events - framework"" 2017-12-06 16:48:16 +00:00
Jason Monk
ea03be1056 Add latency logging for rotation
Move LatencyTracker and sysui_latency to make this possible

Fixes: 67862696
Test: atest
platform_testing/tests/perf/PerfTransitionTest/src/com/android/apptransition/tests/LatencyTests.java#testRotationLatency

Change-Id: I42e3218355c162d4ba04b0f2c49e031156b5a357
2017-12-06 15:02:17 +00:00
Michael Wright
daf72b1bd1 Change shared looper tag from ACTIVITY_MANAGER to SYSTEM_SERVER
Most of these are shared, so enabling all ActivityManager logging just
to get looper traces seems wrong.

Test: build, trace with system_server tag, see looper info
Change-Id: I3741dbacab25f5c02f6f8d17f0c8377d8f842776
2017-12-06 13:21:11 +00:00
TreeHugger Robot
057087457b Merge "Revert "Add latency logging for rotation"" 2017-12-06 04:56:46 +00:00
TreeHugger Robot
8cb0cf0aa9 Merge "Allow caller to specify target to start in setQuietModeEnabled" 2017-12-06 01:18:52 +00:00
Wale Ogunwale
79c1f22243 Revert "Add latency logging for rotation"
Causing deadlock in system-server

Bug: 70238465
Bug: 67862696

This reverts commit 453e7c1c07.

Change-Id: I9d37ff303dee577c36283ccd50f134abd76b556a
2017-12-06 01:12:11 +00:00
Eugene Susla
d4128ec0df Revert "Don't generate irrelevant a11y events - framework"
This reverts commit 8ddfb4794f.

Test: presubmit
Bug: 69975306
Change-Id: I05cb545eb0adc77298dddf2dea2997ef36b58a5f
2017-12-05 13:08:51 -08:00
TreeHugger Robot
1523386d85 Merge "PooledLambda" 2017-12-05 20:38:25 +00:00
Dianne Hackborn
d5b9266f01 Merge "Add major version code to platform." 2017-12-05 20:12:17 +00:00
Eugene Susla
2f5ee71ec8 PooledLambda
This introduces PooledLambda - a way of obtaining lambdas without the
allocations overhead.

See PooledLambda javadoc for a guide and PooledLambdaSample for code samples
of useful usages.

Test: ensure samples of PooledLambdaSample work as described.
Change-Id: I46f8ad27bc1de07e19f6e39f89d2cafe4238497a
2017-12-05 10:46:59 -08:00
Phil Weaver
b9f0612ca0 Allow a11y shortcut to toggle framework features
Enabling color inversion and color correction initially.

Not showing toast for the framework features, as both are
instantly visible changes and the extra reminder seems like
it will get in the way.

Moving AccessibilityShortcutController to a place where
it can be seen by Settings, so Settings can learn what
framework features to offer the user. Moving tests for that
class to match.

Currently don't have icons for the two framework features.
They will be added in a future CL once I get them.

Also tweaking the warning dialog to include summary
information, if we have it, for the target service.

Bug: 34621067
Bug: 36368472
Test: Adding unit tests for framework features
Change-Id: I32a10989db1c9ad9bf22aae9ad405771b789bc6f
2017-12-05 09:41:01 -08:00
Jason Monk
a094c37449 Merge "Add latency logging for rotation" 2017-12-05 16:11:32 +00:00
Tony Mak
64fd8c0bdd Allow caller to specify target to start in setQuietModeEnabled
So, UMS can start the target once user is unlocked.

Test: No secure lock. Try turn off and on work mode by tapping work app.
Test: Have secure lock. Try turn off and on work mode by tapping work app.
Test: Turn off work mode. Reboot. Try to tap on any work app to turn on work mode.

BUG:69926710

Change-Id: Iaaccd5d763f7e36e5a43bad5261f1eb16060f9d6
2017-12-05 15:55:19 +00:00
TreeHugger Robot
1a958a57b8 Merge "Revert "Smooth scroll RecyclerView on a11y ACTION_SCROLL_*"" 2017-12-05 01:17:47 +00:00
Dianne Hackborn
3accca05dd Add major version code to platform.
It turns the version code into almost a 64-bit integer, with the
new major part being the upper 32 bits.

The only tricky part about this is the backup manager, since it
stored 32-bit version codes in its backup data sets.  This is dealt
with by, when the major version code is not 0, writing MIN_INT as
the version code and following that by the full long version code,
which we can detect when reading.  Note that this makes backup sets
containing apps with major version codes incompatible with older
versions of the platform.

Bug: 64459786
Test: Added in Change-Id: Iab8a682b62103babd6c16a56b8dc1e97d7078658
Change-Id: Ibfffe235bbfcf358b3741abd3f7197fdb063d3f3
2017-12-04 13:02:10 -08:00
Eugene Susla
f13b085f59 Revert "Smooth scroll RecyclerView on a11y ACTION_SCROLL_*"
This reverts commit 8b2eb6fe54.

Change-Id: Ia872874026286e709a1fa5e071c510838405d264
2017-12-04 19:46:27 +00:00
Jason Monk
453e7c1c07 Add latency logging for rotation
Move LatencyTracker and sysui_latency to make this possible

Fixes: 67862696
Test: atest
platform_testing/tests/perf/PerfTransitionTest/src/com/android/apptransition/tests/LatencyTests.java#testRotationLatency

Change-Id: I44ddbc625b8aba7b1d43858688349c9bfb0f9470
2017-12-04 11:20:22 -05:00
TreeHugger Robot
70de9728d2 Merge changes from topic "priv_vendor_app"
* changes:
  BIND_IMS_SERVICE is exposed to vendors
  Support privileged vendor apps
2017-12-04 03:20:34 +00:00
TreeHugger Robot
19a7dbfbaa Merge "Add ability for ResolverDrawer to be align to top via XML attribute." 2017-12-02 01:17:46 +00:00
Ben Lin
93b8697cdc Add ability for ResolverDrawer to be align to top via XML attribute.
Bug: 70036020
Test: ResolverActivityTest#setShowAtTopToTrue passes.
Change-Id: I2c51c9c731234f05a589c52d5a03b8b6605d4c9c
2017-12-01 12:24:37 -08:00
Bernardo Rufino
d6ba912bb9 Merge "Binding on-demand #3: updateTransportAttributes() API" 2017-12-01 12:06:23 +00:00
Bookatz
ddccf0a94e Add/fix a few statsd atoms
Adding atoms:
MobileRadioPowerStateChanged
WifiRadioPowerStateChanged
DeviceIdlingModeStateChanged

Made the following other atom changes:
Added tag to WakeupAlarmOccurred
Changed some ints to enums
Removed the obsolete UidWakelockStateChanged

Test: none
Fixes: 69479171
Fixes: 69479176
Fixes: 69479177
Fixes: 69479169
Change-Id: I815c0f896ef050a4bc1fca482fb02ccb8e78f009
2017-11-30 19:08:26 +00:00
Bernardo Rufino
ab953332bc Binding on-demand #3: updateTransportAttributes() API
This CL introduces the updateTransportAttributes() API to be used by the
transport hosts. It doesn't actually use the description attributes yet,
this will go in another CL. This is because I want to test that CL
together with transport usage. Tests are lacking for TransportManager
and BMS, I'll still add them, but I'm trying to migrate Robolectric
first.

Ref: http://go/br-binding-on-demand
Bug: 17140907
Test: make RunFrameworksServicesRoboTests
Test: runtest -p com.android.server.backup frameworks-services
Test: gts-tradefed run commandAndExit gts-dev -m GtsBackupTestCases
Test: gts-tradefed run commandAndExit gts-dev -m GtsBackupHostTestCases
Test: cts-tradefed run commandAndExit cts-dev -m CtsBackupTestCases
Change-Id: I56f7b5a5026d21d8f11afb371d5560d4913c5f2a
2017-11-30 14:26:13 +00:00
Jiyong Park
002fdbdb95 Support privileged vendor apps
Privileged apps can now be located in the vendor partition. This is
mainly to move SoC-dependent apks to the vendor partition so that the
system partition becomes more generic.

Like existing privileged apps in the system partition, the list of
privileged apps in the vendor partition and the permissions they are
using must be white-listed. The whitelist can be specified via
<privapp-permissions> tags in one of /vendor/etc/permissions/*.xml
files. Note: vendors can only white-list the apps in vendor partition,
but not the apps in system partition.

This change also introduces a new flag 'vendor-privileged' to the
permission protection level. It is used to expose platform-defined
permissions to the privileged vendor apps. If a platform permission does
not have this flag, it is not granted to vendor apps even when the app
is privileged and white-listed.

Bug: 35301609
Test: `mm` under frameworks/base/tests/privapp-permissions
adb sync && adb reboot
adb shell cmd package \
com.android.framework.permission.privapp.tests.vendor
shows that the app is installed.
android.permission.BIND_IMS_SERVICE is in the installed permissions list
android.permission.MANAGE_USE is not in the installed permissions list,
but is in the requested permissions list.

Change-Id: I196375aaaa9ea3a2ba15686ef08cf3f70ade7046
2017-11-30 14:41:55 +09:00
TreeHugger Robot
fb19b383bf Merge "Fix horizontal position of tooltip in a Dialog" 2017-11-29 23:51:38 +00:00
TreeHugger Robot
229f0d0305 Merge "Don't generate irrelevant a11y events - framework" 2017-11-29 20:56:37 +00:00
Sudheer Shanka
9fdbc957c6 Merge "Track some event history and include it in netpolicy dump." 2017-11-29 18:35:39 +00:00
Mike Digman
241d98785a Merge "Add route for rotation suggestions from StatusBar to CommandQueue" 2017-11-29 18:10:06 +00:00