summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/java/android/app/supervision/flags.aconfig10
-rw-r--r--services/java/com/android/server/SystemServer.java3
2 files changed, 11 insertions, 2 deletions
diff --git a/core/java/android/app/supervision/flags.aconfig b/core/java/android/app/supervision/flags.aconfig
index bcb5b3636c95..d5e696d49ff4 100644
--- a/core/java/android/app/supervision/flags.aconfig
+++ b/core/java/android/app/supervision/flags.aconfig
@@ -7,4 +7,12 @@ flag {
namespace: "supervision"
description: "Flag to enable the SupervisionService"
bug: "340351729"
-} \ No newline at end of file
+}
+
+flag {
+ name: "supervision_api_on_wear"
+ is_exported: true
+ namespace: "supervision"
+ description: "Flag to enable the SupervisionService on Wear devices"
+ bug: "373358935"
+}
diff --git a/services/java/com/android/server/SystemServer.java b/services/java/com/android/server/SystemServer.java
index 9759772ae8bd..19b03437292f 100644
--- a/services/java/com/android/server/SystemServer.java
+++ b/services/java/com/android/server/SystemServer.java
@@ -1621,7 +1621,8 @@ public final class SystemServer implements Dumpable {
mSystemServiceManager.startService(ROLE_SERVICE_CLASS);
t.traceEnd();
- if (!isWatch && android.app.supervision.flags.Flags.supervisionApi()) {
+ if (android.app.supervision.flags.Flags.supervisionApi()
+ && (!isWatch || android.app.supervision.flags.Flags.supervisionApiOnWear())) {
t.traceBegin("StartSupervisionService");
mSystemServiceManager.startService(SupervisionService.Lifecycle.class);
t.traceEnd();