Remove call identification APIs.

Removing the CallIdentification API surface.

Test: Build, run tests.
Bug: 129531123
Change-Id: I5f1451ffba04ee438df739a17472c028c44f19b2
diff --git a/api/current.txt b/api/current.txt
index 2a26368..fd06afd 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -37073,12 +37073,6 @@
     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;
@@ -43247,7 +43241,6 @@
     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();
@@ -43329,34 +43322,6 @@
     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 @NonNull 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();
@@ -43372,17 +43337,7 @@
     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";
   }
 
@@ -43991,7 +43946,6 @@
     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);
diff --git a/core/java/android/provider/CallLog.java b/core/java/android/provider/CallLog.java
index 44adc1c..ef28f07 100644
--- a/core/java/android/provider/CallLog.java
+++ b/core/java/android/provider/CallLog.java
@@ -35,7 +35,6 @@
 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;
@@ -605,69 +604,6 @@
         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.
          *
          * @param ci the CallerInfo object to get the target contact from.  Can be null
@@ -696,8 +632,7 @@
                 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 @@
                 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 @@
                 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 @@
             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
diff --git a/telecomm/java/android/telecom/Call.java b/telecomm/java/android/telecom/Call.java
index c05a346..1822cee 100644
--- a/telecomm/java/android/telecom/Call.java
+++ b/telecomm/java/android/telecom/Call.java
@@ -552,7 +552,6 @@
         private final Bundle mExtras;
         private final Bundle mIntentExtras;
         private final long mCreationTimeMillis;
-        private final CallIdentification mCallIdentification;
         private final @CallDirection int mCallDirection;
 
         /**
@@ -738,8 +737,6 @@
          * 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.
          */
@@ -857,23 +854,6 @@
         }
 
         /**
-         * 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.
          */
@@ -902,7 +882,6 @@
                         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;
@@ -925,7 +904,6 @@
                             mExtras,
                             mIntentExtras,
                             mCreationTimeMillis,
-                            mCallIdentification,
                             mCallDirection);
         }
 
@@ -947,7 +925,6 @@
                 Bundle extras,
                 Bundle intentExtras,
                 long creationTimeMillis,
-                CallIdentification callIdentification,
                 int callDirection) {
             mTelecomCallId = telecomCallId;
             mHandle = handle;
@@ -965,7 +942,6 @@
             mExtras = extras;
             mIntentExtras = intentExtras;
             mCreationTimeMillis = creationTimeMillis;
-            mCallIdentification = callIdentification;
             mCallDirection = callDirection;
         }
 
@@ -988,7 +964,6 @@
                     parcelableCall.getExtras(),
                     parcelableCall.getIntentExtras(),
                     parcelableCall.getCreationTimeMillis(),
-                    parcelableCall.getCallIdentification(),
                     parcelableCall.getCallDirection());
         }
 
diff --git a/telecomm/java/android/telecom/CallIdentification.aidl b/telecomm/java/android/telecom/CallIdentification.aidl
deleted file mode 100644
index 532535c..0000000
--- a/telecomm/java/android/telecom/CallIdentification.aidl
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * 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;
diff --git a/telecomm/java/android/telecom/CallIdentification.java b/telecomm/java/android/telecom/CallIdentification.java
deleted file mode 100644
index 745affd..0000000
--- a/telecomm/java/android/telecom/CallIdentification.java
+++ /dev/null
@@ -1,451 +0,0 @@
-/*
- * Copyright (C) 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;
-
-import android.annotation.IntDef;
-import android.annotation.NonNull;
-import android.annotation.Nullable;
-import android.content.pm.ApplicationInfo;
-import android.graphics.drawable.Icon;
-import android.os.Parcel;
-import android.os.Parcelable;
-
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.util.Objects;
-
-/**
- * Encapsulates information about an incoming or outgoing {@link Call} provided by a
- * {@link CallScreeningService}.
- * <p>
- * Call identified information is consumed by the {@link InCallService dialer} app to provide the
- * user with more information about a call.  This can include information such as the name of the
- * caller, address, etc.  Call identification information is persisted to the
- * {@link android.provider.CallLog}.
- */
-public final class CallIdentification implements Parcelable {
-    /**
-     * Builder for {@link CallIdentification} instances.
-     * <p>
-     * A {@link CallScreeningService} uses this class to create new instances of
-     * {@link CallIdentification} for a screened call.
-     */
-    public final static class Builder {
-        private CharSequence mName;
-        private CharSequence mDescription;
-        private CharSequence mDetails;
-        private Icon mPhoto;
-        private int mNuisanceConfidence = CallIdentification.CONFIDENCE_UNKNOWN;
-        private String mPackageName;
-        private CharSequence mAppName;
-
-        /**
-         * Default builder constructor.
-         */
-        public Builder() {
-            // Default constructor
-        }
-
-        /**
-         * Create instance of call identification with specified package/app name.
-         *
-         * @param callIdPackageName The package name.
-         * @param callIdAppName The app name.
-         * @hide
-         */
-        public Builder(@NonNull String callIdPackageName, @NonNull CharSequence callIdAppName) {
-            mPackageName = callIdPackageName;
-            mAppName = callIdAppName;
-        }
-
-        /**
-         * Sets the name associated with the {@link CallIdentification} being built.
-         * <p>
-         * Could be a business name, for example.
-         *
-         * @param name The name associated with the call, or {@code null} if none is provided.
-         * @return Builder instance.
-         */
-        public @NonNull Builder setName(@Nullable CharSequence name) {
-            mName = name;
-            return this;
-        }
-
-        /**
-         * Sets the description associated with the {@link CallIdentification} being built.
-         * <p>
-         * A description of the call as identified by a {@link CallScreeningService}.  The
-         * description is typically presented by Dialer apps after the
-         * {@link CallIdentification#getName() name} to provide a short piece of relevant
-         * information about the call.  This could include a location, address, or a message
-         * regarding the potential nature of the call (e.g. potential telemarketer).
-         *
-         * @param description The call description, or {@code null} if none is provided.
-         * @return Builder instance.
-         */
-        public @NonNull Builder setDescription(@Nullable CharSequence description) {
-            mDescription = description;
-            return this;
-        }
-
-        /**
-         * Sets the details associated with the {@link CallIdentification} being built.
-         * <p>
-         * The details is typically presented by Dialer apps after the
-         * {@link CallIdentification#getName() name} and
-         * {@link CallIdentification#getDescription() description} to provide further clarifying
-         * information about the call. This could include, for example, the opening hours of a
-         * business, or a stats about the number of times a call has been reported as spam.
-         *
-         * @param details The call details, or {@code null} if none is provided.
-         * @return Builder instance.
-         */
-
-        public @NonNull Builder setDetails(@Nullable CharSequence details) {
-            mDetails = details;
-            return this;
-        }
-
-        /**
-         * Sets the photo associated with the {@link CallIdentification} being built.
-         * <p>
-         * This could be, for example, a business logo, or a photo of the caller.
-         *
-         * @param photo The photo associated with the call, or {@code null} if none was provided.
-         * @return Builder instance.
-         */
-        public @NonNull Builder setPhoto(@Nullable Icon photo) {
-            mPhoto = photo;
-            return this;
-        }
-
-        /**
-         * Sets the nuisance confidence with the {@link CallIdentification} being built.
-         * <p>
-         * This can be used to specify how confident the {@link CallScreeningService} is that a call
-         * is or is not a nuisance call.
-         *
-         * @param nuisanceConfidence The nuisance confidence.
-         * @return The builder.
-         */
-        public @NonNull Builder setNuisanceConfidence(@NuisanceConfidence int nuisanceConfidence) {
-            mNuisanceConfidence = nuisanceConfidence;
-            return this;
-        }
-
-        /**
-         * Creates a new instance of {@link CallIdentification} based on the parameters set in this
-         * builder.
-         *
-         * @return {@link CallIdentification} instance.
-         */
-        public @NonNull CallIdentification build() {
-            return new CallIdentification(mName, mDescription, mDetails, mPhoto,
-                    mNuisanceConfidence, mPackageName, mAppName);
-        }
-    }
-
-    /** @hide */
-    @Retention(RetentionPolicy.SOURCE)
-    @IntDef(
-            prefix = { "CONFIDENCE_" },
-            value = {CONFIDENCE_NUISANCE, CONFIDENCE_LIKELY_NUISANCE, CONFIDENCE_UNKNOWN,
-                    CONFIDENCE_LIKELY_NOT_NUISANCE, CONFIDENCE_NOT_NUISANCE})
-    public @interface NuisanceConfidence {}
-
-    /**
-     * Call has been identified as a nuisance call.
-     * <p>
-     * Returned from {@link #getNuisanceConfidence()} to indicate that a
-     * {@link CallScreeningService} to indicate how confident it is that a call is or is not a
-     * nuisance call.
-     */
-    public static final int CONFIDENCE_NUISANCE = 2;
-
-    /**
-     * Call has been identified as a likely nuisance call.
-     * <p>
-     * Returned from {@link #getNuisanceConfidence()} to indicate that a
-     * {@link CallScreeningService} to indicate how confident it is that a call is or is not a
-     * nuisance call.
-     */
-    public static final int CONFIDENCE_LIKELY_NUISANCE = 1;
-
-    /**
-     * Call could not be classified as nuisance or non-nuisance.
-     * <p>
-     * Returned from {@link #getNuisanceConfidence()} to indicate that a
-     * {@link CallScreeningService} to indicate how confident it is that a call is or is not a
-     * nuisance call.
-     */
-    public static final int CONFIDENCE_UNKNOWN = 0;
-
-    /**
-     * Call has been identified as not likely to be a nuisance call.
-     * <p>
-     * Returned from {@link #getNuisanceConfidence()} to indicate that a
-     * {@link CallScreeningService} to indicate how confident it is that a call is or is not a
-     * nuisance call.
-     */
-    public static final int CONFIDENCE_LIKELY_NOT_NUISANCE = -1;
-
-    /**
-     * Call has been identified as not a nuisance call.
-     * <p>
-     * Returned from {@link #getNuisanceConfidence()} to indicate that a
-     * {@link CallScreeningService} to indicate how confident it is that a call is or is not a
-     * nuisance call.
-     */
-    public static final int CONFIDENCE_NOT_NUISANCE = -2;
-
-    /**
-     * Default constructor for {@link CallIdentification}.
-     *
-     * @param name The name.
-     * @param description The description.
-     * @param details The details.
-     * @param photo The photo.
-     * @param nuisanceConfidence Confidence that this is a nuisance call.
-     * @hide
-     */
-    private CallIdentification(@Nullable String name, @Nullable String description,
-            @Nullable String details, @Nullable Icon photo,
-            @NuisanceConfidence int nuisanceConfidence) {
-        this(name, description, details, photo, nuisanceConfidence, null, null);
-    }
-
-    /**
-     * Default constructor for {@link CallIdentification}.
-     *
-     * @param name The name.
-     * @param description The description.
-     * @param details The details.
-     * @param photo The photo.
-     * @param nuisanceConfidence Confidence that this is a nuisance call.
-     * @param callScreeningPackageName Package name of the {@link CallScreeningService} which
-     *                                 provided the call identification.
-     * @param callScreeningAppName App name of the {@link CallScreeningService} which provided the
-     *                             call identification.
-     * @hide
-     */
-    private CallIdentification(@Nullable CharSequence name, @Nullable CharSequence description,
-            @Nullable CharSequence details, @Nullable Icon photo,
-            @NuisanceConfidence int nuisanceConfidence, @NonNull String callScreeningPackageName,
-            @NonNull CharSequence callScreeningAppName) {
-        mName = name;
-        mDescription = description;
-        mDetails = details;
-        mPhoto = photo;
-        mNuisanceConfidence = nuisanceConfidence;
-        mCallScreeningAppName = callScreeningAppName;
-        mCallScreeningPackageName = callScreeningPackageName;
-    }
-
-    private CharSequence mName;
-    private CharSequence mDescription;
-    private CharSequence mDetails;
-    private Icon mPhoto;
-    private int mNuisanceConfidence;
-    private String mCallScreeningPackageName;
-    private CharSequence mCallScreeningAppName;
-
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    @Override
-    public void writeToParcel(Parcel parcel, int i) {
-        parcel.writeCharSequence(mName);
-        parcel.writeCharSequence(mDescription);
-        parcel.writeCharSequence(mDetails);
-        parcel.writeParcelable(mPhoto, 0);
-        parcel.writeInt(mNuisanceConfidence);
-        parcel.writeString(mCallScreeningPackageName);
-        parcel.writeCharSequence(mCallScreeningAppName);
-    }
-
-    /**
-     * Responsible for creating CallIdentification objects for deserialized Parcels.
-     */
-    public static final @android.annotation.NonNull Parcelable.Creator<CallIdentification> CREATOR =
-            new Parcelable.Creator<CallIdentification> () {
-
-                @Override
-                public CallIdentification createFromParcel(Parcel source) {
-                    CharSequence name = source.readCharSequence();
-                    CharSequence description = source.readCharSequence();
-                    CharSequence details = source.readCharSequence();
-                    Icon photo = source.readParcelable(ClassLoader.getSystemClassLoader());
-                    int nuisanceConfidence = source.readInt();
-                    String callScreeningPackageName = source.readString();
-                    CharSequence callScreeningAppName = source.readCharSequence();
-                    return new CallIdentification(name, description, details, photo,
-                            nuisanceConfidence, callScreeningPackageName, callScreeningAppName);
-                }
-
-                @Override
-                public CallIdentification[] newArray(int size) {
-                    return new CallIdentification[size];
-                }
-            };
-
-    /**
-     * The name associated with the number.
-     * <p>
-     * The name of the call as identified by a {@link CallScreeningService}.  Could be a business
-     * name, for example.
-     *
-     * @return The name associated with the number, or {@code null} if none was provided.
-     */
-    public final @Nullable CharSequence getName() {
-        return mName;
-    }
-
-    /**
-     * Description of the call.
-     * <p>
-     * A description of the call as identified by a {@link CallScreeningService}.  The description
-     * is typically presented by Dialer apps after the {@link #getName() name} to provide a short
-     * piece of relevant information about the call.  This could include a location, address, or a
-     * message regarding the potential nature of the call (e.g. potential telemarketer).
-     *
-     * @return The call description, or {@code null} if none was provided.
-     */
-    public final @Nullable CharSequence getDescription() {
-        return mDescription;
-    }
-
-    /**
-     * Details of the call.
-     * <p>
-     * Details of the call as identified by a {@link CallScreeningService}.  The details
-     * are typically presented by Dialer apps after the {@link #getName() name} and
-     * {@link #getDescription() description} to provide further clarifying information about the
-     * call. This could include, for example, the opening hours of a business, or stats about
-     * the number of times a call has been reported as spam.
-     *
-     * @return The call details, or {@code null} if none was provided.
-     */
-    public final @Nullable CharSequence getDetails() {
-        return mDetails;
-    }
-
-    /**
-     * Photo associated with the call.
-     * <p>
-     * A photo associated with the call as identified by a {@link CallScreeningService}.  This
-     * could be, for example, a business logo, or a photo of the caller.
-     *
-     * @return The photo associated with the call, or {@code null} if none was provided.
-     */
-    public final @Nullable Icon getPhoto() {
-        return mPhoto;
-    }
-
-    /**
-     * Indicates the likelihood that this call is a nuisance call.
-     * <p>
-     * How likely the call is a nuisance call, as identified by a {@link CallScreeningService}.
-     *
-     * @return The nuisance confidence.
-     */
-    public final @NuisanceConfidence int getNuisanceConfidence() {
-        return mNuisanceConfidence;
-    }
-
-    /**
-     * The package name of the {@link CallScreeningService} which provided the
-     * {@link CallIdentification}.
-     * <p>
-     * A {@link CallScreeningService} may not set this property; it is set by the system.
-     * @return the package name
-     */
-    public final @NonNull String getCallScreeningPackageName() {
-        return mCallScreeningPackageName;
-    }
-
-    /**
-     * The {@link android.content.pm.PackageManager#getApplicationLabel(ApplicationInfo) name} of
-     * the {@link CallScreeningService} which provided the {@link CallIdentification}.
-     * <p>
-     * A {@link CallScreeningService} may not set this property; it is set by the system.
-     *
-     * @return The name of the app.
-     */
-    public final @NonNull CharSequence getCallScreeningAppName() {
-        return mCallScreeningAppName;
-    }
-
-    /**
-     * Set the package name of the {@link CallScreeningService} which provided this information.
-     *
-     * @param callScreeningPackageName The package name.
-     * @hide
-     */
-    public void setCallScreeningPackageName(@NonNull String callScreeningPackageName) {
-        mCallScreeningPackageName = callScreeningPackageName;
-    }
-
-    /**
-     * Set the app name of the {@link CallScreeningService} which provided this information.
-     *
-     * @param callScreeningAppName The app name.
-     * @hide
-     */
-    public void setCallScreeningAppName(@NonNull CharSequence callScreeningAppName) {
-        mCallScreeningAppName = callScreeningAppName;
-    }
-
-    @Override
-    public boolean equals(Object o) {
-        if (this == o) return true;
-        if (o == null || getClass() != o.getClass()) return false;
-        CallIdentification that = (CallIdentification) o;
-        // Note: mPhoto purposely omit as no good comparison exists.
-        return mNuisanceConfidence == that.mNuisanceConfidence
-                && Objects.equals(mName, that.mName)
-                && Objects.equals(mDescription, that.mDescription)
-                && Objects.equals(mDetails, that.mDetails)
-                && Objects.equals(mCallScreeningAppName, that.mCallScreeningAppName)
-                && Objects.equals(mCallScreeningPackageName, that.mCallScreeningPackageName);
-    }
-
-    @Override
-    public int hashCode() {
-        return Objects.hash(mName, mDescription, mDetails, mPhoto, mNuisanceConfidence,
-                mCallScreeningAppName, mCallScreeningPackageName);
-    }
-
-    @Override
-    public String toString() {
-        StringBuilder sb = new StringBuilder();
-        sb.append("[CallId mName=");
-        sb.append(Log.pii(mName));
-        sb.append(", mDesc=");
-        sb.append(mDescription);
-        sb.append(", mDet=");
-        sb.append(mDetails);
-        sb.append(", conf=");
-        sb.append(mNuisanceConfidence);
-        sb.append(", appName=");
-        sb.append(mCallScreeningAppName);
-        sb.append(", pkgName=");
-        sb.append(mCallScreeningPackageName);
-        return sb.toString();
-    }
-}
diff --git a/telecomm/java/android/telecom/CallScreeningService.java b/telecomm/java/android/telecom/CallScreeningService.java
index b1aece7..0e0406d 100644
--- a/telecomm/java/android/telecom/CallScreeningService.java
+++ b/telecomm/java/android/telecom/CallScreeningService.java
@@ -39,8 +39,8 @@
 /**
  * This service can be implemented by the default dialer (see
  * {@link TelecomManager#getDefaultDialerPackage()}) or a third party app to allow or disallow
- * incoming calls before they are shown to a user.  This service can also provide
- * {@link CallIdentification} information for calls.
+ * incoming calls before they are shown to a user. A {@link CallScreeningService} can also see
+ * outgoing calls for the purpose of providing caller ID services for those calls.
  * <p>
  * Below is an example manifest registration for a {@code CallScreeningService}.
  * <pre>
@@ -58,9 +58,9 @@
  * <ol>
  *     <li>Call blocking/screening - the service can choose which calls will ring on the user's
  *     device, and which will be silently sent to voicemail.</li>
- *     <li>Call identification - the service can optionally provide {@link CallIdentification}
- *     information about a {@link Call.Details call} which will be shown to the user in the
- *     Dialer app.</li>
+ *     <li>Call identification - services which provide call identification functionality can
+ *     display a user-interface of their choosing which contains identifying information for a call.
+ *     </li>
  * </ol>
  * <p>
  * <h2>Becoming the {@link CallScreeningService}</h2>
@@ -92,128 +92,6 @@
  * </pre>
  */
 public abstract class CallScreeningService extends Service {
-
-    /** @hide */
-    @Retention(RetentionPolicy.SOURCE)
-    @IntDef(
-            prefix = { "CALL_DURATION_" },
-            value = {CALL_DURATION_VERY_SHORT, CALL_DURATION_SHORT, CALL_DURATION_MEDIUM,
-                    CALL_DURATION_LONG})
-    public @interface CallDuration {}
-
-    /**
-     * Call duration reported with {@link #EXTRA_CALL_DURATION} to indicate to the
-     * {@link CallScreeningService} the duration of a call for which the user reported the nuisance
-     * status (see {@link TelecomManager#reportNuisanceCallStatus(Uri, boolean)}).  The
-     * {@link CallScreeningService} can use this as a signal for training nuisance detection
-     * algorithms.  The call duration is reported in coarse grained buckets to minimize exposure of
-     * identifying call log information to the {@link CallScreeningService}.
-     * <p>
-     * Indicates the call was < 3 seconds in duration.
-     */
-    public static final int CALL_DURATION_VERY_SHORT = 1;
-
-    /**
-     * Call duration reported with {@link #EXTRA_CALL_DURATION} to indicate to the
-     * {@link CallScreeningService} the duration of a call for which the user reported the nuisance
-     * status (see {@link TelecomManager#reportNuisanceCallStatus(Uri, boolean)}).  The
-     * {@link CallScreeningService} can use this as a signal for training nuisance detection
-     * algorithms.  The call duration is reported in coarse grained buckets to minimize exposure of
-     * identifying call log information to the {@link CallScreeningService}.
-     * <p>
-     * Indicates the call was greater than 3 seconds, but less than 60 seconds in duration.
-     */
-    public static final int CALL_DURATION_SHORT = 2;
-
-    /**
-     * Call duration reported with {@link #EXTRA_CALL_DURATION} to indicate to the
-     * {@link CallScreeningService} the duration of a call for which the user reported the nuisance
-     * status (see {@link TelecomManager#reportNuisanceCallStatus(Uri, boolean)}).  The
-     * {@link CallScreeningService} can use this as a signal for training nuisance detection
-     * algorithms.  The call duration is reported in coarse grained buckets to minimize exposure of
-     * identifying call log information to the {@link CallScreeningService}.
-     * <p>
-     * Indicates the call was greater than 60 seconds, but less than 120 seconds in duration.
-     */
-    public static final int CALL_DURATION_MEDIUM = 3;
-
-    /**
-     * Call duration reported with {@link #EXTRA_CALL_DURATION} to indicate to the
-     * {@link CallScreeningService} the duration of a call for which the user reported the nuisance
-     * status (see {@link TelecomManager#reportNuisanceCallStatus(Uri, boolean)}).  The
-     * {@link CallScreeningService} can use this as a signal for training nuisance detection
-     * algorithms.  The call duration is reported in coarse grained buckets to minimize exposure of
-     * identifying call log information to the {@link CallScreeningService}.
-     * <p>
-     * Indicates the call was greater than 120 seconds.
-     */
-    public static final int CALL_DURATION_LONG = 4;
-
-    /**
-     * Telecom sends this intent to the {@link CallScreeningService} which the user has chosen to
-     * fill the call screening role when the user indicates through the default dialer whether a
-     * call is a nuisance call or not (see
-     * {@link TelecomManager#reportNuisanceCallStatus(Uri, boolean)}).
-     * <p>
-     * The following extra values are provided for the call:
-     * <ol>
-     *     <li>{@link #EXTRA_CALL_HANDLE} - the handle of the call.</li>
-     *     <li>{@link #EXTRA_IS_NUISANCE} - {@code true} if the user reported the call as a nuisance
-     *     call, {@code false} otherwise.</li>
-     *     <li>{@link #EXTRA_CALL_TYPE} - reports the type of call (incoming, rejected, missed,
-     *     blocked).</li>
-     *     <li>{@link #EXTRA_CALL_DURATION} - the duration of the call (see
-     *     {@link #EXTRA_CALL_DURATION} for valid values).</li>
-     * </ol>
-     * <p>
-     * {@link CallScreeningService} implementations which want to track whether the user reports
-     * calls are nuisance calls should use declare a broadcast receiver in their manifest for this
-     * intent.
-     * <p>
-     * Note: Only {@link CallScreeningService} implementations which have provided
-     * {@link CallIdentification} information for calls at some point will receive this intent.
-     */
-    public static final String ACTION_NUISANCE_CALL_STATUS_CHANGED =
-            "android.telecom.action.NUISANCE_CALL_STATUS_CHANGED";
-
-    /**
-     * Extra used to provide the handle of the call for
-     * {@link #ACTION_NUISANCE_CALL_STATUS_CHANGED}.  The call handle is reported as a
-     * {@link Uri}.
-     */
-    public static final String EXTRA_CALL_HANDLE = "android.telecom.extra.CALL_HANDLE";
-
-    /**
-     * Boolean extra used to indicate whether the user reported a call as a nuisance call.
-     * When {@code true}, the user reported that a call was a nuisance call, {@code false}
-     * otherwise.  Sent with {@link #ACTION_NUISANCE_CALL_STATUS_CHANGED}.
-     */
-    public static final String EXTRA_IS_NUISANCE = "android.telecom.extra.IS_NUISANCE";
-
-    /**
-     * Integer extra used with {@link #ACTION_NUISANCE_CALL_STATUS_CHANGED} to report the type of
-     * call. Valid values are:
-     * <UL>
-     *   <li>{@link android.provider.CallLog.Calls#MISSED_TYPE}</li>
-     *   <li>{@link android.provider.CallLog.Calls#INCOMING_TYPE}</li>
-     *   <li>{@link android.provider.CallLog.Calls#BLOCKED_TYPE}</li>
-     *   <li>{@link android.provider.CallLog.Calls#REJECTED_TYPE}</li>
-     * </UL>
-     */
-    public static final String EXTRA_CALL_TYPE = "android.telecom.extra.CALL_TYPE";
-
-    /**
-     * Integer extra used to with {@link #ACTION_NUISANCE_CALL_STATUS_CHANGED} to report how long
-     * the call lasted.  Valid values are:
-     * <UL>
-     *     <LI>{@link #CALL_DURATION_VERY_SHORT}</LI>
-     *     <LI>{@link #CALL_DURATION_SHORT}</LI>
-     *     <LI>{@link #CALL_DURATION_MEDIUM}</LI>
-     *     <LI>{@link #CALL_DURATION_LONG}</LI>
-     * </UL>
-     */
-    public static final String EXTRA_CALL_DURATION = "android.telecom.extra.CALL_DURATION";
-
     /**
      * The {@link Intent} that must be declared as handled by the service.
      */
@@ -413,10 +291,6 @@
      * Your app can tell if a call is an incoming call by checking to see if
      * {@link Call.Details#getCallDirection()} is {@link Call.Details#DIRECTION_INCOMING}.
      * <p>
-     * For incoming or outgoing calls, the {@link CallScreeningService} can call
-     * {@link #provideCallIdentification(Call.Details, CallIdentification)} in order to provide
-     * {@link CallIdentification} for the call.
-     * <p>
      * Note: The {@link Call.Details} instance provided to a call screening service will only have
      * the following properties set.  The rest of the {@link Call.Details} properties will be set to
      * their default value or {@code null}.
@@ -472,32 +346,4 @@
         } catch (RemoteException e) {
         }
     }
-
-    /**
-     * Provide {@link CallIdentification} information about a {@link Call.Details call}.
-     * <p>
-     * The {@link CallScreeningService} calls this method to provide information it has identified
-     * about a {@link Call.Details call}.  This information will potentially be shown to the user
-     * in the {@link InCallService dialer} app.  It will be logged to the
-     * {@link android.provider.CallLog}.
-     * <p>
-     * A {@link CallScreeningService} should only call this method for calls for which it is able to
-     * provide some {@link CallIdentification} for.  {@link CallIdentification} instances with no
-     * fields set will be ignored by the system.
-     *
-     * @param callDetails The call to provide information for.
-     *                    <p>
-     *                    Must be the same {@link Call.Details call} which was provided to the
-     *                    {@link CallScreeningService} via {@link #onScreenCall(Call.Details)}.
-     * @param identification An instance of {@link CallIdentification} with information about the
-     *                       {@link Call.Details call}.
-     */
-    public final void provideCallIdentification(@NonNull Call.Details callDetails,
-            @NonNull CallIdentification identification) {
-        try {
-            mCallScreeningAdapter.provideCallIdentification(callDetails.getTelecomCallId(),
-                    identification);
-        } catch (RemoteException e) {
-        }
-    }
 }
diff --git a/telecomm/java/android/telecom/ParcelableCall.java b/telecomm/java/android/telecom/ParcelableCall.java
index 345707e..aa50991 100644
--- a/telecomm/java/android/telecom/ParcelableCall.java
+++ b/telecomm/java/android/telecom/ParcelableCall.java
@@ -64,7 +64,6 @@
     private final Bundle mIntentExtras;
     private final Bundle mExtras;
     private final long mCreationTimeMillis;
-    private final CallIdentification mCallIdentification;
     private final int mCallDirection;
 
     public ParcelableCall(
@@ -94,7 +93,6 @@
             Bundle intentExtras,
             Bundle extras,
             long creationTimeMillis,
-            CallIdentification callIdentification,
             int callDirection) {
         mId = id;
         mState = state;
@@ -122,7 +120,6 @@
         mIntentExtras = intentExtras;
         mExtras = extras;
         mCreationTimeMillis = creationTimeMillis;
-        mCallIdentification = callIdentification;
         mCallDirection = callDirection;
     }
 
@@ -314,15 +311,6 @@
     }
 
     /**
-     * Contains call identification information returned by a {@link CallScreeningService}.
-     * @return The {@link CallIdentification} for this call, or {@code null} if a
-     * {@link CallScreeningService} did not provide information.
-     */
-    public @Nullable CallIdentification getCallIdentification() {
-        return mCallIdentification;
-    }
-
-    /**
      * Indicates whether the call is an incoming or outgoing call.
      */
     public @CallDirection int getCallDirection() {
@@ -366,7 +354,6 @@
             boolean isRttCallChanged = source.readByte() == 1;
             ParcelableRttCall rttCall = source.readParcelable(classLoader);
             long creationTimeMillis = source.readLong();
-            CallIdentification callIdentification = source.readParcelable(classLoader);
             int callDirection = source.readInt();
             return new ParcelableCall(
                     id,
@@ -395,7 +382,6 @@
                     intentExtras,
                     extras,
                     creationTimeMillis,
-                    callIdentification,
                     callDirection);
         }
 
@@ -441,7 +427,6 @@
         destination.writeByte((byte) (mIsRttCallChanged ? 1 : 0));
         destination.writeParcelable(mRttCall, 0);
         destination.writeLong(mCreationTimeMillis);
-        destination.writeParcelable(mCallIdentification, 0);
         destination.writeInt(mCallDirection);
     }
 
diff --git a/telecomm/java/android/telecom/TelecomManager.java b/telecomm/java/android/telecom/TelecomManager.java
index 3d0a3c5..391d788 100644
--- a/telecomm/java/android/telecom/TelecomManager.java
+++ b/telecomm/java/android/telecom/TelecomManager.java
@@ -2002,33 +2002,6 @@
     }
 
     /**
-     * Called by the default dialer to report to Telecom when the user has marked a previous
-     * incoming call as a nuisance call or not.
-     * <p>
-     * Where the user has chosen a {@link CallScreeningService} to fill the call screening role,
-     * Telecom will notify that {@link CallScreeningService} of the user's report.
-     * <p>
-     * Requires that the caller is the default dialer app.
-     *
-     * @param handle The phone number of an incoming call which the user is reporting as either a
-     *               nuisance of non-nuisance call.
-     * @param isNuisanceCall {@code true} if the user is reporting the call as a nuisance call,
-     *                       {@code false} if the user is reporting the call as a non-nuisance call.
-     */
-    @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
-    public void reportNuisanceCallStatus(@NonNull Uri handle, boolean isNuisanceCall) {
-        ITelecomService service = getTelecomService();
-        if (service != null) {
-            try {
-                service.reportNuisanceCallStatus(handle, isNuisanceCall,
-                        mContext.getOpPackageName());
-            } catch (RemoteException e) {
-                Log.e(TAG, "Error calling ITelecomService#showCallScreen", e);
-            }
-        }
-    }
-
-    /**
      * Handles {@link Intent#ACTION_CALL} intents trampolined from UserCallActivity.
      * @param intent The {@link Intent#ACTION_CALL} intent to handle.
      * @hide
diff --git a/telecomm/java/com/android/internal/telecom/ICallScreeningAdapter.aidl b/telecomm/java/com/android/internal/telecom/ICallScreeningAdapter.aidl
index 1160d27..3ee3285 100644
--- a/telecomm/java/com/android/internal/telecom/ICallScreeningAdapter.aidl
+++ b/telecomm/java/com/android/internal/telecom/ICallScreeningAdapter.aidl
@@ -17,7 +17,6 @@
 package com.android.internal.telecom;
 
 import android.content.ComponentName;
-import android.telecom.CallIdentification;
 
 /**
  * Internal remote callback interface for call screening services.
@@ -37,8 +36,4 @@
             boolean shouldAddToCallLog,
             boolean shouldShowNotification,
             in ComponentName componentName);
-
-    void provideCallIdentification(
-            String callId,
-            in CallIdentification callIdentification);
 }
diff --git a/telecomm/java/com/android/internal/telecom/ITelecomService.aidl b/telecomm/java/com/android/internal/telecom/ITelecomService.aidl
index 93eea56..a814c03 100644
--- a/telecomm/java/com/android/internal/telecom/ITelecomService.aidl
+++ b/telecomm/java/com/android/internal/telecom/ITelecomService.aidl
@@ -286,8 +286,6 @@
      */
     boolean isInEmergencyCall();
 
-    oneway void reportNuisanceCallStatus(in Uri address, boolean isNuisance, String callingPackage);
-
     /**
      * @see TelecomServiceImpl#handleCallIntent
      */