14117 Commits

Author SHA1 Message Date
Svet Ganov
43574b03e5 Add autofill feature API
We now have a software feature for autofill which can be used
by partners to disable it on low-end devices or form factors
for which autofill doesn't make sense.

bug:35956220

Test: manual (requires a custom build)

Change-Id: I6c06462ed9ca3ae93331700dce38a8c08dfd0722
2017-04-12 09:53:38 -07:00
Joel Fernandes
2d314e15c9 Set android.display thread to top-app cpusets and schedtune group
android.display being in the foreground cpuset group is an issue. As
seen on M/S, during heavily CPU load it is not given core 3 even though
it might be free and causes jank. This patch adds the thread to the
top-app group to ensure it is placed on all cores during scheduling
decisions.

Doing this required a couple of changes:
- new API to set per-thread cpusets
- changes to DisplayManagerService to set the thread to top-app group
- changes to SystemServer to set the policy toward the end, as doing it
  during start of the DisplayManagerService was in issue (issue being
  SystemServer calls setSystemProcess.. -> setProcessGroup which overrides
  the group settings for threads in the system server process, including
  android.display)

Bug: 36631902
Test: Boot and make sure android.display thread is in the top-app group

Change-Id: Icc394ea0ffcf159d11728ad38de114234a29d20f
Signed-off-by: Joel Fernandes <joelaf@google.com>
(cherry picked from commit 474d311cb098e86c078c3f615e1161e2854f1847)
2017-04-06 21:19:25 +00:00
Nathan Harold
a8a74e25dd Fix Log Traces for IpSecService
Bug: 36920223
Test: boot and see full log
Change-Id: I1ac53f172094082c53b53a950058c862d257b7e5
(cherry picked from commit d3e3f1593a523d488c76be2494d94a399e52dc9d)
2017-04-05 11:21:25 -07:00
Wei Wang
75ed75c3d7 SystemServer: fix StartIpSecService trace and log
Bug: 36920223
Test: boot and see log
Change-Id: I9b88564ac7eef6998af465b977fa66c7d0787cf2
(cherry picked from commit 90f4c0907e8f746f0f840e76057f84ec20adf46d)
2017-04-05 11:21:25 -07:00
Nathan Harold
cbb58ecc86 Add a Skeleton IpSecService
-Add IpSecService with the necessary glue to connect to netd
-Add code to retrieve IpSecService from System Server

Bug: 30984788
Test: b/34812052, b/34811227
Change-Id: I4cdcb643421141202f77a0e2f87a37012de0cd92
(cherry picked from commit 28084d89ec136b56f5012be33a0dea147962f9f6)
2017-04-05 10:23:27 -07:00
TreeHugger Robot
2ac9698271 Merge "Reorganize font enumeration API." into oc-dev 2017-04-04 16:49:56 +00:00
Seigo Nonaka
ff55115121 Reorganize font enumeration API.
This CL cleans up APIs around font variation settings.
- Remove FontConfig and FontManager public API.
- Remove FontManagerService from system service.
- Extract inner class FontConfig.Axis as top-level class FontVariationAxis.
  This is used by Typeface.Builder public API to create new Typeface.
- Introduce and expose FontVariationAxis utility functions from/to string.
- Throws if the invalid font variation settings is passed.

Test: android.text.cts.FontVariationAxisTest passes
Test: android.graphics.cts.TypefaceTest passes
Test: android.graphics.cts.PaintTest passes
Change-Id: I9ccafe7a53935960566243e2856e166878ca59ae
2017-04-03 13:55:07 -07:00
Adam Lesinski
a82b62678a Themes: Apply themes to system_server safely
Creates a new UI Context for UI based operations.
This UI Context is wired up the same way a normal app
Context would be, and is subject to change when overlays
are enabled/disabled.

For this reason, only UI should be using this new Context.
All other operations should be using the original system Context
so that changing themes don't impact the regular operations of
system_server.

Also added some sanity checks at key places where we show UI
(ShutdownThread, BaseErrorDialog).

Bug: 36059431
Test: $ adb shell am crash com.android.settings
Test: Observe crash and power off dialogs are blue with PixelTheme
Change-Id: I87227ee2e0be1e72dcde8f482b37725cb687260b
2017-03-28 17:31:00 -07:00
TreeHugger Robot
5e01870015 Merge "Unbind from service on app killed and dedup association requests" 2017-03-27 18:43:37 +00:00
Eugene Susla
a38fbf63fd Unbind from service on app killed and dedup association requests
1. Listen to calling package binder death stopping the scanning on that.
2. Don't restart scanning when a request with the same values was made.

Bug: 30932767
Test: 1.:
  - Using a test app start scanning and kill the app.
  - In debug mode ensure that DeviceDiscoveryService#stopScan gets triggered
2.:
  - Start scanning and rotate the device while device chooser is visible
  - Ensure no visible loss of state is happening
Change-Id: If126a2c963da90172a956fbd88e6b3dcd7ac8b01
2017-03-24 14:03:17 -07:00
TreeHugger Robot
b202b5c35c Merge "Forward package removed broadcast to KeyChainService" 2017-03-23 21:37:00 +00:00
Robin Lee
139354905d Forward package removed broadcast to KeyChainService
Test: Cts Verifier > Security > KeyChain Test
Test: Manually uninstall and reinstalling Chrome
Bug: 35968281
Change-Id: I1692f7042f081d1a743e0e64ea24fe1dbe63192d
2017-03-23 15:36:16 +00:00
Przemyslaw Szczepaniak
bc7875144f Merge "Default 'persist.sys.timezone' property to GMT if not set on init." am: 302b7a7075 am: 2f5a9febf4
am: 0276998354

Change-Id: I31eb2810b3cbc8a9ce5bf7c23ab821d68c8edbcc
2017-03-23 14:35:30 +00:00
Przemyslaw Szczepaniak
0276998354 Merge "Default 'persist.sys.timezone' property to GMT if not set on init." am: 302b7a7075
am: 2f5a9febf4

Change-Id: I43c05ca3f139fce4e08c7c40cc3823821341d176
2017-03-23 14:29:17 +00:00
Przemyslaw Szczepaniak
2f5a9febf4 Merge "Default 'persist.sys.timezone' property to GMT if not set on init."
am: 302b7a7075

Change-Id: I3eba21ec64878deda2d3465fcac96384241f27aa
2017-03-23 14:23:53 +00:00
Przemyslaw Szczepaniak
20e020536e Default 'persist.sys.timezone' property to GMT if not set on init.
Test: make, flashall -w and tested persist.sys.timezone value
Bug: 36488101
Change-Id: I6d0dab1e247dd7c303153bbe0e997581e36a973d
2017-03-22 18:02:30 +00:00
Jason Monk
361915c727 Move global actions to sysui and add plugin interface
- Move default global actions ui to sysui
 - Add fallback legacy interface in case sysui breaks
 - Switch to fallback if sysui dies or isn't responding

Test: Long-press power
Change-Id: I943522611de5dbbee61e66c67cf3a56379091e97
2017-03-22 09:41:34 -04:00
Eugene Susla
9f29617d58 Merge "Add system feature for Companion Device Manager" 2017-03-21 23:58:35 +00:00
Calvin On
9a74e5daf0 resolve merge conflicts of 94a93087c68c to master
Change-Id: Ib2e97ef56b78e4492e1f8392ee294cb293941320
2017-03-21 13:46:35 -07:00
Calvin On
94a93087c6 Remove the now-empty WearBluetoothService from SystemServer am: 3bcc688bce
am: 9a80c1799c

Change-Id: I5d6bff145f0f77b75184dd9e794130ff70509b58
2017-03-21 20:28:22 +00:00
Calvin On
9a80c1799c Remove the now-empty WearBluetoothService from SystemServer
am: 3bcc688bce

Change-Id: Id95770faa65878282d9b49c01fad258b8eb57c06
2017-03-21 20:18:59 +00:00
Yifan Hong
604c12c06d StartHidlServices wait for StartSensorService.
Otherwise, StartHidlServices waits for more than a second
while holding a lock, delaying window manager.

Test: boots
Test: SystemServerTiming_StartWindowManagerService does not regress
Logcat shows:
SystemServerTimingAsync: StartSensorService took to complete: 55ms
SystemServerTiming: StartWindowManagerService took to complete: 81ms
SystemServerTiming: StartHidlServices took to complete: 1ms

Test: lshal shows android.frameworks.sensorservice@1.0::ISensorManager

Bug: 36389997
Change-Id: Iab5cf0ad7059cf9736cc7db0567dff51cc427b58
2017-03-20 11:30:19 -07:00
Calvin On
3bcc688bce Remove the now-empty WearBluetoothService from SystemServer
Change-Id: I7ddf213fa90acf84a50a53e7666311132b6b3922
2017-03-17 14:19:29 -07:00
Yifan Hong
d8f3fe9421 Merge "Start android.frameworks.sensorservice@1.0 in system_server" 2017-03-17 00:58:14 +00:00
Yifan Hong
26b421f8e0 Start android.frameworks.sensorservice@1.0 in system_server
Bug: 35219747
Test: marlin boots
Test: lshal -ipm | grep android.frameworks.sensorservice@1.0

Change-Id: I67dfb217d1b568e140cefce0bdba3f8f4dbe679c
2017-03-16 12:15:05 -07:00
Calin Juravle
91d40f1baa Set pm.BackgroundDexOptService as the source of true
The real dexopt maintainance job is
com.android.server.pm.BackgroundDexOptService, and not
com.android.server.BackgroundDexOptJobService

Partial revert of commit 096d304ae3d85c1bfcda1a1d9cd4eb13d0815500.

Test: manual inspection
Bug: 36140426
Change-Id: I983ac91117f107282095fa7eefdbce08e0dcfce3
2017-03-15 18:55:25 -07:00
Eugene Susla
7c3eef2f3d Add system feature for Companion Device Manager
Bug: 30932767
Test: Add just the feature gating first, ensure Context#getSystemSetrvice now
returns null.
Add feature in the configuration files, ensure companion device feature works again.
Change-Id: I4ad2d52f7877eae0e951f43ddbb23881d5de8d8b
2017-03-14 19:50:49 -07:00
Svet Ganov
2f8fb1f62f Fix a few auto fill ussues
1. Ensure clicking on a focused view brings up autofill if needed

2. Notify the autofill manager in a couple of cases we missed

3. Renamed the AutofillManager app facing APIs to better reflect what
    they do and added a API for the app to cancel the autofill interaction

4. Fix view structure dispatch where the ordering of children for autofill
    was mixed with ordering of direct view children - the autofill children
    may be indirect as views can be marked not important for autofill

5. Show scrollbars only if there are more fill options than want is shown

6. Show only three fill options and the rest can be accessed with a scroll

7. Remove the list divider to allow fill items to control all fill window content

8. Renamed the autofill manager internal service classes to xxAutofillxx

9. Fixed a comment that was not addressed in a previous CL

10. Showing max three fill options - rest needs a scroll

11. Make sure fill UI shown when filter with no matches is changed
      to filter with some matches

12. Make sure the fill window has a shadow

Test: Autofill CTS tests pass and manual

bug:36038929
bug:36040101
bug:36149166
bug:36034681
bug:36126001
bug:36035654

Change-Id: Ic8726146fc3c0a19d3e536becdd63fb65622136e
2017-03-13 21:57:10 -07:00
Geoffrey Pitsch
af759c52ce Channels for Frameworks notifications
Adapts all notifications used by system services to use channels.
Channels are initialized by SystemServer after the NotificationService
has started.

Test: runtest systemui-notification
Change-Id: I25c45293b786adb57787aeab4c2613c9d7c89dab
2017-03-01 10:17:15 -05:00
Mårten Kongstad
2e0d0f3111 OMS: integrate OverlayManagerService into framework
Hand over ownership of overlays to OverlayManagerService.

Changes to a package's overlays are propagated using the activity life
cycle. Affected activities will be recreated as needed. This provides a
well-defined point to modify an application's assets while the
application is paused.

Consolidate how overlays targeting the system and overlays targeting
regular applications are handled. Previously, system overlays were
handled as a special case. Now, everything is handled identically. As a
side effect, the call to idmap --scan during Zygote boot has become
obsolete and is removed.

Information on what overlays to use is recorded in
ApplicationInfo.resourceDirs. The PackageManagerService is responsible
for the creation of ApplicationInfo objects. The OverlayManagerService
is responsible for informing the PackageManagerService in advance about
what resourceDirs to use.

When launching an application, the ApplicationInfo is already populated
with up-to-date information about overlays.

When enabling or disabling an overlay for a running application, the
OverlayManagerService first notifies the PackageManagerService about the
updated resourceDirs. It then tells the ActivityManagerService to push
the new ApplicationInfo object to the application's ActivityThread.
Finally the application requests its ResourcesManager to create new
ResourcesImpl objects based on the updated paths.

Change-Id: Ib8afa05ccab4e2db558f89ce4423983c086bb61a
Co-authored-by: Martin Wallgren <martin.wallgren@sonymobile.com>
Signed-off-by: Zoran Jovanovic <zoran.jovanovic@sonymobile.com>
Bug: 31052947
Test: run tests from 'OMS: tests for OverlayManagerService'
2017-02-23 14:01:38 -08:00
Guang Zhu
df0824ad4c Merge "Revert "OMS: integrate OverlayManagerService into framework"" 2017-02-23 07:36:16 +00:00
Guang Zhu
9545980692 Revert "OMS: integrate OverlayManagerService into framework"
Bug: 31052947
Bug: 35697944

This reverts commit 21a3d1ad686dee97b9cf0ed80389ee2ab0d48013.

Change-Id: I2d86931020301524c26cf8c8e80d557c97fdd6c3
2017-02-23 07:35:39 +00:00
TreeHugger Robot
0f09817859 Merge "OMS: integrate OverlayManagerService into framework" 2017-02-23 03:59:01 +00:00
TreeHugger Robot
a497770920 Merge "resolve merge conflicts of f17c1d488840 to master" 2017-02-23 03:44:00 +00:00
TreeHugger Robot
26a449e62a Merge "Reconcile apps in 2 phases" 2017-02-23 03:42:24 +00:00
Fyodor Kupolov
cd824ef389 Reconcile apps in 2 phases
During boot app data folders are reconciled in 2 phases:
 - in the constructor only core apps are reconciled. prepareAppData
   for remaining apps is deferred and run on a separate thread (phase 2)
 - Phase 2 must finish before third-party apps can start

Also moved GC to final stages of system server init. GC alone takes ~200 ms.

Overall boot time improvement: ~1 second

Before:
02-17 18:33:33 D/BaseBootTest: successive-boot :
28835.0,29638.0,30205.0,29793.0,29752.0,28228.0,30125.0,28983.0,28487.0,28865.0,
02-17 18:33:33 D/BaseBootTest: successive-boot_avg : 29291.1
02-17 18:33:33 D/BaseBootTest:
SystemServerTiming_StartPackageManagerService :
3150.0,3615.0,3515.0,3495.0,3814.0,3158.0,3746.0,3274.0,3222.0,3607.0,
02-17 18:33:33 D/BaseBootTest:
SystemServerTiming_StartPackageManagerService_avg : 3459.6
02-17 18:33:33 D/BaseBootTest: SystemServerTiming_StartServices :
8244.0,8863.0,9035.0,9832.0,8998.0,8096.0,8719.0,8209.0,8279.0,8754.0,
02-17 18:33:33 D/BaseBootTest: SystemServerTiming_StartServices_avg :
8702.9

After:
02-17 17:59:51 D/BaseBootTest: successive-boot :
27711.0,27607.0,28408.0,28968.0,28397.0,28063.0,27885.0,28483.0,27917.0,29317.0,
02-17 17:59:51 D/BaseBootTest: successive-boot_avg : 28275.6
02-17 17:59:51 D/BaseBootTest:
SystemServerTiming_StartPackageManagerService :
2467.0,2489.0,2369.0,2548.0,2647.0,2523.0,2497.0,2553.0,2482.0,2657.0,
02-17 17:59:51 D/BaseBootTest:
SystemServerTiming_StartPackageManagerService_avg : 2523.2
02-17 17:59:51 D/BaseBootTest: SystemServerTiming_StartServices :
7686.0,7538.0,7598.0,7869.0,7884.0,7950.0,7971.0,8370.0,7696.0,7885.0,
02-17 17:59:51 D/BaseBootTest: SystemServerTiming_StartServices_avg :
7844.7

Test: manual
Bug: 28750609
Change-Id: I3543ef577af1365394775318e40907584ddbe950
2017-02-22 15:43:50 -08:00
Calvin On
a91e5368f0 resolve merge conflicts of f17c1d488840 to master
OCL: http://ag/1932572

Test: refactoring CL, with unit tests

Change-Id: I5da27ee70afb8bf6e5fe9f6f3b545cd26d5c8d20
2017-02-22 15:36:53 -08:00
Calvin On
f17c1d4888 Replace WearWifi/Cell services with WearConnectivityService am: 5555bccc70
am: abfd5bccb9

Change-Id: If051c765d3ea81cce2bedc2dfa02d64744088054
2017-02-22 22:48:23 +00:00
Calvin On
abfd5bccb9 Replace WearWifi/Cell services with WearConnectivityService
am: 5555bccc70

Change-Id: I5d8c97b8d5c394aeae99b7ddbe0dfdd5706a4293
2017-02-22 22:41:41 +00:00
Wei Wang
ed7f548832 Rename CameraService to CameraServiceProxy
Bug: 32976450
Test: on marlin, camera app works fine
Change-Id: I71890c6814f97e461b0161fed6c31c041c9bfe59
2017-02-22 09:41:41 -08:00
Calvin On
5555bccc70 Replace WearWifi/Cell services with WearConnectivityService
go/wear-connectivity-service

Change-Id: I2a8214e2965ad63a23dc8c174db256a263102a6f
2017-02-21 16:41:43 -08:00
Colin Cross
ebc05de919 Merge "Revert "Remove outdated emulator check which causes BT to not start""
am: 375ea2ae71

Change-Id: I3d5abc52abf3f7c01ba4fbee47d7e487e99f5dda
2017-02-21 23:32:32 +00:00
Mårten Kongstad
21a3d1ad68 OMS: integrate OverlayManagerService into framework
Hand over ownership of overlays to OverlayManagerService.

Changes to a package's overlays are propagated using the activity life
cycle. Affected activities will be recreated as needed. This provides a
well-defined point to modify an application's assets while the
application is paused.

Consolidate how overlays targeting the system and overlays targeting
regular applications are handled. Previously, system overlays were
handled as a special case. Now, everything is handled identically. As a
side effect, the call to idmap --scan during Zygote boot has become
obsolete and is removed.

Information on what overlays to use is recorded in
ApplicationInfo.resourceDirs. The PackageManagerService is responsible
for the creation of ApplicationInfo objects. The OverlayManagerService
is responsible for informing the PackageManagerService in advance about
what resourceDirs to use.

When launching an application, the ApplicationInfo is already populated
with up-to-date information about overlays.

When enabling or disabling an overlay for a running application, the
OverlayManagerService first notifies the PackageManagerService about the
updated resourceDirs. It then tells the ActivityManagerService to push
the new ApplicationInfo object to the application's ActivityThread.
Finally the application requests its ResourcesManager to create new
ResourcesImpl objects based on the updated paths.

Co-authored-by: Martin Wallgren <martin.wallgren@sonymobile.com>
Signed-off-by: Zoran Jovanovic <zoran.jovanovic@sonymobile.com>
Bug: 31052947
Test: run tests from 'OMS: tests for OverlayManagerService'
Change-Id: Idc96dae6fc075d5373aa055bbf50e919136d7353
2017-02-21 14:29:43 -08:00
Colin Cross
a3b2212eda Revert "Remove outdated emulator check which causes BT to not start"
This reverts commit d98a4e502165d76d05e095608da3c795bd56eafd.

Merged-In: Ibd1596584928f2aa2c799501536abc9b384d1cda
Change-Id: Ibd1596584928f2aa2c799501536abc9b384d1cda
2017-02-19 03:28:17 +00:00
Colin Cross
039deed1fd Revert "Remove outdated emulator check which causes BT to not start"
This reverts commit d98a4e502165d76d05e095608da3c795bd56eafd.

Change-Id: Ibd1596584928f2aa2c799501536abc9b384d1cda
2017-02-18 13:35:45 -08:00
Pulkit Bhuwalka
705cbc684a resolve merge conflicts of a110feee4cac to master
Test: Resolved merge conflict. Built locally.

Change-Id: If8e439d513ac2242b82f67a4c68bc3adfabe2b9c
2017-02-17 20:13:31 -08:00
Pulkit Bhuwalka
806ac5e1dd Merge "Remove outdated emulator check which causes BT to not start"
am: ad7fb62d4f

Change-Id: Ia6f9417e6b21ec7911036b8875b9603f8b36152e
2017-02-17 23:28:09 +00:00
Pulkit Bhuwalka
d98a4e5021 Remove outdated emulator check which causes BT to not start
ro.kernel.qemu based check to determine whether Bluetooth should be
started or not was an old hack used when "features" was not available to
determine hardware availability. This was later fixed with the
hasSystemFeature check. However, the old check was not removed.

The presence of the old check causes Bluetooth to not start on Android
Things devices which have ro.kernel.qemu set for graphics usage. It's
also preferable to depend on the system API rather than on build
configs. Related CLs modify the emulator builds to correct the config in
builds.

Bug: 35361545
Change-Id: I219ce5e14709c76dcba43af4693093e985269d43
Test: Verified by launching bluetooth on local devices after removing
the old check. Also verified by booting up the emulator and verifying
that Bluetooth Services do not start.
2017-02-17 13:44:33 -08:00
Hugo Benichi
01432b306d resolve merge conflicts of 9355bce0c323 to master
Test: none
Change-Id: Iac65e01d07edf79ec97e7d996f8cfee6f811606b
2017-02-17 10:47:58 +09:00
Hugo Benichi
9355bce0c3 Merge "IP connectivity metrics: delete obsolete logger service" am: 37e3f22c2e am: c54962a4bd
am: 9c2b6afa2f

Change-Id: I5f8cd508812d9532778c2f1f019308a4b8d8ee33
2017-02-17 00:18:35 +00:00