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

Commit 9290025c authored by Danesh M's avatar Danesh M
Browse files

Telecom : Remove null check for blacklist

Let null numbers fall through to BlacklistUtils so it can ensure
features such as "block unknown/private numbers" continues to function.

Also since private numbers are now treated as unknown if the feature
is enabled, ensure if the number is null to show an empty string

Change-Id: Iebcaec533b581a8cea2f7b81c0ebfbc22acc9cb5
(cherry picked from commit 2be100b3)
parent 6e7ab5e7
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -144,7 +144,11 @@ class BlacklistCallNotifier extends CallsManagerListenerBase {
                            : R.string.blacklist_message_notification;
                    break;
            }
            builder.setContentText(mContext.getString(messageResId, number));
            String contentNumber = number;
            if (contentNumber == null) {
                contentNumber = "";
            }
            builder.setContentText(mContext.getString(messageResId, contentNumber));

            if (matchType != BlacklistUtils.MATCH_LIST) {
                addUnblockAction = false;
+0 −4
Original line number Diff line number Diff line
@@ -2203,10 +2203,6 @@ public final class CallsManager extends Call.ListenerBase {

    protected boolean isCallBlacklisted(Call c) {
        final String number = c.getNumber();
        if (number == null) {
            return false;
        }

        // See if the number is in the blacklist
        // Result is one of: MATCH_NONE, MATCH_LIST or MATCH_REGEX
        int listType = BlacklistUtils.isListed(mContext, number, BlacklistUtils.BLOCK_CALLS);