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

Commit 6a4c21ee authored by Roman Birg's avatar Roman Birg
Browse files

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



Change-Id: Ide9847344dd1260cc4d8e4fa5c6b461ea7aa3ded
Signed-off-by: default avatarRoman Birg <roman@cyngn.com>
parent ba7e1cd2
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -162,7 +162,7 @@ public class CallLog {
        /** Call log type for blacklisted calls
        /** Call log type for blacklisted calls
         * @hide
         * @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).
         * Bit-mask describing features of the call (e.g. video).
+0 −23
Original line number Original line Diff line number Diff line
@@ -148,13 +148,11 @@ public class CallerInfo {


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


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


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


    public boolean isBlacklistedNumber() {
        return mIsBlacklisted;
    }

    /**
    /**
     * Mark this CallerInfo as an emergency call.
     * Mark this CallerInfo as an emergency call.
     * @param context To lookup the localized 'Emergency Number' string.
     * @param context To lookup the localized 'Emergency Number' string.
@@ -450,23 +444,6 @@ public class CallerInfo {
        return this;
        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) {
    private static String normalize(String s) {
        if (s == null || s.length() > 0) {
        if (s == null || s.length() > 0) {
            return s;
            return s;