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

Commit 32369d93 authored by Josh Yang's avatar Josh Yang
Browse files

Add Settings.Global.Wearable to pre-defined keys list.

This allows wear hidden settings to follow the @Readable annotation
restrictions as described in
https://g3doc.corp.google.com/company/teams/android-framework/android-packages/settings-provider/readable/index.md?cl=head

Bug: 283855901
Test: manually tested that 3p apps lost access to @hide wearable
settings.
Test: atest SettingsProviderTest

Change-Id: I3f7c1f51e2aa7ab93ce86ec929b62e587c150873
parent 3fc9f5c4
Loading
Loading
Loading
Loading
+7 −1
Original line number Original line Diff line number Diff line
@@ -17103,6 +17103,12 @@ public final class Settings {
                ArrayMap<String, Integer> readableKeysWithMaxTargetSdk) {
                ArrayMap<String, Integer> readableKeysWithMaxTargetSdk) {
            getPublicSettingsForClass(Global.class, allKeys, readableKeys,
            getPublicSettingsForClass(Global.class, allKeys, readableKeys,
                    readableKeysWithMaxTargetSdk);
                    readableKeysWithMaxTargetSdk);
            // Add Global.Wearable keys on watches.
            if (ActivityThread.currentApplication().getApplicationContext().getPackageManager()
                    .hasSystemFeature(PackageManager.FEATURE_WATCH)) {
                getPublicSettingsForClass(Global.Wearable.class, allKeys, readableKeys,
                        readableKeysWithMaxTargetSdk);
            }
        }
        }
        /**
        /**
@@ -18287,7 +18293,7 @@ public final class Settings {
         * Settings migrated from Wear OS settings provider.
         * Settings migrated from Wear OS settings provider.
         * @hide
         * @hide
         */
         */
        public static class Wearable {
        public static final class Wearable extends NameValueTable {
            /**
            /**
             * Whether the user has any pay tokens on their watch.
             * Whether the user has any pay tokens on their watch.
             * @hide
             * @hide