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

Commit 5aeae0fb authored by Tyler Gunn's avatar Tyler Gunn Committed by Android (Google) Code Review
Browse files

Merge "Update call identification data types."

parents 389d782a 67f90a42
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -82,7 +82,7 @@ public final class CallLogManager extends CallsManagerListenerBase {
                int features, PhoneAccountHandle accountHandle, long creationDate,
                long durationInMillis, Long dataUsage, UserHandle initiatingUser, boolean isRead,
                @Nullable LogCallCompletedListener logCallCompletedListener, int callBlockReason,
                String callScreeningAppName, String callScreeningComponentName,
                CharSequence callScreeningAppName, String callScreeningComponentName,
                CallIdentification callIdentification) {
            this.context = context;
            this.callerInfo = callerInfo;
@@ -125,7 +125,7 @@ public final class CallLogManager extends CallsManagerListenerBase {
        public final LogCallCompletedListener logCallCompletedListener;

        public final int callBockReason;
        public final String callScreeningAppName;
        public final CharSequence callScreeningAppName;
        public final String callScreeningComponentName;

        public final CallIdentification callIdentification;
@@ -359,7 +359,7 @@ public final class CallLogManager extends CallsManagerListenerBase {
            boolean isSelfManaged,
            @Nullable LogCallCompletedListener logCallCompletedListener,
            int callBlockReason,
            String callScreeningAppName,
            CharSequence callScreeningAppName,
            String callScreeningComponentName,
            @Nullable CallIdentification callIdentification) {

+1 −1
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@ public class CallScreeningServiceHelper {
     * app.
     */
    public interface AppLabelProxy {
        String getAppLabel(String packageName);
        CharSequence getAppLabel(String packageName);
    }

    /**
+4 −5
Original line number Diff line number Diff line
@@ -66,7 +66,6 @@ import android.telephony.PhoneNumberUtils;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
import android.util.Pair;
import android.widget.Toast;

import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.telephony.AsyncEmergencyContactNotifier;
@@ -616,11 +615,11 @@ public class CallsManager extends Call.ListenerBase
                new TelecomServiceImpl.SettingsSecureAdapterImpl(), mCallerInfoLookupHelper,
                new CallScreeningServiceHelper.AppLabelProxy() {
                    @Override
                    public String getAppLabel(String packageName) {
                    public CharSequence getAppLabel(String packageName) {
                        PackageManager pm = mContext.getPackageManager();
                        try {
                            ApplicationInfo info = pm.getApplicationInfo(packageName, 0);
                            return (String) pm.getApplicationLabel(info);
                            return pm.getApplicationLabel(info);
                        } catch (PackageManager.NameNotFoundException nnfe) {
                            Log.w(this, "Could not determine package name.");
                        }
@@ -1560,12 +1559,12 @@ public class CallsManager extends Call.ListenerBase
                theCall,
                new CallScreeningServiceHelper.AppLabelProxy() {
                    @Override
                    public String getAppLabel(String packageName) {
                    public CharSequence getAppLabel(String packageName) {
                        PackageManager pm = mContext.getPackageManager();
                        try {
                            ApplicationInfo info = pm.getApplicationInfo(
                                    packageName, 0);
                            return (String) pm.getApplicationLabel(info);
                            return pm.getApplicationLabel(info);
                        } catch (PackageManager.NameNotFoundException nnfe) {
                            Log.w(this, "Could not determine package name.");
                        }
+4 −4
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@ public class CallFilteringResult {
    public boolean shouldAddToCallLog;
    public boolean shouldShowNotification;
    public int mCallBlockReason = CallLog.Calls.BLOCK_REASON_NOT_BLOCKED;
    public String mCallScreeningAppName = null;
    public CharSequence mCallScreeningAppName = null;
    public String mCallScreeningComponentName = null;

    public CallFilteringResult(boolean shouldAllowCall, boolean shouldReject, boolean
@@ -38,8 +38,8 @@ public class CallFilteringResult {
    }

    public CallFilteringResult(boolean shouldAllowCall, boolean shouldReject, boolean
            shouldAddToCallLog, boolean shouldShowNotification, int callBlockReason, String
            callScreeningAppName, String callScreeningComponentName) {
            shouldAddToCallLog, boolean shouldShowNotification, int callBlockReason,
            CharSequence callScreeningAppName, String callScreeningComponentName) {
        this.shouldAllowCall = shouldAllowCall;
        this.shouldReject = shouldReject;
        this.shouldAddToCallLog = shouldAddToCallLog;
@@ -104,7 +104,7 @@ public class CallFilteringResult {
    }

    private CallFilteringResult getCombinedCallFilteringResult(CallFilteringResult other,
        int callBlockReason, String callScreeningAppName, String callScreeningComponentName) {
        int callBlockReason, CharSequence callScreeningAppName, String callScreeningComponentName) {
        return new CallFilteringResult(
            shouldAllowCall && other.shouldAllowCall,
            shouldReject || other.shouldReject,
+2 −2
Original line number Diff line number Diff line
@@ -184,7 +184,7 @@ public class CallScreeningServiceFilter {
    private ICallScreeningService mService;
    private ServiceConnection mConnection;
    private String mPackageName;
    private String mAppName;
    private CharSequence mAppName;
    private boolean mHasFinished = false;

    private CallFilteringResult mResult = new CallFilteringResult(
@@ -211,7 +211,7 @@ public class CallScreeningServiceFilter {
    public void startCallScreeningFilter(Call call,
                                         CallScreeningFilterResultCallback callback,
                                         String packageName,
                                         String appName) {
                                         CharSequence appName) {
        if (mHasFinished) {
            Log.w(this, "Attempting to reuse CallScreeningServiceFilter. Ignoring.");
            return;
Loading