Commit Graph

14807 Commits

Author SHA1 Message Date
Eva Chen
3164ff667d Merge changes Ife27ecd6,I1a893ea8
* changes:
  Add GnssTimeUpdateService.
  Add meta-text about gnss time update attribution.
2021-01-21 01:09:18 +00:00
Eva Chen
270ae737c2 Add GnssTimeUpdateService.
GnssTimeUpdateService listens for location updates. Once an update is
received, it reads the time provided by GPS and suggests it to
TimeDetectorService. TimeDetectorService can then use it to set the
SystemClock based on included time sources and priority.

Bug: 157265008
Test: Presubmits + atest + Manual
- atest frameworks/base/services/tests/servicestests/src/com/android/server/timedetector/GnssTimeUpdateServiceTest.java
- For manual testing, the Location Shell Commands can be used to add /
  enable a gps test provider to set gps locations with a specified time.
  The time detector dumpsys can then be used to verify that a GNSS
  suggestion has been made.

Change-Id: Ife27ecd6d122f33b7cc93d7832e3085acc33c160
2021-01-20 14:48:12 -08:00
Hai Zhang
ce2a80437d Use a single interface for reading pre-Q and pre-S role state.
The logic to read the platform XML is moved from RoleUserState. The
logic to read legacy settings is left untouched except refactored to
return the mapping at once.

Bug: 158736025
Test: presubmit
Change-Id: Ifd1770bf869ea77b2f8a4ff8b3eae46a46cc90cf
2021-01-15 13:36:55 -08:00
Josh Gao
1c687e16a6 Merge changes I0f1d59ae,I2f63bffb am: 9f7a73fc21 am: 87caaf0da8 am: e0cbabe562
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1432973

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0298ef531a86502e0da39b68193f2647a13ce01d
2021-01-14 04:43:26 +00:00
Josh Gao
9f7a73fc21 Merge changes I0f1d59ae,I2f63bffb
* changes:
  fdtrack: GC before checking fd count.
  Move system_server fdtrack implementation to Java.
2021-01-14 01:22:22 +00:00
Lorenzo Colitti
4c5b52da8d Merge changes I3eb82680,I9d6147d9 am: bbd9fb5c27 am: c27bf45cb6 am: 54e08a027c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1547644

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3f0d6bfead295ed6a98a15ef9bb3542b88d5652a
2021-01-13 00:50:46 +00:00
Joanne Chung
aa1949639a Register translation service.
Bug: 173243538
Test: manual. Make sure device can boot to home and we can get
the TranslationManager successfully.

Change-Id: Ib0e733d6b8f3792431d71f9791b5b2e43a029a7b
2021-01-12 12:19:49 -08:00
Lorenzo Colitti
682686bdff Stop using IIpConnectivityMetrics in ConnectivityService.
Currently, ConnectivityService calls the IpConnectivityMetrics
service class directly to log default network events. This is
incompatible with ConnectivityService being in a mainline module.
Replace direct access to IIpConnectivityMetrics with public
methods in IpConnectivityLog, which is @SystemApi class.

The new methods are not yet @SystemApi, but they can be made so
if desired. Alternatively, these metrics could be deleted.

Also remove the IpConectivityMetrics service from the
service-connectivity JAR, and go back to starting it from
SystemServer.java, which is what was happening a few hours ago
before aosp/1542626 was merged.

Test: builds, boots
Test: atest FrameworksNetTests
Test: "dumpsys connmetrics" shows events, including default network events
Change-Id: I9d6147d93590363a2f8f83f39f05c03d001b4851
2021-01-12 23:19:49 +09:00
Remi NGUYEN VAN
2f01d3d29d Merge "Revert^2 "Move service-connectivity to the tethering APEX"" am: 2f0fafeb11 am: f931a80e81 am: ce98a47a89
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1542626

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I81a7577b0cf474bbb53ca38ddd093ba4342ab543
2021-01-12 03:42:16 +00:00
Remi NGUYEN VAN
2f0fafeb11 Merge "Revert^2 "Move service-connectivity to the tethering APEX"" 2021-01-12 01:35:30 +00:00
Josh Gao
192102c35b fdtrack: GC before checking fd count.
Test: treehugger
Change-Id: I0f1d59ae4240a24f8b8e4b015c1923acb1140bce
2021-01-11 13:56:10 -08:00
Josh Gao
3ede7b4930 Move system_server fdtrack implementation to Java.
Test: manual
Change-Id: I2f63bffba55d6fc82d128c7e7546a193e0f62a73
2021-01-11 13:56:10 -08:00
Kohsuke Yatoh
73979a8847 Merge "Do not load Typefaces twice in system server." 2021-01-09 01:16:50 +00:00
Remi NGUYEN VAN
86a4035283 Revert^2 "Move service-connectivity to the tethering APEX"
As part of modularization of ConnectivityService and expansion of the
Tethering module scope, move service-connectivity.jar into the tethering
APEX, and load it from there.

This rolls forward the change. The original topic was reverted because
of a bad merged-in clause; this is fixed and re-verified in this topic.

Bug: 171540887
Test: m, device boots and connectivity

Change-Id: I293b09c0dc04c6ccafa30cd0f1a63efe32283604
2021-01-08 01:23:36 +00:00
Pete Bentley
72b28f2690 Revert "Move service-connectivity to the tethering APEX"
Revert submission 1532910-connectivity_jar_in_apex

Reason for revert: Breaks boot tests: b/176969905
Reverted Changes:
Ie41a5b569:Set setCurrentProxyScriptUrl as public
Id7b6a4664:Move service-connectivity to the tethering APEX
Ia7cb83834:Add service-connectivity to tethering APEX

Change-Id: I1c369dd8a6527513f8fc1a5cacde59d78d104c7e
(cherry picked from commit 3e157018f7)
2021-01-07 10:04:48 -08:00
Andrei-Valentin Onea
04f02686b8 Merge changes from topic "preinstall-overrides" am: 29ed176b46 am: d1ebbf5086 am: dd1d1cbacc
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1520701

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ifbdca1201aa118e59b45f7dd89441a210fc2fa9c
2021-01-07 17:52:57 +00:00
Treehugger Robot
1ef739b3fa Merge changes from topic "revert-1532910-connectivity_jar_in_apex-LKXFLQGLIU"
* changes:
  Revert "Set setCurrentProxyScriptUrl as public"
  Revert "Move service-connectivity to the tethering APEX"
2021-01-07 15:25:03 +00:00
Andrei-Valentin Onea
29ed176b46 Merge changes from topic "preinstall-overrides"
* changes:
  Add force_non_debuggable_final_build_for_compat
  Allow overriding compat config prior to install time.
2021-01-07 14:04:12 +00:00
Pete Bentley
3e157018f7 Revert "Move service-connectivity to the tethering APEX"
Revert submission 1532910-connectivity_jar_in_apex

Reason for revert: Breaks boot tests: b/176969905
Reverted Changes:
Ie41a5b569:Set setCurrentProxyScriptUrl as public
Id7b6a4664:Move service-connectivity to the tethering APEX
Ia7cb83834:Add service-connectivity to tethering APEX

Change-Id: I1c369dd8a6527513f8fc1a5cacde59d78d104c7e
2021-01-07 13:51:18 +00:00
Lorenzo Colitti
f9ae26f742 Merge changes from topic "connectivity_jar_in_apex" am: 60dfb880de am: 6feb97a95b am: 7a26ec1976
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1532910

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I49964ba08c0983cd51fa06afe0be07a5c9bfaab1
2021-01-07 10:10:11 +00:00
Remi NGUYEN VAN
dbbf7a3b4e Move service-connectivity to the tethering APEX
As part of modularization of ConnectivityService and expansion of the
Tethering module scope, move service-connectivity.jar into the tethering
APEX, and load it from there.

Bug: 171540887
Test: m, device boots and connectivity
Change-Id: Id7b6a4664ae73224b9ab219c94f56d603a62ee5a
2021-01-07 11:52:42 +09:00
Andrei Onea
224f8c01d7 Allow overriding compat config prior to install time.
If the user tries to apply an override for a package that is not yet
installed, the override is put into a 'deferred' bucket, to be validated
upon installation.
Overrides are rechecked every time an app is installed, updated or
deleted.
If a deferred override is valid at install or update time, it gets
promoted to a regular override.
If a deferred override cannot be applied upon app installation or
update, it remains deferred.
If an app is deleted, all its overrides become deferred.
When any of the reset commands are called for a given package, that
removes both regular and deferred overrides.

Bug: 158696818
Test: atest CompatConfigTest
Test: atest OverrideValidatorImplTest
Change-Id: I50eab62214d1325ec6185ddcfe9e8f425e11c98b
2020-12-30 14:37:12 +00:00
Hyunyoung Song
21e60a9d43 Add Initial SearchUIManager
Bug:162234997

Test: builds, locally ran cts tests

CTS tests: ag/13129468

[Meeting notes with Svet/Sunny/Winson] go/aaplus-search-api
[Design diagrams] go/aaplus-search-supl

Change-Id: I4589cd411e124dc9d7ea132a71651f6b9f9656ae
2020-12-15 18:54:43 +00:00
Kohsuke Yatoh
f0acf2f128 Do not load Typefaces twice in system server.
Zygote should have already loaded them if
ENABLE_LAZY_TYPEFACE_INITIALIZATION is false.

Bug: 172891184
Test: boot
Change-Id: I3c02463b217f31068dc26bf3451cb1d612154230
2020-12-10 15:24:21 -08:00
Darryl L Johnson
61c63d5306 Migrate DisplayFoldController fold state to be based on device state.
This modifies DisplayFoldController to base it's internal 'fold' state
from being configured directly based on the lid switch (or the proximity
sensor) to be based on the device state.

Bug: 159401801
Test: Manual - fold/unfold and validate fold state

Change-Id: Ib3ecc6326b1d73720d31fa94f33160cfaf1109cd
2020-12-10 12:24:56 -08:00
Lais Andrade
9e755fb3fe Implement setAlwaysOn to IVibratorManagerService
This implementation supports synced CombinedVibrationEffect instances
with prebaked effects only.

This implementation adds some vibration checks from VibratorService to
VibratorManager, and wires the implementation of VibratorController
native service to IVibratorManager.

Bug: 167946816
Bug: 131311651
Test: atest FrameworksServiceTests:VibratorManagerServiceTest
Change-Id: I8da10c7903e91bba30b11fe46515121858fb5211
2020-12-04 16:24:31 +00:00
Xin Li
d31ee38811 Merge rvc-qpr-dev-plus-aosp-without-vendor@6881855
Bug: 172690556
Merged-In: I78222391b83a4add8e964340ec08bb8a1306e1c6
Change-Id: I28bbf40820674675ccf765c912aa8140d3f74ab2
2020-12-02 00:38:58 -08:00
Kohsuke Yatoh
b11b963ed1 Prepare switching font loading to system server.
Currently, fonts are loaded in Zygote.
This CL adds a preparation to switch it to system server and
bindApplication(), so that system server will be able to update font map
at runtime.

(1) Zygote will be initialized without fonts.
(2) System server will maintain a serialized font map in ashmem.
(3) Apps will load font map from the ashmem in bindApplication().

The change is guarded by Typeface.ENABLE_LAZY_TYPEFACE_INITIALIZATION,
and the new behavior is disabled by default.
I tested with ENABLE_LAZY_TYPEFACE_INITIALIZATION = true.

Bug: 172891184
Test: atest FrameworksCoreTests:TypefaceTest
Test: atest CtsGraphicsTestCases
Test: atest CtsTextTestCases
Test: atest CtsWidgetTestCases
Change-Id: I40832962a4b27f6160c4dc6268689c52f6a4dd33
2020-12-01 16:05:33 -08:00
TreeHugger Robot
5aa16fb5b9 Merge "Initialize AIDL biometric HALs after BiometricService is started" 2020-11-12 02:41:49 +00:00
Kevin Chyn
13161747db Initialize AIDL biometric HALs after BiometricService is started
Fixes: 172291793
Test: On device with default AIDL HAL, notice it's registered
      with BiometricService
Test: atest com.android.server.biometrics

Change-Id: Ia7283cf9473ef1d33237f2b4788d81b79ae26824
2020-11-11 16:37:57 -08:00
Felipe Leme
6b94ea477f Initial definition of DevicePolicySafetyChecker.
This object will be used to fail DevicePolicyManagers that cannot be
executed on automotive when it's not safe to (for example, because
the vehicle is moving).

Test: atest CarDevicePolicyManagerTest#testLockNow_safe \
            CarDevicePolicyManagerTest#testLockNow_unsafe
Bug: 172376923

Change-Id: I7f910a7ee5efc7d647525db1687bd27e68cb7c0a
2020-11-11 11:04:36 -08:00
Yi Kong
8c20d86f91 Merge "profcollectd: Only start the forwarding service if enabled through device config" am: fb8f388ce7 am: f69edfbddf am: de81949fe4 am: ffbd8ee487
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1484896

Change-Id: I2ed9be0bfbb31d52d1f36db6653cc2baca51364f
2020-11-03 10:59:11 +00:00
Yi Kong
ffbd8ee487 Merge "profcollectd: Only start the forwarding service if enabled through device config" am: fb8f388ce7 am: f69edfbddf am: de81949fe4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1484896

Change-Id: Icac75d15493ab3b7c83fdb5d1c167244a98585f4
2020-11-03 10:47:16 +00:00
Darryl Johnson
7e0f96992c Merge "Add logic to forward foldable device state to native cameraserver." 2020-11-03 01:24:23 +00:00
Yi Kong
0c51fb20dd profcollectd: Only start the forwarding service if enabled through device config
Test: boot profcollect build
Bug: 79161490
Change-Id: I8058594fd78327bbd0983c7f39391dc82e18e2a3
2020-11-03 08:51:07 +08:00
Darryl L Johnson
4526eddd9a Add logic to forward foldable device state to native cameraserver.
This change adds two methods to CameraServiceProxy to be used within
system_server for setting camera device state flags. It also updates
DisplayFoldController to leverage these methods.

Bug: 153788656
Bug: 154038218
Bug: 159401801
Test: Trigger fold and verify camera's toggle
Change-Id: I08392a62bc65d10a0715ef0d831c8bb919035a5d
2020-11-02 14:06:02 -08:00
Benedict Wong
76062fa471 Merge "Add shell VcnManagementService" am: fa2c588ab5 am: 1ee8f22e8a am: e0eb89cf66 am: 3eda5ec4f9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1456942

Change-Id: Ib6d081351c2440945d094e7e97433f1e91e1fa8b
2020-10-29 23:20:36 +00:00
Benedict Wong
3eda5ec4f9 Merge "Add shell VcnManagementService" am: fa2c588ab5 am: 1ee8f22e8a am: e0eb89cf66
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1456942

Change-Id: I774426130072afa26da857ee66b724f94b627cd7
2020-10-29 23:07:47 +00:00
Benedict Wong
e2dacc7411 Add shell VcnManagementService
This patch adds a shell of the VcnManagementService and VcnManager

Bug: 163431877
Test: Compiles, Boots
Change-Id: I1f3d8ab9c9bff7d419ea6d3edaae3b6b41b1d775
2020-10-27 20:09:06 -07:00
Felipe Leme
c60be18878 Created a mechanism to dump service-less SystemServer state.
SystemServer has classes (like SystemServerInitThreadPool,
SystemServiceManager, and even SystemServer itself) that are
not associated with a service; hence, the state of these classes
are not dumped in a bugreport.

Test: adb shell dumpsys system_server_dumper
Test: adb shell dumpsys system_server_dumper --list
Test: adb shell dumpsys system_server_dumper --name SystemServer

Bug: 159831354
Fixes: 163921395

Change-Id: I5719f7cd3a9022dc0ab12a3b3b22487e2b4866e0
2020-10-23 11:40:06 -07:00
Aaron Huang
f7ebb0c0e4 Merge "Create service-connectivity.jar" am: bfceacea50 am: b91257f553 am: 5b03885d43
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1351252

Change-Id: I9a04f911043e34c3de1bcac3647773c5adfde294
2020-10-20 20:27:13 +00:00
Aaron Huang
944025aef2 Create service-connectivity.jar
Create a new target service-connectivity to split
ConnectivityService from services.core.

Add ConnectivityServiceInitializer for initializing
ConnectivityService and add systemReady() in
ConnectivityManager so that SystemServer can call systemReady()
through ConnectivityManager which won't change current behavior.

Bug: 158268939
Test: make target-java, make host-java
      atest FrameworksNetIntegrationTests
      atest FrameworksNetTests
      make, device can boot,
      atest CtsStrictJavaPackagesTestCases
      wifi and mobile data work.
Change-Id: I99401772ba9c1c34adca20040da3c7c72d86ddd9
Merged-In: Ie732bfaf381404af0bb599ca2f421a96e7aa4257
2020-10-16 22:46:14 +08:00
Aaron Huang
e6f27dd738 Create service-connectivity.jar
Create a new target service-connectivity to split
ConnectivityService from services.core.

Add ConnectivityServiceInitializer for initializing
ConnectivityService and add systemReady() in
ConnectivityManager so that SystemServer can call systemReady()
through ConnectivityManager which won't change current behavior.

Bug: 158268939
Test: make target-java, make host-java
      atest FrameworksNetIntegrationTests
      atest FrameworksNetTests
      make, device can boot,
      atest CtsStrictJavaPackagesTestCases
      wifi and mobile data work.
Change-Id: Ie732bfaf381404af0bb599ca2f421a96e7aa4257
2020-10-16 02:29:04 +08:00
Nick Moukhine
4c3ecce019 Merge "Add system service for music recognition." 2020-10-09 07:35:34 +00:00
TreeHugger Robot
b16775425a Add DeviceStateManagerService and stub implementation of policy.
Test: atest DeviceStateManagerServiceTest
Bug: 159401801

Change-Id: Ib7f424e905c80812b36e0e0bb30771224ce56e34
2020-10-07 13:49:09 -07:00
Nick Moukhine
cf47bdd888 Add system service for music recognition.
The client submits a RecognitionRequest via MusicRecognitionManager.  System server opens an audio stream based on the request and sends it to a MusicRecognitionService (which is exposed by a system app).  The result is passed back through system server to the original caller.

Test: tracked in b/169662646
Bug: 169403302
Change-Id: I4c7fd9d9d72ddd5678867fd037cab6198bff2c2d
2020-09-30 14:44:01 +00:00
Neil Fuller
99bba2b91e Merge "Initial version of LocationTimeZoneManagerService" 2020-09-18 17:43:50 +00:00
Neil Fuller
95126bcefd Initial version of LocationTimeZoneManagerService
This includes an initial version of LocationTimeZoneManagerService,
supporting / implementation classes and test infra.

This commit is not final code (see various TODOs) but forms the
scaffolding for later commits. The ControllerImpl only supports a single
LocationTimeZoneProvider, and the "real" binder implementation is left
for a later commit.

Test: atest services/tests/servicestests/src/com/android/server/location/timezone/
Bug: 149014708
Change-Id: Icfba9a816e55a51ee555e08bb889848644539735
2020-09-17 20:33:23 +01:00
Mat Bevilacqua
8160121220 Initial commit of PowerStatsService
Bug: 164465661
Bug: 164466995
Bug: 167280723
Test: Verified PowerStatsService is functional on targets that
have ODPM data.

Change-Id: Ic555b380c566ea26bc2214374f142c5448ea2ee7
2020-09-14 20:30:49 +00:00
Yi Kong
ab6c5c191b Introduce ProfcollectForwardingService am: a0bd2a99ee am: fbeb0d8002 am: 4914fdc68c am: 4e400a6f4e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1425268

Change-Id: Ic5961ad3b5c4aceaad32bca1ed86342fb00223f9
2020-09-11 05:02:45 +00:00