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

Commit 9dcf39fa authored by Danesh M's avatar Danesh M
Browse files

Telecom : Add callInfo provider abstraction

Change-Id: I0b192c399dd9968765ca76e37e4e3a24021bd5d2
parent b5377130
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -17,9 +17,9 @@ LOCAL_PROGUARD_FLAGS := $(proguard.flags)
# Workaround for "local variable type mismatch" error.
LOCAL_DX_FLAGS += --no-locals

TELECOMM_SPAM_FILTER ?= $(LOCAL_PATH)/spam_filter
TELECOMM_CALLINFO_PROVIDER ?= $(LOCAL_PATH)/callinfo_provider

include $(TELECOMM_SPAM_FILTER)/Android.mk
include $(TELECOMM_CALLINFO_PROVIDER)/provider.mk

include $(BUILD_PACKAGE)

+15 −0
Original line number Diff line number Diff line
# Copyright (C) 2015 The CyanogenMod Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

LOCAL_SRC_FILES += $(call all-java-files-under, callinfo_provider/src)
+47 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2015 The CyanogenMod Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License
 */

package com.android.server.telecom;

import android.app.Notification;
import android.content.Context;

import java.util.List;

public final class CallInfoProvider extends CallsManagerListenerBase {
    public CallInfoProvider(Context context) {
    }

    public synchronized boolean shouldBlock(String number) {
        return false;
    }

    public boolean requiresNetwork() {
        return false;
    }

    public boolean providesCallInfo() {
        return false;
    }

    public boolean updateInfoForCall(MissedCallInfo call) {
        return false;
    }

    public void updateMissedCallNotification(List<MissedCallInfo> missedCalls,
                                             Notification notification) {
    }
}

spam_filter/Android.mk

deleted100644 → 0
+0 −1
Original line number Diff line number Diff line
LOCAL_SRC_FILES += $(call all-java-files-under, spam_filter/src)
+0 −19
Original line number Diff line number Diff line
package com.android.server.telecom;

import android.content.Context;

/**
 * Listens for call updates and records whether calls should be blocked based on
 * caller info results.  Can also hang up calls while they are ringing, in case
 * they could not be blocked in time.
 */
public class SpamBlocker extends CallsManagerListenerBase {

    public SpamBlocker(Context context) {
    }

    public synchronized boolean shouldBlock(String number) {
        return false;
    }

}
Loading