Commit Graph

7773 Commits

Author SHA1 Message Date
Garfield Tan
9361541998 Add special URI to MediaStore for directories.
Bug: 36048049
Bug: 31001477
Change-Id: I69032481271b7f53c22403c3526560e6830bd9e8
(cherry picked from commit 1ca2837111c8383f9c8daf1420356998f4fb218f)
2017-03-21 20:05:04 +00:00
Andreas Gampe
1185eebefb resolve merge conflicts of 9034b2717c to master
Change-Id: Ifcc9fdbf8581e81a61f7a279c2b7d3177e972596
2017-03-21 12:17:16 -07:00
Andreas Gampe
1d9c3ba10d Merge "Zygote: Preserve capabilities in WrapperInit"
am: 1ae7af10ff

Change-Id: Ia1ffb03d6e03b098cc634ef2deb3785c6bb87202
2017-03-21 18:54:22 +00:00
Andreas Gampe
220aba254b Zygote: Preserve capabilities in WrapperInit
Preserve the capabilities a zygote fork has across the sh exec in
WrapperInit. Use ambient capabilities.

Test: m
Test: adb shell setprop wrap.com.android.bluetooth logwrapper && adb shell kill `pid com.android.bluetooth`
Merged-In: I3526d6a31aaadf082365c9ce31da0950e17677eb
Change-Id: I3526d6a31aaadf082365c9ce31da0950e17677eb
2017-03-21 08:39:26 -07:00
Keun-young Park
60ec4506f7 Merge "log last fs shutdown time / stat before reboot" 2017-03-21 03:50:46 +00:00
Keun-young Park
fbd19aad72 log last fs shutdown time / stat before reboot
- init will record shutdown time spent in file system part
  to kernel log, and it is avaiable as last_kmsg after reboot.
- Find it from last_kmsg and log it.

bug: 36004738
Test: reboot / cold boot and check logs
Change-Id: Ic5795b327eec482895ac79b39be2a246c6997999
2017-03-20 17:39:46 -07:00
Eugene Susla
a540460e7b Merge "Register PackageMonitor for CompanionDeviceManagerService" 2017-03-20 23:04:16 +00:00
Eugene Susla
6a7006a968 Register PackageMonitor for CompanionDeviceManagerService
1. On package removed -> remove all its associations
2. On package updated -> if had associations, update special access permission
in accordance with (potentially changed) permission entries in manifest

Bug: 30932767
Test: 1. Remove app, and ensure xml entries for it got removed.
2. adb install new version of app without special permissions in manifest, and
ensure whitelist removal method got called
Change-Id: I87261c05ddcf40a18332d160b44ee2f8284df5e4
2017-03-20 13:38:58 -07:00
Christine Franks
6418d0b890 Add color temperature preference for Night Display
Bug: 32463283
Test: adb shell settings put secure night_display_color_temperature
XXXX, where XXXX is {0, 2900, 4000, 7000}, and the temperatures
outside the valid range are capped at the min/max, respectively.
Change-Id: I322c0a907b30742fc312a9938fd0c47f679e580b
2017-03-20 09:07:17 -07:00
Jeff Sharkey
683bcd30ef Use allocatable space when measuring for install.
The system is often willing to clear cached data to make room for
incoming installs, so use StorageManager.getAllocatableBytes() when
making "does it fit?" style decisions.

Add new INSTALL_ALLOCATE_AGGRESSIVE flag, which will flow through
to use StorageManager.FLAG_ALLOCATE_AGGRESSIVE when making allocation
related requests.  (This can be used by installers to indicate
packages that are critical to system health or security.

Test: runtest -x frameworks/base/core/tests/coretests/src/android/content/pm/PackageHelperTests.java
Bug: 36131437
Change-Id: If8118762fd1ca1f497d2cdd1787bdb3c9759dcc0
2017-03-18 17:54:54 -06:00
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