Loading core/res/res/values/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -2193,6 +2193,9 @@ <!-- The name of the package that will hold the system financed device controller role. --> <string name="config_systemFinancedDeviceController" translatable="false">com.android.devicelockcontroller</string> <!-- The component name of the wear service class that will be started by the system server. --> <string name="config_wearServiceComponent" translatable="false"></string> <!-- The name of the package that will handle updating the device management role. --> <string name="config_devicePolicyManagementUpdater" translatable="false"></string> Loading core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -4926,6 +4926,7 @@ <java-symbol type="array" name="config_displayShapeArray" /> <java-symbol type="bool" name="config_stopSystemPackagesByDefault"/> <java-symbol type="string" name="config_wearServiceComponent" /> <!-- Whether to show weather on the lockscreen by default. --> <java-symbol type="bool" name="config_lockscreenWeatherEnabledByDefault" /> Loading services/java/com/android/server/SystemServer.java +22 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ import android.app.INotificationManager; import android.app.SystemServiceRegistry; import android.app.admin.DevicePolicySafetyChecker; import android.app.usage.UsageStatsManagerInternal; import android.content.ComponentName; import android.content.ContentResolver; import android.content.Context; import android.content.Intent; Loading Loading @@ -2894,6 +2895,27 @@ public final class SystemServer implements Dumpable { t.traceEnd(); } if (isWatch) { t.traceBegin("StartWearService"); String wearServiceComponentNameString = context.getString(R.string.config_wearServiceComponent); if (!TextUtils.isEmpty(wearServiceComponentNameString)) { ComponentName wearServiceComponentName = ComponentName.unflattenFromString( wearServiceComponentNameString); if (wearServiceComponentName != null) { Intent intent = new Intent(); intent.setComponent(wearServiceComponentName); intent.addFlags(Intent.FLAG_DIRECT_BOOT_AUTO); context.startServiceAsUser(intent, UserHandle.SYSTEM); } else { Slog.d(TAG, "Null wear service component name."); } } t.traceEnd(); } // Enable airplane mode in safe mode. setAirplaneMode() cannot be called // earlier as it sends broadcasts to other services. // TODO: This may actually be too late if radio firmware already started leaking Loading Loading
core/res/res/values/config.xml +3 −0 Original line number Diff line number Diff line Loading @@ -2193,6 +2193,9 @@ <!-- The name of the package that will hold the system financed device controller role. --> <string name="config_systemFinancedDeviceController" translatable="false">com.android.devicelockcontroller</string> <!-- The component name of the wear service class that will be started by the system server. --> <string name="config_wearServiceComponent" translatable="false"></string> <!-- The name of the package that will handle updating the device management role. --> <string name="config_devicePolicyManagementUpdater" translatable="false"></string> Loading
core/res/res/values/symbols.xml +1 −0 Original line number Diff line number Diff line Loading @@ -4926,6 +4926,7 @@ <java-symbol type="array" name="config_displayShapeArray" /> <java-symbol type="bool" name="config_stopSystemPackagesByDefault"/> <java-symbol type="string" name="config_wearServiceComponent" /> <!-- Whether to show weather on the lockscreen by default. --> <java-symbol type="bool" name="config_lockscreenWeatherEnabledByDefault" /> Loading
services/java/com/android/server/SystemServer.java +22 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ import android.app.INotificationManager; import android.app.SystemServiceRegistry; import android.app.admin.DevicePolicySafetyChecker; import android.app.usage.UsageStatsManagerInternal; import android.content.ComponentName; import android.content.ContentResolver; import android.content.Context; import android.content.Intent; Loading Loading @@ -2894,6 +2895,27 @@ public final class SystemServer implements Dumpable { t.traceEnd(); } if (isWatch) { t.traceBegin("StartWearService"); String wearServiceComponentNameString = context.getString(R.string.config_wearServiceComponent); if (!TextUtils.isEmpty(wearServiceComponentNameString)) { ComponentName wearServiceComponentName = ComponentName.unflattenFromString( wearServiceComponentNameString); if (wearServiceComponentName != null) { Intent intent = new Intent(); intent.setComponent(wearServiceComponentName); intent.addFlags(Intent.FLAG_DIRECT_BOOT_AUTO); context.startServiceAsUser(intent, UserHandle.SYSTEM); } else { Slog.d(TAG, "Null wear service component name."); } } t.traceEnd(); } // Enable airplane mode in safe mode. setAirplaneMode() cannot be called // earlier as it sends broadcasts to other services. // TODO: This may actually be too late if radio firmware already started leaking Loading