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

Commit f8ef16e7 authored by Xiaomiao Zhang's avatar Xiaomiao Zhang
Browse files

[Ramen] Add new settings secure keys to store the device-level browser content...

[Ramen] Add new settings secure keys to store the device-level browser content filters and search content filters values.

Bug: 398255447
Test: atest SettingsBackupTest
atest SettingsValidatorsTest
Flag: NONE only adding hidden APIs

Change-Id: I39a940cc094fcd03544419bd8575c04199e44063
parent 0fb7911c
Loading
Loading
Loading
Loading
+28 −0
Original line number Diff line number Diff line
@@ -8650,6 +8650,34 @@ public final class Settings {
        @Readable
        public static final String DOCKED_CLOCK_FACE = "docked_clock_face";
        /**
         * Setting to indicate that content filters should be enabled on web browsers.
         *
         * <ul>
         *   <li>0 = Allow all sites
         *   <li>1 = Try to block explicit sites
         * </ul>
         *
         * @hide
         */
        @Readable
        public static final String BROWSER_CONTENT_FILTERS_ENABLED =
                "browser_content_filters_enabled";
        /**
         * Setting to indicate that content filters should be enabled in web search engines.
         *
         * <ul>
         *   <li>0 = Off
         *   <li>1 = Filter
         * </ul>
         *
         * @hide
         */
        @Readable
        public static final String SEARCH_CONTENT_FILTERS_ENABLED =
                "search_content_filters_enabled";
        /**
         * Set by the system to track if the user needs to see the call to action for
         * the lockscreen notification policy.
+2 −0
Original line number Diff line number Diff line
@@ -293,5 +293,7 @@ public class SecureSettings {
        Settings.Secure.FINGERPRINT_APP_ENABLED,
        Settings.Secure.FINGERPRINT_KEYGUARD_ENABLED,
        Settings.Secure.DUAL_SHADE,
        Settings.Secure.BROWSER_CONTENT_FILTERS_ENABLED,
        Settings.Secure.SEARCH_CONTENT_FILTERS_ENABLED,
    };
}
+2 −0
Original line number Diff line number Diff line
@@ -461,5 +461,7 @@ public class SecureSettingsValidators {
        VALIDATORS.put(Secure.FINGERPRINT_APP_ENABLED,  BOOLEAN_VALIDATOR);
        VALIDATORS.put(Secure.FINGERPRINT_KEYGUARD_ENABLED, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Secure.DUAL_SHADE, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Secure.BROWSER_CONTENT_FILTERS_ENABLED, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Secure.SEARCH_CONTENT_FILTERS_ENABLED, BOOLEAN_VALIDATOR);
    }
}