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

Commit 2f694924 authored by Roman Birg's avatar Roman Birg Committed by Matt Garnes
Browse files

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



Change-Id: Ide9847344dd1260cc4d8e4fa5c6b461ea7aa3ded
Signed-off-by: default avatarRoman Birg <roman@cyngn.com>
(cherry picked from commit 6a4c21ee)
parent fb81df0d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -162,7 +162,7 @@ public class CallLog {
        /** Call log type for blacklisted calls
         * @hide
         */
        public static final int BLACKLIST_TYPE = 173;
        public static final int BLACKLIST_TYPE = 5;

        /**
         * Bit-mask describing features of the call (e.g. video).
+0 −23
Original line number Diff line number Diff line
@@ -148,13 +148,11 @@ public class CallerInfo {

    private boolean mIsEmergency;
    private boolean mIsVoiceMail;
    private boolean mIsBlacklisted;

    public CallerInfo() {
        // TODO: Move all the basic initialization here?
        mIsEmergency = false;
        mIsVoiceMail = false;
        mIsBlacklisted = false;
    }

    /**
@@ -388,10 +386,6 @@ public class CallerInfo {
        return mIsVoiceMail;
    }

    public boolean isBlacklistedNumber() {
        return mIsBlacklisted;
    }

    /**
     * Mark this CallerInfo as an emergency call.
     * @param context To lookup the localized 'Emergency Number' string.
@@ -450,23 +444,6 @@ public class CallerInfo {
        return this;
    }

    /**
     * Mark this CallerInfo as a blacklist call
     * @return this instance.
     */
    public CallerInfo markAsBlacklist() {
        mIsBlacklisted = true;

        try {
            String blacklistLabel = "Blacklist";

            phoneNumber = blacklistLabel;
        } catch (SecurityException se) {
            Rlog.e(TAG, "Cannot access Blacklist.", se);
        }
        return this;
    }

    private static String normalize(String s) {
        if (s == null || s.length() > 0) {
            return s;