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

Commit c0d1c223 authored by DvTonder's avatar DvTonder Committed by Matt Garnes
Browse files

Framework: Generic Blacklist support (4 of 5)

Change-Id: Id6c85c9a537713ec77d00deb7f7fe5a9150be2cd
parent bee63924
Loading
Loading
Loading
Loading
+55 −1
Original line number Diff line number Diff line
@@ -2167,6 +2167,55 @@ public final class Settings {
        public static final String NOTIFICATIONS_USE_RING_VOLUME =
            "notifications_use_ring_volume";

        /**
         * Whether the blacklisting feature for phone calls is enabled
         * @hide
         */
        public static final String PHONE_BLACKLIST_ENABLED = "phone_blacklist_enabled";

        /**
         * Whether a notification should be shown when a call/message is blocked
         * @hide
         */
        public static final String PHONE_BLACKLIST_NOTIFY_ENABLED = "phone_blacklist_notify_enabled";

        /**
         * Whether the blacklisting feature for phone calls from private numbers is enabled
         * @hide
         */
        public static final String PHONE_BLACKLIST_PRIVATE_NUMBER_MODE = "phone_blacklist_private_number_enabled";

        /**
         * Whether the blacklisting feature for phone calls from private numbers is enabled
         * @hide
         */
        public static final String PHONE_BLACKLIST_UNKNOWN_NUMBER_MODE = "phone_blacklist_private_number_enabled";

        /**
         * Constants to be used for {@link PHONE_BLACKLIST_PRIVATE_NUMBER_MODE} and
         * {@link PHONE_BLACKLIST_UNKNOWN_NUMBER_MODE}.
         * @hide
         */
        public static final int BLACKLIST_DO_NOT_BLOCK = 0;
        /**
         * @hide
         */
        public static final int BLACKLIST_BLOCK = 1;
        /**
         * @hide
         */
        public static final int BLACKLIST_PHONE_SHIFT = 0;
        /**
         * @hide
         */
        public static final int BLACKLIST_MESSAGE_SHIFT = 4;

        /**
         * Whether the regex blacklisting feature for phone calls is enabled
         * @hide
         */
        public static final String PHONE_BLACKLIST_REGEX_ENABLED = "phone_blacklist_regex_enabled";

        /**
         * Whether silent mode should allow vibration feedback. This is used
         * internally in AudioService and the Sound settings activity to
@@ -2914,7 +2963,12 @@ public final class Settings {
            VIBRATE_WHEN_RINGING,
            RINGTONE,
            NOTIFICATION_SOUND,
            SYSTEM_PROFILES_ENABLED
            SYSTEM_PROFILES_ENABLED,
            PHONE_BLACKLIST_ENABLED,
            PHONE_BLACKLIST_NOTIFY_ENABLED,
            PHONE_BLACKLIST_PRIVATE_NUMBER_MODE,
            PHONE_BLACKLIST_UNKNOWN_NUMBER_MODE,
            PHONE_BLACKLIST_REGEX_ENABLED,
        };

        /**