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

Commit 3ee9acc2 authored by Hani Kazmi's avatar Hani Kazmi
Browse files

[AAPM] Disable for unsupported form factors.

The initial launch is targeted towards general purpose devices.
Other form factors may be added later.

Bug: 352420507
Flag: android.security.aapm_api
Test: Presubmits
Change-Id: I15e5ac313e15f50032437515dd8d704559212c8e
parent 8cf76249
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -1504,6 +1504,8 @@ public final class SystemServer implements Dumpable {
        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 @@ public final class SystemServer implements Dumpable {
                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 @@ public final class SystemServer implements Dumpable {
                }, WEBVIEW_PREPARATION);
            }

            if (RoSystemFeatures.hasFeatureAutomotive(context)) {
            if (isAutomotive) {
                t.traceBegin("StartCarServiceHelperService");
                final SystemService cshs = mSystemServiceManager
                        .startService(CAR_SERVICE_HELPER_SERVICE_CLASS);