Merge "[AAPM] Disable for unsupported form factors." into main
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index e052f94..2461c1c 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -1504,6 +1504,8 @@
         boolean isTv = context.getPackageManager().hasSystemFeature(
                 PackageManager.FEATURE_LEANBACK);
 
+        boolean isAutomotive = RoSystemFeatures.hasFeatureAutomotive(context);
+
         boolean enableVrService = context.getPackageManager().hasSystemFeature(
                 PackageManager.FEATURE_VR_MODE_HIGH_PERFORMANCE);
 
@@ -1760,7 +1762,8 @@
                 t.traceEnd();
             }
 
-            if (android.security.Flags.aapmApi()) {
+            if (!isWatch && !isTv && !isAutomotive
+                    && android.security.Flags.aapmApi()) {
                 t.traceBegin("StartAdvancedProtectionService");
                 mSystemServiceManager.startService(AdvancedProtectionService.Lifecycle.class);
                 t.traceEnd();
@@ -3137,7 +3140,7 @@
                 }, WEBVIEW_PREPARATION);
             }
 
-            if (RoSystemFeatures.hasFeatureAutomotive(context)) {
+            if (isAutomotive) {
                 t.traceBegin("StartCarServiceHelperService");
                 final SystemService cshs = mSystemServiceManager
                         .startService(CAR_SERVICE_HELPER_SERVICE_CLASS);