Initial implementation of Java-based broadcast radio service.
It provides only limited amount of service, without actual interaction
with HAL.
Added config.enable_java_radio switch to use Java-based service instead
of native. Added FEATURE_RADIO to PackageManager.
Bug: b/36863239
Test: Instrumentation, manual (Kitchen Sink)
Change-Id: I01139d326893c0a437c60cc35d6e5b005da35231
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index f74512a..ad25ce0 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -96,6 +96,7 @@
import com.android.server.policy.PhoneWindowManager;
import com.android.server.power.PowerManagerService;
import com.android.server.power.ShutdownThread;
+import com.android.server.radio.RadioService;
import com.android.server.restrictions.RestrictionsManagerService;
import com.android.server.retaildemo.RetailDemoModeService;
import com.android.server.security.KeyAttestationApplicationIdProviderService;
@@ -711,6 +712,8 @@
boolean disableVrManager = SystemProperties.getBoolean("config.disable_vrmanager", false);
boolean disableCameraService = SystemProperties.getBoolean("config.disable_cameraservice",
false);
+ // TODO(b/36863239): Remove when transitioned from native service.
+ boolean enableRadioService = SystemProperties.getBoolean("config.enable_java_radio", false);
boolean isEmulator = SystemProperties.get("ro.kernel.qemu").equals("1");
@@ -1211,6 +1214,13 @@
mSystemServiceManager.startService(AudioService.Lifecycle.class);
traceEnd();
+ if (enableRadioService &&
+ mPackageManager.hasSystemFeature(PackageManager.FEATURE_RADIO)) {
+ traceBeginAndSlog("StartRadioService");
+ mSystemServiceManager.startService(RadioService.class);
+ traceEnd();
+ }
+
if (!disableNonCoreServices) {
traceBeginAndSlog("StartDockObserver");
mSystemServiceManager.startService(DockObserver.class);