Add HealthConnect system service scaffold.

Setup scaffold for the Health Connect system service.
This service will provide system APIs to read and write
health data.

Bug: 249321392
CTS-Coverage-Bug: 248508112
Test: atest android.healthconnect.cts
Change-Id: I503c24a039c37d09895fc4f73a1de1a13eeb72b0
This commit is contained in:
Anna Zhuravleva
2022-09-20 19:36:36 +00:00
parent 94fa91d032
commit 5bdd56de55
5 changed files with 20 additions and 1 deletions

View File

@@ -98,6 +98,7 @@ combined_apis {
"framework-connectivity",
"framework-connectivity-t",
"framework-graphics",
"framework-healthconnect",
"framework-media",
"framework-mediaprovider",
"framework-ondevicepersonalization",
@@ -114,6 +115,7 @@ combined_apis {
],
system_server_classpath: [
"service-art",
"service-healthconnect",
"service-media-s",
"service-permission",
"service-sdksandbox",

View File

@@ -9831,6 +9831,7 @@ package android.content {
field public static final String FINGERPRINT_SERVICE = "fingerprint";
field public static final String GAME_SERVICE = "game";
field public static final String HARDWARE_PROPERTIES_SERVICE = "hardware_properties";
field public static final String HEALTHCONNECT_SERVICE = "healthconnect";
field public static final String INPUT_METHOD_SERVICE = "input_method";
field public static final String INPUT_SERVICE = "input";
field public static final String IPSEC_SERVICE = "ipsec";

View File

@@ -111,6 +111,7 @@ import android.hardware.location.ContextHubManager;
import android.hardware.radio.RadioManager;
import android.hardware.usb.IUsbManager;
import android.hardware.usb.UsbManager;
import android.healthconnect.HealthServicesInitializer;
import android.location.CountryDetector;
import android.location.ICountryDetector;
import android.location.ILocationManager;
@@ -1524,6 +1525,7 @@ public final class SystemServiceRegistry {
BluetoothFrameworkInitializer.registerServiceWrappers();
TelephonyFrameworkInitializer.registerServiceWrappers();
AppSearchManagerFrameworkInitializer.initialize();
HealthServicesInitializer.registerServiceWrappers();
WifiFrameworkInitializer.registerServiceWrappers();
StatsFrameworkInitializer.registerServiceWrappers();
RollbackManagerFrameworkInitializer.initialize();

View File

@@ -6049,6 +6049,15 @@ public abstract class Context {
@SystemApi
public static final String AMBIENT_CONTEXT_SERVICE = "ambient_context";
/**
* Use with {@link #getSystemService(String)} to retrieve a
* {@link android.healthconnect.HealthConnectManager}.
*
* @see #getSystemService(String)
* @see android.healthconnect.HealthConnectManager
*/
public static final String HEALTHCONNECT_SERVICE = "healthconnect";
/**
* Determine whether the given permission is allowed for a particular
* process and user ID running in the system.

View File

@@ -399,7 +399,8 @@ public final class SystemServer implements Dumpable {
"com.android.server.media.MediaCommunicationService";
private static final String APP_COMPAT_OVERRIDES_SERVICE_CLASS =
"com.android.server.compat.overrides.AppCompatOverridesService$Lifecycle";
private static final String HEALTHCONNECT_MANAGER_SERVICE_CLASS =
"com.android.server.healthconnect.HealthConnectManagerService";
private static final String ROLE_SERVICE_CLASS = "com.android.role.RoleService";
private static final String GAME_MANAGER_SERVICE_CLASS =
"com.android.server.app.GameManagerService$Lifecycle";
@@ -2735,6 +2736,10 @@ public final class SystemServer implements Dumpable {
mSystemServiceManager.startService(APP_COMPAT_OVERRIDES_SERVICE_CLASS);
t.traceEnd();
t.traceBegin("HealthConnectManagerService");
mSystemServiceManager.startService(HEALTHCONNECT_MANAGER_SERVICE_CLASS);
t.traceEnd();
// These are needed to propagate to the runnable below.
final NetworkManagementService networkManagementF = networkManagement;
final NetworkPolicyManagerService networkPolicyF = networkPolicy;