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

Commit 01c8740c authored by Wasi Ahmed's avatar Wasi Ahmed Committed by Anubha Kushwaha
Browse files

Add array resource for watchface permission list

We are creating a new role for watchfaces - allowing specific
permissions to them when they're active.

With the deprecation of public AndroidX library for watchfaces,
wear platform-level blocking of 3P watchfaces in Wear OS 5+
(Android U+), and the introduction of codeless Watch Face Format
for 3P, only a few trusted watchfaces built with code can be run
on watches. We'd like to allow these watchfaces do more privileged
things - only when they are active.

A flag is added as well.

More info: https://support.google.com/wearos/thread/284572445

This array will contain non-AOSP permissions (Wear specific) and
overlayable by OEMs.

Bug: 396429548
Bug: 399345350
Test: m -j64
Flag: android.permission.flags.watch_face_role_enabled
Change-Id: I01acceaca6114983a12bcb00eb3893e77013c7ce
FIXED_READ_ONLY_FLAG_REASON: Not needed for server side config
parent 6368174d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -477,6 +477,7 @@ package android {
  public static final class R.array {
    field public static final int config_keySystemUuidMapping = 17235973; // 0x1070005
    field public static final int config_optionalIpSecAlgorithms = 17235974; // 0x1070006
    field @FlaggedApi("android.permission.flags.watch_face_role_enabled") public static final int config_watchFacePermissions;
  }
  public static final class R.attr {
+9 −0
Original line number Diff line number Diff line
@@ -613,3 +613,12 @@ flag {
    description: "Enable checkPackage caching in AppOpsManager"
    bug: "423030916"
}

flag {
    name: "watch_face_role_enabled"
    is_exported: true
    namespace: "wear_services"
    description: "This flag enables watchface roles support and API"
    bug: "399850691"
    is_fixed_read_only: true
}
+4 −0
Original line number Diff line number Diff line
@@ -7699,4 +7699,8 @@
    <!-- The delay in milliseconds to show the toast after the user presses the power button. -->
    <integer name="config_turnOffTvToastPostDelayMs">0</integer>

    <!-- A list of permissions to be granted under WatchFaceBehavior role
        It can only contain non-AOSP permissions outside of the android.*
        and com.android.* namespace. -->
    <string-array name="config_watchFacePermissions" translatable="false"/>
</resources>
+3 −0
Original line number Diff line number Diff line
@@ -187,6 +187,9 @@
  </staging-public-group>

  <staging-public-group type="array" first-id="0x019c0000">
    <!-- @FlaggedApi(android.permission.flags.Flags.FLAG_WATCH_FACE_ROLE_ENABLED)
    @hide @SystemApi -->
    <public name="config_watchFacePermissions" />
  </staging-public-group>

  <staging-public-group type="drawable" first-id="0x019b0000">