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

Commit 37f66200 authored by Tyler Gunn's avatar Tyler Gunn Committed by Gerrit Code Review
Browse files

Merge "Remove call identification APIs."

parents d0fc8c9d 61460ac0
Loading
Loading
Loading
Loading
+0 −46
Original line number Diff line number Diff line
@@ -35179,12 +35179,6 @@ package android.provider {
    field public static final String CACHED_NUMBER_TYPE = "numbertype";
    field public static final String CACHED_PHOTO_ID = "photo_id";
    field public static final String CACHED_PHOTO_URI = "photo_uri";
    field public static final String CALL_ID_APP_NAME = "call_id_app_name";
    field public static final String CALL_ID_DESCRIPTION = "call_id_description";
    field public static final String CALL_ID_DETAILS = "call_id_details";
    field public static final String CALL_ID_NAME = "call_id_name";
    field public static final String CALL_ID_NUISANCE_CONFIDENCE = "call_id_nuisance_confidence";
    field public static final String CALL_ID_PACKAGE_NAME = "call_id_package_name";
    field public static final String CALL_SCREENING_APP_NAME = "call_screening_app_name";
    field public static final String CALL_SCREENING_COMPONENT_NAME = "call_screening_component_name";
    field public static final android.net.Uri CONTENT_FILTER_URI;
@@ -41200,7 +41194,6 @@ package android.telecom {
    method public android.telecom.PhoneAccountHandle getAccountHandle();
    method public int getCallCapabilities();
    method public int getCallDirection();
    method @Nullable public android.telecom.CallIdentification getCallIdentification();
    method public int getCallProperties();
    method public String getCallerDisplayName();
    method public int getCallerDisplayNamePresentation();
@@ -41282,34 +41275,6 @@ package android.telecom {
    field public static final int ROUTE_WIRED_OR_EARPIECE = 5; // 0x5
  }
  public final class CallIdentification implements android.os.Parcelable {
    method public int describeContents();
    method @NonNull public CharSequence getCallScreeningAppName();
    method @NonNull public String getCallScreeningPackageName();
    method @Nullable public CharSequence getDescription();
    method @Nullable public CharSequence getDetails();
    method @Nullable public CharSequence getName();
    method public int getNuisanceConfidence();
    method @Nullable public android.graphics.drawable.Icon getPhoto();
    method public void writeToParcel(android.os.Parcel, int);
    field public static final int CONFIDENCE_LIKELY_NOT_NUISANCE = -1; // 0xffffffff
    field public static final int CONFIDENCE_LIKELY_NUISANCE = 1; // 0x1
    field public static final int CONFIDENCE_NOT_NUISANCE = -2; // 0xfffffffe
    field public static final int CONFIDENCE_NUISANCE = 2; // 0x2
    field public static final int CONFIDENCE_UNKNOWN = 0; // 0x0
    field public static final android.os.Parcelable.Creator<android.telecom.CallIdentification> CREATOR;
  }
  public static final class CallIdentification.Builder {
    ctor public CallIdentification.Builder();
    method @NonNull public android.telecom.CallIdentification build();
    method @NonNull public android.telecom.CallIdentification.Builder setDescription(@Nullable CharSequence);
    method @NonNull public android.telecom.CallIdentification.Builder setDetails(@Nullable CharSequence);
    method @NonNull public android.telecom.CallIdentification.Builder setName(@Nullable CharSequence);
    method @NonNull public android.telecom.CallIdentification.Builder setNuisanceConfidence(int);
    method @NonNull public android.telecom.CallIdentification.Builder setPhoto(@Nullable android.graphics.drawable.Icon);
  }
  public abstract class CallRedirectionService extends android.app.Service {
    ctor public CallRedirectionService();
    method public final void cancelCall();
@@ -41325,17 +41290,7 @@ package android.telecom {
    ctor public CallScreeningService();
    method public android.os.IBinder onBind(android.content.Intent);
    method public abstract void onScreenCall(@NonNull android.telecom.Call.Details);
    method public final void provideCallIdentification(@NonNull android.telecom.Call.Details, @NonNull android.telecom.CallIdentification);
    method public final void respondToCall(@NonNull android.telecom.Call.Details, @NonNull android.telecom.CallScreeningService.CallResponse);
    field public static final String ACTION_NUISANCE_CALL_STATUS_CHANGED = "android.telecom.action.NUISANCE_CALL_STATUS_CHANGED";
    field public static final int CALL_DURATION_LONG = 4; // 0x4
    field public static final int CALL_DURATION_MEDIUM = 3; // 0x3
    field public static final int CALL_DURATION_SHORT = 2; // 0x2
    field public static final int CALL_DURATION_VERY_SHORT = 1; // 0x1
    field public static final String EXTRA_CALL_DURATION = "android.telecom.extra.CALL_DURATION";
    field public static final String EXTRA_CALL_HANDLE = "android.telecom.extra.CALL_HANDLE";
    field public static final String EXTRA_CALL_TYPE = "android.telecom.extra.CALL_TYPE";
    field public static final String EXTRA_IS_NUISANCE = "android.telecom.extra.IS_NUISANCE";
    field public static final String SERVICE_INTERFACE = "android.telecom.CallScreeningService";
  }
@@ -41942,7 +41897,6 @@ package android.telecom {
    method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public boolean isVoiceMailNumber(android.telecom.PhoneAccountHandle, String);
    method @RequiresPermission(anyOf={android.Manifest.permission.CALL_PHONE, android.Manifest.permission.MANAGE_OWN_CALLS}) public void placeCall(android.net.Uri, android.os.Bundle);
    method public void registerPhoneAccount(android.telecom.PhoneAccount);
    method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public void reportNuisanceCallStatus(@NonNull android.net.Uri, boolean);
    method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public void showInCallScreen(boolean);
    method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void silenceRinger();
    method public void unregisterPhoneAccount(android.telecom.PhoneAccountHandle);
+3 −89
Original line number Diff line number Diff line
@@ -35,7 +35,6 @@ import android.provider.ContactsContract.CommonDataKinds.Callable;
import android.provider.ContactsContract.CommonDataKinds.Phone;
import android.provider.ContactsContract.Data;
import android.provider.ContactsContract.DataUsageFeedback;
import android.telecom.CallIdentification;
import android.telecom.PhoneAccount;
import android.telecom.PhoneAccountHandle;
import android.telecom.TelecomManager;
@@ -604,69 +603,6 @@ public class CallLog {
         */
        public static final String BLOCK_REASON = "block_reason";

        /**
         * The package name of the {@link android.telecom.CallScreeningService} which provided
         * {@link android.telecom.CallIdentification} for this call.
         * <P>Type: TEXT</P>
         */
        public static final String CALL_ID_PACKAGE_NAME = "call_id_package_name";

        /**
         * The app name of the {@link android.telecom.CallScreeningService} which provided
         * {@link android.telecom.CallIdentification} for this call.
         * <P>Type: TEXT</P>
         */
        public static final String CALL_ID_APP_NAME = "call_id_app_name";

        /**
         * The {@link CallIdentification#getName() name} of a call, as provided by the
         * {@link android.telecom.CallScreeningService}.
         * <p>
         * The name is provided by the app identified by {@link #CALL_ID_PACKAGE_NAME} and
         * {@link #CALL_ID_APP_NAME}.
         * <P>Type: TEXT</P>
         */
        public static final String CALL_ID_NAME = "call_id_name";

        /**
         * The {@link CallIdentification#getDescription() description} of a call, as provided by the
         * {@link android.telecom.CallScreeningService}.
         * <p>
         * The description is provided by the app identified by {@link #CALL_ID_PACKAGE_NAME} and
         * {@link #CALL_ID_APP_NAME}.
         * <P>Type: TEXT</P>
         */
        public static final String CALL_ID_DESCRIPTION = "call_id_description";

        /**
         * The {@link CallIdentification#getDetails() details} of a call, as provided by the
         * {@link android.telecom.CallScreeningService}.
         * <p>
         * The details field is provided by the app identified by {@link #CALL_ID_PACKAGE_NAME} and
         * {@link #CALL_ID_APP_NAME}.
         * <P>Type: TEXT</P>
         */
        public static final String CALL_ID_DETAILS = "call_id_details";

        /**
         * The {@link CallIdentification#getNuisanceConfidence() nuisance confidence} of a call, as
         * provided by the {@link android.telecom.CallScreeningService}.
         * <p>
         * Valid values are defined in {@link CallIdentification}, and include:
         * <ul>
         *     <li>{@link CallIdentification#CONFIDENCE_NOT_NUISANCE}</li>
         *     <li>{@link CallIdentification#CONFIDENCE_LIKELY_NOT_NUISANCE}</li>
         *     <li>{@link CallIdentification#CONFIDENCE_UNKNOWN}</li>
         *     <li>{@link CallIdentification#CONFIDENCE_LIKELY_NUISANCE}</li>
         *     <li>{@link CallIdentification#CONFIDENCE_NUISANCE}</li>
         * </ul>
         * <p>
         * The nuisance confidence is provided by the app identified by
         * {@link #CALL_ID_PACKAGE_NAME} and {@link #CALL_ID_APP_NAME}.
         * <P>Type: INTEGER</P>
         */
        public static final String CALL_ID_NUISANCE_CONFIDENCE = "call_id_nuisance_confidence";

        /**
         * Adds a call to the call log.
         *
@@ -696,8 +632,7 @@ public class CallLog {
                presentation, callType, features, accountHandle, start, duration,
                dataUsage, false /* addForAllUsers */, null /* userToBeInsertedTo */,
                false /* isRead */, Calls.BLOCK_REASON_NOT_BLOCKED /* callBlockReason */,
                null /* callScreeningAppName */, null /* callScreeningComponentName */,
                null /* callIdentification */);
                null /* callScreeningAppName */, null /* callScreeningComponentName */);
        }


@@ -737,8 +672,7 @@ public class CallLog {
                features, accountHandle, start, duration, dataUsage, addForAllUsers,
                userToBeInsertedTo, false /* isRead */ , Calls.BLOCK_REASON_NOT_BLOCKED
                /* callBlockReason */, null /* callScreeningAppName */,
                null /* callScreeningComponentName */,
                null /* callIdentification */);
                null /* callScreeningComponentName */);
        }

        /**
@@ -784,7 +718,7 @@ public class CallLog {
                int features, PhoneAccountHandle accountHandle, long start, int duration,
                Long dataUsage, boolean addForAllUsers, UserHandle userToBeInsertedTo,
                boolean isRead, int callBlockReason, CharSequence callScreeningAppName,
                String callScreeningComponentName, CallIdentification callIdentification) {
                String callScreeningComponentName) {
            if (VERBOSE_LOG) {
                Log.v(LOG_TAG, String.format("Add call: number=%s, user=%s, for all=%s",
                        number, userToBeInsertedTo, addForAllUsers));
@@ -839,26 +773,6 @@ public class CallLog {
            values.put(CALL_SCREENING_APP_NAME, charSequenceToString(callScreeningAppName));
            values.put(CALL_SCREENING_COMPONENT_NAME, callScreeningComponentName);

            if (callIdentification != null) {
                values.put(CALL_ID_PACKAGE_NAME, callIdentification.getCallScreeningPackageName());
                values.put(CALL_ID_APP_NAME,
                        charSequenceToString(callIdentification.getCallScreeningAppName()));
                values.put(CALL_ID_NAME,
                        charSequenceToString(callIdentification.getName()));
                values.put(CALL_ID_DESCRIPTION,
                        charSequenceToString(callIdentification.getDescription()));
                values.put(CALL_ID_DETAILS,
                        charSequenceToString(callIdentification.getDetails()));
                values.put(CALL_ID_NUISANCE_CONFIDENCE, callIdentification.getNuisanceConfidence());
            } else {
                values.putNull(CALL_ID_PACKAGE_NAME);
                values.putNull(CALL_ID_APP_NAME);
                values.putNull(CALL_ID_NAME);
                values.putNull(CALL_ID_DESCRIPTION);
                values.putNull(CALL_ID_DETAILS);
                values.putNull(CALL_ID_NUISANCE_CONFIDENCE);
            }

            if ((ci != null) && (ci.contactIdOrZero > 0)) {
                // Update usage information for the number associated with the contact ID.
                // We need to use both the number and the ID for obtaining a data ID since other
+0 −25
Original line number Diff line number Diff line
@@ -542,7 +542,6 @@ public final class Call {
        private final Bundle mExtras;
        private final Bundle mIntentExtras;
        private final long mCreationTimeMillis;
        private final CallIdentification mCallIdentification;
        private final @CallDirection int mCallDirection;

        /**
@@ -728,8 +727,6 @@ public final class Call {
         * The display name for the caller.
         * <p>
         * This is the name as reported by the {@link ConnectionService} associated with this call.
         * The name reported by a {@link CallScreeningService} can be retrieved using
         * {@link CallIdentification#getName()}.
         *
         * @return The display name for the caller.
         */
@@ -846,23 +843,6 @@ public final class Call {
            return mCreationTimeMillis;
        }

        /**
         * Returns {@link CallIdentification} information provided by a
         * {@link CallScreeningService} for this call.
         * <p>
         * {@link InCallService} implementations should display the {@link CallIdentification} for
         * calls.  The name of the call screening service is provided in
         * {@link CallIdentification#getCallScreeningAppName()} and should be used to attribute the
         * call identification information.
         *
         * @return The {@link CallIdentification} if it was provided by a
         * {@link CallScreeningService}, or {@code null} if no {@link CallScreeningService} has
         * provided {@link CallIdentification} information for the call.
         */
        public @Nullable CallIdentification getCallIdentification() {
            return mCallIdentification;
        }

        /**
         * Indicates whether the call is an incoming or outgoing call.
         * @return The call's direction.
@@ -892,7 +872,6 @@ public final class Call {
                        areBundlesEqual(mExtras, d.mExtras) &&
                        areBundlesEqual(mIntentExtras, d.mIntentExtras) &&
                        Objects.equals(mCreationTimeMillis, d.mCreationTimeMillis) &&
                        Objects.equals(mCallIdentification, d.mCallIdentification) &&
                        Objects.equals(mCallDirection, d.mCallDirection);
            }
            return false;
@@ -915,7 +894,6 @@ public final class Call {
                            mExtras,
                            mIntentExtras,
                            mCreationTimeMillis,
                            mCallIdentification,
                            mCallDirection);
        }

@@ -937,7 +915,6 @@ public final class Call {
                Bundle extras,
                Bundle intentExtras,
                long creationTimeMillis,
                CallIdentification callIdentification,
                int callDirection) {
            mTelecomCallId = telecomCallId;
            mHandle = handle;
@@ -955,7 +932,6 @@ public final class Call {
            mExtras = extras;
            mIntentExtras = intentExtras;
            mCreationTimeMillis = creationTimeMillis;
            mCallIdentification = callIdentification;
            mCallDirection = callDirection;
        }

@@ -978,7 +954,6 @@ public final class Call {
                    parcelableCall.getExtras(),
                    parcelableCall.getIntentExtras(),
                    parcelableCall.getCreationTimeMillis(),
                    parcelableCall.getCallIdentification(),
                    parcelableCall.getCallDirection());
        }

+0 −22
Original line number Diff line number Diff line
/*
 * Copyright 2018, The Android Open Source 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 android.telecom;

/**
 * {@hide}
 */
parcelable CallIdentification;
+0 −451

File deleted.

Preview size limit exceeded, changes collapsed.

Loading