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

Commit d8826da4 authored by DvTonder's avatar DvTonder Committed by Steve Kondik
Browse files

Framework: Generic Blacklist support (4 of 5)



Change-Id: Id6c85c9a537713ec77d00deb7f7fe5a9150be2cd

frameworks: add blacklist call logging (1/3)

Change-Id: Id3413a298ba1bdf2ecdcc256d02fda85c3221bb6
Signed-off-by: default avatarRoman Birg <roman@cyngn.com>

frameworks: fix Blacklist support for L (3/3)

Change-Id: Ide9847344dd1260cc4d8e4fa5c6b461ea7aa3ded
Signed-off-by: default avatarRoman Birg <roman@cyngn.com>

framework: add blacklist disconnect cause

Constant to be used when marking a Call as blacklisted.

Change-Id: If8e0ba7a2fb9b3ebbcfde04df48cd0ab14bba864
Signed-off-by: default avatarRoman Birg <roman@cyngn.com>

Fix blacklist unknown number mode query string.

The same was string was being used to query the database for both private and
unknown numbers, with the effect that enabling private number blocking also
blocked unknown numbers.

Change-Id: I5a77566fde3187ff6044415c64e74ce4e10cd4dc

base: Add blacklist provider permission

Change-Id: I4febc2c0aa1a690d607b2a459e2d60d30ecf5abf
JIRA: CYAN-3727
Issue: https://jira.cyanogenmod.org/browse/CYAN-3727


Signed-off-by: default avatarJorge Ruesga <jorge@ruesga.com>

base: add back permission-group SECURITY  to fix blacklist

  This will allow READ|CHANGE_PHONE_BLACKLIST
to be accepted by system. CM's MMS app should
work fine now.

Original commit message:

base: Add blacklist provider permission

JIRA: CYAN-3727
Issue: https://jira.cyanogenmod.org/browse/CYAN-3727


Signed-off-by: default avatarJorge Ruesga <jorge@ruesga.com>

Change-Id: Id911dcf40a509b2233cae3964802531f5b0d55c1
parent 6f490e2e
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -164,6 +164,10 @@ public class CallLog {
        public static final int MISSED_TYPE = 3;
        public static final int MISSED_TYPE = 3;
        /** Call log type for voicemails. */
        /** Call log type for voicemails. */
        public static final int VOICEMAIL_TYPE = 4;
        public static final int VOICEMAIL_TYPE = 4;
        /** Call log type for blacklisted calls
         * @hide
         */
        public static final int BLACKLIST_TYPE = 5;


        /**
        /**
         * Bit-mask describing features of the call (e.g. video).
         * Bit-mask describing features of the call (e.g. video).
+55 −1
Original line number Original line Diff line number Diff line
@@ -2644,6 +2644,55 @@ public final class Settings {


        private static final Validator NOTIFICATIONS_USE_RING_VOLUME_VALIDATOR = sBooleanValidator;
        private static final Validator NOTIFICATIONS_USE_RING_VOLUME_VALIDATOR = sBooleanValidator;


        /**
         * 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 unknown numbers is enabled
         * @hide
         */
        public static final String PHONE_BLACKLIST_UNKNOWN_NUMBER_MODE = "phone_blacklist_unknown_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
         * Whether silent mode should allow vibration feedback. This is used
         * internally in AudioService and the Sound settings activity to
         * internally in AudioService and the Sound settings activity to
@@ -3632,7 +3681,12 @@ public final class Settings {
            DISPLAY_TEMPERATURE_DAY,
            DISPLAY_TEMPERATURE_DAY,
            DISPLAY_TEMPERATURE_MODE,
            DISPLAY_TEMPERATURE_MODE,
            DISPLAY_AUTO_OUTDOOR_MODE,
            DISPLAY_AUTO_OUTDOOR_MODE,
            LIVE_DISPLAY_HINTED
            LIVE_DISPLAY_HINTED,
            PHONE_BLACKLIST_ENABLED,
            PHONE_BLACKLIST_NOTIFY_ENABLED,
            PHONE_BLACKLIST_PRIVATE_NUMBER_MODE,
            PHONE_BLACKLIST_UNKNOWN_NUMBER_MODE,
            PHONE_BLACKLIST_REGEX_ENABLED
        };
        };


        /**
        /**
+30 −0
Original line number Original line Diff line number Diff line
@@ -2656,6 +2656,36 @@
    <permission android:name="android.permission.DISPATCH_NFC_MESSAGE"
    <permission android:name="android.permission.DISPATCH_NFC_MESSAGE"
                android:protectionLevel="signature|privileged" />
                android:protectionLevel="signature|privileged" />


    <!-- =============================================================== -->
    <!-- Permissions for accessing security data                         -->
    <!-- =============================================================== -->
    <eat-comment />

    <!-- Used for permissions that allow an application to access or configure
         the device security information.
         @hide This is not a third-party API (intended for system apps). -->
    <permission-group android:name="android.permission-group.SECURITY"
        android:label="@string/permgrouplab_security"
        android:icon="@drawable/perm_group_security"
        android:description="@string/permgroupdesc_security"
        android:priority="400"/>

    <!-- Allows an application to read the phone blacklist data.
         @hide This is not a third-party API (intended for system apps). -->
    <permission android:name="android.permission.READ_PHONE_BLACKLIST"
        android:permissionGroup="android.permission-group.SECURITY"
        android:protectionLevel="signature|system"
        android:label="@string/permlab_readPhoneBlacklist"
        android:description="@string/permdesc_readPhoneBlacklist" />

    <!-- Allows an application to change the phone blacklist data.
         @hide This is not a third-party API (intended for system apps). -->
    <permission android:name="android.permission.CHANGE_PHONE_BLACKLIST"
        android:permissionGroup="android.permission-group.SECURITY"
        android:protectionLevel="signature|system"
        android:label="@string/permlab_changePhoneBlacklist"
        android:description="@string/permdesc_changePhoneBlacklist" />

    <!-- The system process is explicitly the only one allowed to launch the
    <!-- The system process is explicitly the only one allowed to launch the
         confirmation UI for full backup/restore -->
         confirmation UI for full backup/restore -->
    <uses-permission android:name="android.permission.CONFIRM_FULL_BACKUP"/>
    <uses-permission android:name="android.permission.CONFIRM_FULL_BACKUP"/>
+1.52 KiB
Loading image diff...
+1.25 KiB
Loading image diff...
Loading