Commit Graph

7623 Commits

Author SHA1 Message Date
Andrii Kulian
c1b59ed73e Merge "Separate global and override config sent to client" 2017-03-17 15:39:37 +00:00
Andrii Kulian
446079600e Separate global and override config sent to client
There is some flakiness in View#onConfigurationChanged callback -
if ViewRootImpl receives config update earlier than ActivityThread,
it may not detect the configuration change and skip inner updates.
Also now ViewRootImpl assumes that it receives the global config as
a param, but instead it gets merged config from WM. This means that
ViewRootImpl#sConfigCallbacks was sending incorrect values to the
recipients.

This CL switches to sending global and override configuration to the
client separately. Also in case if there is a corresponding activity,
it first updates it and waits for update callback to ViewRootImpl.
This way global config and override config for activity will always
be set first and resources will be updated before inner state of
ViewRootImpl is updated.

Bug: 35870157
Bug: 34164473
Test: android.server.cts.ActivityManagerDisplayTests
Test: testOnMovedToDisplayCallback
Change-Id: Ic9e7541cf25ecfac6ec90e48f7efb0ece91f657e
2017-03-16 19:13:02 -07:00
Selim Cinek
35cb746e1d Merge changes I414b9a5f,I0a08b06b
* changes:
  Fixed a bug where the notifications could get stuck animating
  Better messaging style wrapping
2017-03-16 20:25:02 +00:00
tony.ys_liu
180f5e918c Merge "Set system server's class loader for wrap.system_server" am: 8d2d6bfa12 am: 959628a32e
am: d794855fba

Change-Id: Id7f48fe3c4b1855e8e9a450c70db00f057502ad4
2017-03-16 15:54:02 +00:00
tony.ys_liu
959628a32e Merge "Set system server's class loader for wrap.system_server"
am: 8d2d6bfa12

Change-Id: Iba4af152c9f29ad6e8c9bb1b0a1047e96d287c6b
2017-03-16 15:42:53 +00:00
Julia Reynolds
1d97e6a0c1 Remove resource id channel/group name fields
Apps can listen for the LOCALE_CHANGED broadcast to
change names if needed.

Fixes: 35336590
Test: runtest systemui-notification, cts, manual
Change-Id: I62d2778f61e99200692755a6f268828a374837e6
2017-03-16 14:20:28 +00:00
tony.ys_liu
34738174ba Set system server's class loader for wrap.system_server
Root Cause: systemServer's class path is not set
  after set wrap.system_server property, and restart system_server,
  it shows a java.lang.RuntimeException:
    Missing class when invoking static main com.android.server.SystemServer

Solution: Correctly pass and parse a passed classpath.

Bug: 34692265
Test: adb root && adb shell stop && adb shell setprop wrap.system_server logwrapper && adb shell start
Change-Id: Ia6707dc05fa627af6cc28360d26b894487a6eff1
2017-03-15 16:33:04 -07:00
Mady Mellor
da42f4aaa9 Merge "Enables drag to dismiss for PiP and adds a dark scrim when dismissing" 2017-03-15 21:59:04 +00:00
Abodunrinwa Toki
047fe04766 FloatingToolbar: Change divider color.
Test: Visually inspected.
Bug: 36038316
Change-Id: I4bf3b2abdfe15ff02b3969d1824752640e733128
2017-03-15 19:14:26 +00:00
Mady Mellor
81d406104a Enables drag to dismiss for PiP and adds a dark scrim when dismissing
- Adds a scrim that fades in as the PiP is dragged past the bottom movement
  bounds.
- Tweaks the values for minimizing the PiP and dismissing the PiP
- Fixes an issue where the PiP could be minimized in the bottom corners
  of the screen

Test: Manual - drag PiP to bottom of screen to dismiss or swipe down on
PiP when it's at the bottom of the screen
Bug: 35358768
Bug: 35358628
Change-Id: Ib4ad5ed7094fef76ea979b46ea7e03d746625d00
2017-03-15 11:00:32 -07:00
Garfield Tan
9bd2f6c990 Update path in MediaStore when moving/renaming a file/folder.
Also fix a bug that doesn't trigger directory specific update for
removal.

Test: Manual tests.
Bug: 31001477
Change-Id: Ibae8a7aa5c72c82dc5e3cb4951fbc91ea6456964
(cherry picked from commit c574ec40640d83dfbbb0f022103c6dfa774bca40)
2017-03-15 17:14:44 +00:00
Nick Kralevich
35775783fc ZygoteInit: Remove CAP_SYS_RESOURCE
Please see commit 3082eb7c72 for an
explanation of this change.

This capability is not used by system_server.

Bug: 34951864
Test: code compiles, device boots, no selinux errors ever reported.
Change-Id: I4242b1abaa8679b9bfa0d31a1df565b46b7b3cc3
2017-03-14 18:30:03 +00:00
TreeHugger Robot
cf03c26f92 Merge "ZygoteInit: remove duplicate preloadOpenGL call" 2017-03-14 18:28:31 +00:00
Nick Kralevich
0fcb43ac75 ZygoteInit: remove duplicate preloadOpenGL call
Commit ba0370eef3 added a call to
preloadOpenGL(), The nyc-mr2-dev cherrypick of that same commit
(b3a1417663) was improperly handled
by the automerger and added yet another call to preloadOpenGL().
Remove the duplicate call.

Test: code compiles.
Change-Id: Ie2a1c73155197506ee9571f2c05988c77a750281
2017-03-14 09:27:50 -07:00
TreeHugger Robot
376c6471da Merge "Associate rotation watchers with displays" 2017-03-14 08:30:05 +00:00
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
Andrii Kulian
35fa3c26ad Associate rotation watchers with displays
Displays can be rotated separately and rotation watcher clients
are only interested in rotation of some specific display. This CL
adds displayId to rotation watchers and only informs them about
changes on their display.

Bug: 34242678
Test: Manual and debug.
Change-Id: If0f03804da0392c2b14a4e7c2d6a06068ad8760b
2017-03-13 18:27:24 -07: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
Selim Cinek
9281e5e1c4 Better messaging style wrapping
Messaging style is now not dropping previous messages
anymore if they don't fit completely. Instead we are
truncating it.

Test: send various text messages, observe nice layout
Fixes: 35944700
Change-Id: I0a08b06bf7624ee62e81bfd384721c8458c9c9d4
2017-03-13 16:00: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
Hiroshi Yamauchi
55310df6bc Merge "Fix the reset of boosted zygote thread priority."
am: 83aceea07d

Change-Id: I6ebd30a631ae10ada65b3279ec66c41d3f50fb1f
2017-03-13 17:42:50 +00:00
Hiroshi Yamauchi
04ed650083 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.

(cherry picked from commit 1e3db871e5)

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

Change-Id: I68a6ed7244a9067acc2749feca7f88422bf44b02
2017-03-13 10:31:30 -07: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