Commit Graph

7604 Commits

Author SHA1 Message Date
TreeHugger Robot
67916b86e9 Merge "Dont dispatch a11y events that have no subscribers" 2017-03-14 04:35:38 +00:00
TreeHugger Robot
32d08a1440 Merge "BatteryStats: Prevent double-detaching Counter" 2017-03-14 01:34:26 +00:00
Eugene Susla
ef4351cc72 Dont dispatch a11y events that have no subscribers
This allows to avoid A11yManager -> A11yManagerService IPC, when there's no
subscribers to a given event

Test: steps:
  - Enable A11yManager.DEBUG
  - Navigate through a few random activities
  - In logcat, ensure log messages are present, notifying that certain events
  won't be dispatched
Change-Id: Ia019fb66053f10095b3651407d09de8e89cdd227
2017-03-13 17:51:04 -07:00
Adam Lesinski
5f212c86a4 BatteryStats: Prevent double-detaching Counter
Detaching a Counter from a TimeBase means you can't use it anymore.
Only newly constructed Counters are automatically attached to a TimeBase.

Bug: 34200689
Test: make FrameworkCoreTests && adb install ... && adb shell am instrument -w -e class com.android.internal.os.BatteryStatsSensorTest com.android.frameworks.coretests
Change-Id: I9309000d5625aa6fe61a3c05f135e5828137d8ce
2017-03-13 22:39:24 +00:00
TreeHugger Robot
bd7ae7df28 Merge "Basic accessibility support for picture-in-picture" 2017-03-11 01:52:51 +00:00
TreeHugger Robot
1e24da7e56 Merge "Support multiple filters per association request" 2017-03-11 01:14:49 +00:00
Phil Weaver
f00cd14f17 Basic accessibility support for picture-in-picture
Exposing actions from the PIP InputConsumer to accessibility,
stripping all actions from a covered PIP app, and adding the
InputConsumer's actions on the PIP app's root view.

We were also using an "undefined" accessibility ID to mean
three different things: a root view, a host view of a virtual
view hierarchy, and a truly undefined view. I've introduced
new values for cases where the id could be defined.

Also gathering all window IDs into one place to reduce the
chance of collisions.

Bug: 34773134
Test: In progress. Current cts passes.
Change-Id: I97269741a292cf406272bf02359c76c396f84640
2017-03-10 15:35:30 -08:00
TreeHugger Robot
cfdfd997bd Merge "Modify SurfaceView to use SurfaceFlinger child surfaces." 2017-03-10 05:15:21 +00:00
Eugene Susla
36e866b8e0 Support multiple filters per association request
By supporting multiple filters per one request we should be able to cover
multiple kinds of use cases such as:
 - Letting the user select from a list of devices of more then one medium
 type (e.g. Bluetooth and BLE)
 - Allowing to provide multiple criteria for any field (e.g. filtering by
 more than one service UUID)

Bug: 30932767
Test: Provide multiple filters and ensure that devices matching either are
shown in the list to choose from.
Ensure wifi SSIDs are shown in the list if wifi filter is provided

Change-Id: I0a978787551a1ee5750ec5544b241d3bbfed5a7c
2017-03-09 17:52:49 -08:00
TreeHugger Robot
8c47c6deb2 Merge "PIP should only move along long edges when on phone" 2017-03-10 01:17:19 +00:00
Adrian Roos
7446235e7d Merge changes Ie17eedfd,Icb80843a,If1619c10,Iee23682a
* changes:
  AOD: Add wakelock for charging text while dozing
  AOD: Show charging status on AOD1
  AOD: Fix default for always-on setting
  Revert "Revert "AOD: Refactor always on configuration""
2017-03-09 23:25:56 +00:00
TreeHugger Robot
956d00cbe8 Merge "more testable MetricsLogger interface" 2017-03-09 21:55:47 +00:00
Hiroshi Yamauchi
d0af843c75 Merge "Fix the reset of boosted zygote thread priority." 2017-03-09 21:32:47 +00:00
Adrian Roos
22a905eef1 AOD: Fix default for always-on setting
Change Ic35bd3c04d150fd3eb85d76db0043880b31a011f mistakenly
flipped the default to on. Change it back to off.

Test: runtest -x frameworks/base/packages/SystemUI/tests/src/com/android/systemui/doze/DozeConfigurationTest.java
Fixes: 36027947
Change-Id: If1619c10f8cc269f2dd852e166ac959e6c9c590a
2017-03-09 13:25:59 -08:00
Adrian Roos
0261fb2a19 Revert "Revert "AOD: Refactor always on configuration""
This reverts commit cdcc5c438949ce3d942c95204555680e080c17ed.

Bug: 36027947
Change-Id: Iee23682a9d82f930484c3f4c15d99f21a0f1bc36
2017-03-09 13:25:59 -08:00
Mady Mellor
89dc00a3ad PIP should only move along long edges when on phone
Phone portrait: restrict movement to left / right edges
Phone landscape: restrict movement to top / bottom edges

Tablet: allow PIP on all edges regardless of orientation

Test: manual - have PIP try to move along top / bottom edge
in phone portrait, and left / right edge in phone landscape
Fixes: 35358644
Change-Id: Ie50ae220782936942d1bcd8d9251d7275832a47f
2017-03-09 12:31:00 -08:00
Chris Wren
ef3199040f more testable MetricsLogger interface
Begin migration to non-static methods to allow easier mocking.
New clients should use the non-static methods.
Old clients that want to unit test metrics
should move to the new interface.

Bug: 35138327
Test: runtest --path frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java
Change-Id: I168f3787ee50ddde8aa2d42c05b2b816d1d3a30e
2017-03-09 14:41:10 -05:00
Hector Tellez
7986b529f7 Merge "Revert "Support multiple filters per association request"" 2017-03-09 18:30:53 +00:00
Hector Tellez
d66c95fa90 Revert "Support multiple filters per association request"
This reverts commit e70e6aa62c.

Change-Id: I12857cbbea0a0c74521191ab5e3713db230626ab
2017-03-09 17:55:43 +00:00
Eugene Susla
acddd2c2ae Merge "Support multiple filters per association request" 2017-03-09 17:19:20 +00:00
Glenn Kasten
d929cb1d92 Merge "USB audio: Use 'final' where possible" 2017-03-09 16:22:34 +00:00
Glenn Kasten
cb8724c572 Merge "Comment out unused methods" 2017-03-09 16:22:15 +00:00
Robert Carr
d5c7dd6da8 Modify SurfaceView to use SurfaceFlinger child surfaces.
Here we have SurfaceView bypass the WindowManager and speak
directly to SurfaceFlinger using child surfaces. We also
implement some logic in the WM to handle child surfaces
in various Surface replacement scenarios.

For those following along in the revert Saga, this
also includes the follow up CLs to the original CL.
- Surface inset calculation
- Animation fixes.

The error causing the revert was an incorrect JNI signature
around deferTransactionUntilSurface. I've noted it inline.

Bug: 28858420
Bug: 31518219
Bug: 34888808
Bug: 35588318
Bug: 35396882
Test: Existing tests still pass (except for the ones that don't and will be deleted).
Change-Id: Ie56b6f7ab16f32d7fc459b8eba26594337ad55de
2017-03-08 17:36:10 -08:00
Eugene Susla
e70e6aa62c Support multiple filters per association request
By supporting multiple filters per one request we should be able to cover
multiple kinds of use cases such as:
 - Letting the user select from a list of devices of more then one medium
 type (e.g. Bluetooth and BLE)
 - Allowing to provide multiple criteria for any field (e.g. filtering by
 more than one service UUID)

Bug: 30932767
Test: Provide multiple filters and ensure that devices matching either are
shown in the list to choose from.
Ensure wifi SSIDs are shown in the list if wifi filter is provided
Change-Id: I6621da388e2bf4ed97c5af2692629a321d0b63c7
2017-03-08 16:52:14 -08:00
Hiroshi Yamauchi
1e3db871e5 Fix the reset of boosted zygote thread priority.
This fixes the unexpected priority 112 of the daemon threads
(eg. HeapTaskDaemon). The problem was that when the zygote main
thread's priority is reset, it directly calls setpriority() and fails
to update the priority value in java.lang.Thread, which in turn causes
any threads created by the thread to unexpectedly inherit the boosted
priority. Calling java.lang.Thread.setPriority instead fixes.

Bug: 35801778
Bug: 28866384
Test: angler master userdebug boots and thread priorities checked.

Change-Id: I68a6ed7244a9067acc2749feca7f88422bf44b02
2017-03-08 13:17:02 -08:00
Keun-young Park
c09af775c6 Merge "log fs_stat from fs_mgr and mount_all time" 2017-03-08 20:56:17 +00:00
Keun-young Park
b799838dbe log fs_stat from fs_mgr and mount_all time
- fs_mgr reports fs_stat int value during bootup when mounting
  an ext4 partition.
- This includes information like:
  if previous shutdown was clean
  if e2fsck has fixed any fs issue
  if any mounting or quota related operations has failed.
- Each information is set as flag. Flag definitions are avaiable from
  FsStatFlags in system/core/fs_mgr/fs_mgr.cpp
- log ro.boottime.init.mount_all.[early|default|late] which represent
  time duration for each mount stage. Depending on device's config, some of
  these stages may not exist. So do not log if value is 0, which means not existing.

bug: 32246772
bug: 35949600
bug: 35329915

Test: manual, check log after boot-up.

Change-Id: I4ceca88776119d88d5352d6793be122e82688279
2017-03-08 11:28:12 -08:00
Santos Cordon
9c2886ba5d Merge "Map STATE_VR to STATE_ON for Battery Stats." 2017-03-08 18:40:27 +00:00
TreeHugger Robot
63976669f5 Merge "Store alphaChar as lower case in MenuItem's implementations" 2017-03-08 17:52:40 +00:00
Philip P. Moltmann
ef98cead57 Merge "Log histogram of fsync times of sharedPreferences" 2017-03-08 17:13:28 +00:00
TreeHugger Robot
07be4d6781 Merge "Revert "Modify SurfaceView to use SurfaceFlinger child surfaces."" 2017-03-08 06:28:11 +00:00
Eugene Susla
915b42bd95 Merge "Record app<->device association to xml file" 2017-03-08 02:16:13 +00:00
Wonsik Kim
5aec7b9031 Revert "Modify SurfaceView to use SurfaceFlinger child surfaces."
This reverts commit cd4aeef880.

Bug: 36027342
Bug: 36015884
Change-Id: Ifd5b69caf64d65a8cd6570b7fe1fb6abe90e30b8
2017-03-08 01:52:19 +00:00
Amith Yamasani
a94c4b5b2e Merge "Collect background network data stats in BatteryStats" 2017-03-07 22:40:49 +00:00
Adrian Roos
805dfb836a Merge "Revert "AOD: Refactor always on configuration"" 2017-03-07 20:53:25 +00:00
Adrian Roos
c45944b680 Revert "AOD: Refactor always on configuration"
This reverts commit 28d26a821f.

Bug: 36027947
Change-Id: I3d4c2e58b753120ff668a4594f60692abc6a3426
2017-03-07 20:21:47 +00:00
Peeyush Agarwal
2ef1d0cfca Store alphaChar as lower case in MenuItem's implementations
We should be working with lowercase everywehre (since SHIFT is also a
modifier). Also, in findItemsWithShortcutForKey, we only compare the
character against the lower case version of key pressed (and not the
upper case version).

Bug: 35992521
Test: Manual
Change-Id: I01f24afc5f6c9ef55d477806a64a4a1ec262f28a
2017-03-07 16:48:00 +00:00
Chris Wren
f33926abed remove the last of the legacy log helpers
All logs should now flow through LogMaker.

Bug: 34705522
Test: mmma -j20 platform_testing/tests/functional/notificationtests && adb install -r -g /data/app/NotificationFunctionalTests/NotificationFunctionalTests.apk && adb shell am instrument -w -e iterations 1 -e class com.android.notification.functional.NotificationInteractionTests com.android.notification.functional/android.support.test.runner.AndroidJUnitRunner && runtest --path platform_testing/libraries/metrics-helper/tests
Change-Id: I94732c84564e4cb25d77b63be8beb4aab4c38985
2017-03-07 10:49:07 -05:00
TreeHugger Robot
7cae77b606 Merge changes Iefcaf262,I9c397d83
* changes:
  Fixed a bug where the expand icon could show but nothing happens
  Improved expand accessibility experience
2017-03-07 05:44:54 +00:00
Winson Chung
f4284638c4 Merge "Update how PIP size is determined" 2017-03-07 05:01:23 +00:00
TreeHugger Robot
4540811b4d Merge "AOD: Refactor always on configuration" 2017-03-07 04:40:30 +00:00
Glenn Kasten
3fcf85cd91 Comment out unused methods
Test: compiles OK
Change-Id: I6f5513e7c5655e91e4cc3dd8de8ec407b9f7b94e
2017-03-06 17:42:21 -08:00
Glenn Kasten
ff6615f653 USB audio: Use 'final' where possible
Test: compiles OK
Change-Id: I14677ef55b14ae0cc60b6145350e70c475cc987e
2017-03-06 17:41:47 -08:00
Eugene Susla
47aafbe033 Record app<->device association to xml file
Bug: 30932767
Test: Ensure file not exists -> query associations -> ensure result is empty list
  Associate device -> cat xml file -> ensure record appears as extected
  Disassociate device -> cat xml file -> ensure record is no longer present
Change-Id: Ibe456a6d9292e05e2391f5138e43fdaa37f87e1b
2017-03-06 16:53:32 -08:00
Mady Mellor
a7f69740b5 Update how PIP size is determined
- minSize = 108dp
- defaultSmallestEdge = max(23% of screen width, minSize)
- the shortest edge of the PIP should be minSize and the rest scales
  according to the aspect ratio
- rather than a default PIP size, use default aspect ratio
- adding expand button
- fitting actions to spec

Fixes: 35358504
Test: manually used test app to try different aspect ratios
Change-Id: Ib6890fb7824889b9edeea7efb5b9771e64fc1514
Signed-off-by: Winson Chung <winsonc@google.com>
2017-03-06 16:39:11 -08:00
Philip P. Moltmann
e64a521084 Log histogram of fsync times of sharedPreferences
Example log:

Time required to fsync
/data/user/0/com.google.android.gms/shared_prefs/gms_sync_prefs_sync:ContactMetadata.xml:
[<1: 0, <2: 0, <4: 0, <8: 0, <16: 0, <32: 0, <64: 0, <128: 0, <256: 0,
<512: 0, <1024: 1, <2048: 0, <4096: 0, <8192: 0, <16384: 0, >=16384: 0]

Fixes: 30662828
Test: Looked at log
Change-Id: I6d585b107ae14e05ff1c77b0a0017de684226cba
2017-03-06 15:00:39 -08:00
Santos Cordon
e94f05019c Map STATE_VR to STATE_ON for Battery Stats.
Also, sets STATE_VR to be a public API value for Android O release.

Test: Switch to VR mode, ensure "Unexpected screen state: 5" no
longer logs from BatteryStatsImpl
Bug: 35636815

Change-Id: I1f8be334967e1af1f92a3ed571c063e7b00106b1
2017-03-06 13:51:01 -08:00
Amith Yamasani
59fe841e60 Collect background network data stats in BatteryStats
Keep the original values the same, to avoid messing
up existing pipelines and stats, and keep additional
counters for background traffic stats for mobile and
wifi.

Bug: 35677165
Test: cts-tradefed run cts-dev -m CtsDumpsysHostTestCases
Change-Id: I5f5ac3d5b659fe3d0b13703e6666a8751c5d9469
2017-03-06 10:38:36 -08:00
Selim Cinek
c0ac4af13b Improved expand accessibility experience
The expand action is now on the notification itself
instead of the expand button, this way a user immediately
know if it is expanded.
It also improves the click feedback of the expand button

Test: add notifications, observe accessibility feedback
Change-Id: I9c397d839df52d5354d7ae16725ce3e595da19c7
Fixes: 32322410
Fixes: 35064589
2017-03-03 15:13:48 -08:00
TreeHugger Robot
c2c345d613 Merge "Fix crash in secondary user" 2017-03-03 23:10:32 +00:00