Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9e2aea05 authored by YoungJoon Yang's avatar YoungJoon Yang
Browse files

Start WristOrientationService from SystemServer

Start the service if config.enable.wristorientation is enabled.

Bug: 272527836
Test: enable config.enable.wristorientation -> boot ->
WristOrientationService is running

Change-Id: I83b9ca14349c753896c179e2acccdc790d2716dd
parent 19b7b98a
Loading
Loading
Loading
Loading
+11 −1
Original line number Original line Diff line number Diff line
@@ -338,6 +338,8 @@ public final class SystemServer implements Dumpable {
            "com.android.clockwork.time.WearTimeService";
            "com.android.clockwork.time.WearTimeService";
    private static final String WEAR_SETTINGS_SERVICE_CLASS =
    private static final String WEAR_SETTINGS_SERVICE_CLASS =
            "com.android.clockwork.settings.WearSettingsService";
            "com.android.clockwork.settings.WearSettingsService";
    private static final String WRIST_ORIENTATION_SERVICE_CLASS =
            "com.android.clockwork.wristorientation.WristOrientationService";
    private static final String ACCOUNT_SERVICE_CLASS =
    private static final String ACCOUNT_SERVICE_CLASS =
            "com.android.server.accounts.AccountManagerService$Lifecycle";
            "com.android.server.accounts.AccountManagerService$Lifecycle";
    private static final String CONTENT_SERVICE_CLASS =
    private static final String CONTENT_SERVICE_CLASS =
@@ -2617,6 +2619,14 @@ public final class SystemServer implements Dumpable {
            t.traceBegin("StartWearModeService");
            t.traceBegin("StartWearModeService");
            mSystemServiceManager.startService(WEAR_MODE_SERVICE_CLASS);
            mSystemServiceManager.startService(WEAR_MODE_SERVICE_CLASS);
            t.traceEnd();
            t.traceEnd();

            boolean enableWristOrientationService = SystemProperties.getBoolean(
                    "config.enable_wristorientation", false);
            if (enableWristOrientationService) {
                t.traceBegin("StartWristOrientationService");
                mSystemServiceManager.startService(WRIST_ORIENTATION_SERVICE_CLASS);
                t.traceEnd();
            }
        }
        }


        if (!mPackageManager.hasSystemFeature(PackageManager.FEATURE_SLICES_DISABLED)) {
        if (!mPackageManager.hasSystemFeature(PackageManager.FEATURE_SLICES_DISABLED)) {