Loading api/current.txt +36 −2 Original line number Diff line number Diff line Loading @@ -35184,6 +35184,12 @@ package android.provider { field public static final java.lang.String CACHED_NUMBER_TYPE = "numbertype"; field public static final java.lang.String CACHED_PHOTO_ID = "photo_id"; field public static final java.lang.String CACHED_PHOTO_URI = "photo_uri"; field public static final java.lang.String CALL_ID_APP_NAME = "call_id_app_name"; field public static final java.lang.String CALL_ID_DESCRIPTION = "call_id_description"; field public static final java.lang.String CALL_ID_DETAILS = "call_id_details"; field public static final java.lang.String CALL_ID_NAME = "call_id_name"; field public static final java.lang.String CALL_ID_NUISANCE_CONFIDENCE = "call_id_nuisance_confidence"; field public static final java.lang.String CALL_ID_PACKAGE_NAME = "call_id_package_name"; field public static final java.lang.String CALL_SCREENING_APP_NAME = "call_screening_app_name"; field public static final java.lang.String CALL_SCREENING_COMPONENT_NAME = "call_screening_component_name"; field public static final android.net.Uri CONTENT_FILTER_URI; Loading Loading @@ -41185,6 +41191,7 @@ package android.telecom { method public static java.lang.String capabilitiesToString(int); method public android.telecom.PhoneAccountHandle getAccountHandle(); method public int getCallCapabilities(); method public android.telecom.CallIdentification getCallIdentification(); method public int getCallProperties(); method public java.lang.String getCallerDisplayName(); method public int getCallerDisplayNamePresentation(); Loading Loading @@ -41263,6 +41270,34 @@ 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 public java.lang.String getCallScreeningAppName(); method public java.lang.String getCallScreeningPackageName(); method public java.lang.String getDescription(); method public java.lang.String getDetails(); method public java.lang.String getName(); method public int getNuisanceConfidence(); method 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 class CallIdentification.Builder { ctor public CallIdentification.Builder(); method public android.telecom.CallIdentification build(); method public android.telecom.CallIdentification.Builder setDescription(java.lang.String); method public android.telecom.CallIdentification.Builder setDetails(java.lang.String); method public android.telecom.CallIdentification.Builder setName(java.lang.String); method public android.telecom.CallIdentification.Builder setNuisanceConfidence(int); method public android.telecom.CallIdentification.Builder setPhoto(android.graphics.drawable.Icon); } public abstract class CallRedirectionService extends android.app.Service { ctor public CallRedirectionService(); method public final void cancelCall(); Loading @@ -41278,6 +41313,7 @@ package android.telecom { ctor public CallScreeningService(); method public android.os.IBinder onBind(android.content.Intent); method public abstract void onScreenCall(android.telecom.Call.Details); method public final void provideCallIdentification(android.telecom.Call.Details, android.telecom.CallIdentification); method public final void respondToCall(android.telecom.Call.Details, android.telecom.CallScreeningService.CallResponse); field public static final java.lang.String SERVICE_INTERFACE = "android.telecom.CallScreeningService"; } Loading Loading @@ -41875,7 +41911,6 @@ package android.telecom { method public java.lang.String getVoiceMailNumber(android.telecom.PhoneAccountHandle); method public boolean handleMmi(java.lang.String); method public boolean handleMmi(java.lang.String, android.telecom.PhoneAccountHandle); method public boolean isDefaultCallScreeningApp(android.content.ComponentName); method public boolean isInCall(); method public boolean isInManagedCall(); method public boolean isIncomingCallPermitted(android.telecom.PhoneAccountHandle); Loading @@ -41884,7 +41919,6 @@ package android.telecom { method public boolean isVoiceMailNumber(android.telecom.PhoneAccountHandle, java.lang.String); method public void placeCall(android.net.Uri, android.os.Bundle); method public void registerPhoneAccount(android.telecom.PhoneAccount); method public void requestChangeDefaultCallScreeningApp(android.content.ComponentName); method public void showInCallScreen(boolean); method public void silenceRinger(); method public void unregisterPhoneAccount(android.telecom.PhoneAccountHandle); api/system-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -5052,7 +5052,7 @@ package android.telecom { method public java.util.List<android.telecom.PhoneAccountHandle> getPhoneAccountsSupportingScheme(java.lang.String); method public boolean isInEmergencyCall(); method public boolean isRinging(); method public boolean setDefaultDialer(java.lang.String); method public deprecated boolean setDefaultDialer(java.lang.String); field public static final java.lang.String EXTRA_CALL_BACK_INTENT = "android.telecom.extra.CALL_BACK_INTENT"; field public static final java.lang.String EXTRA_CLEAR_MISSED_CALLS_INTENT = "android.telecom.extra.CLEAR_MISSED_CALLS_INTENT"; field public static final java.lang.String EXTRA_CONNECTION_SERVICE = "android.telecom.extra.CONNECTION_SERVICE"; Loading core/java/android/provider/CallLog.java +100 −4 Original line number Diff line number Diff line Loading @@ -28,12 +28,14 @@ import android.database.Cursor; import android.location.Country; import android.location.CountryDetector; import android.net.Uri; import android.os.Build; import android.os.UserHandle; import android.os.UserManager; 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; Loading Loading @@ -602,6 +604,69 @@ 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. * Loading Loading @@ -631,7 +696,8 @@ 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 /* callScreeningAppName */, null /* callScreeningComponentName */, null /* callIdentification */); } Loading Loading @@ -671,7 +737,8 @@ public class CallLog { features, accountHandle, start, duration, dataUsage, addForAllUsers, userToBeInsertedTo, false /* isRead */ , Calls.BLOCK_REASON_NOT_BLOCKED /* callBlockReason */, null /* callScreeningAppName */, null /* callScreeningComponentName */); null /* callScreeningComponentName */, null /* callIdentification */); } /** Loading Loading @@ -705,19 +772,32 @@ public class CallLog { * @param callBlockReason The reason why the call is blocked. * @param callScreeningAppName The call screening application name which block the call. * @param callScreeningComponentName The call screening component name which block the call. * @param callIdPackageName The package name of the * {@link android.telecom.CallScreeningService} which provided * {@link CallIdentification}. * @param callIdAppName The app name of the {@link android.telecom.CallScreeningService} * which provided {@link CallIdentification}. * @param callIdName The caller name provided by the * {@link android.telecom.CallScreeningService}. * @param callIdDescription The caller description provided by the * {@link android.telecom.CallScreeningService}. * @param callIdDetails The caller details provided by the * {@link android.telecom.CallScreeningService}. * @param callIdCallType The caller type provided by the * {@link android.telecom.CallScreeningService}. * * @result The URI of the call log entry belonging to the user that made or received this * call. This could be of the shadow provider. Do not return it to non-system apps, * as they don't have permissions. * {@hide} */ @UnsupportedAppUsage @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023) public static Uri addCall(CallerInfo ci, Context context, String number, String postDialDigits, String viaNumber, int presentation, int callType, int features, PhoneAccountHandle accountHandle, long start, int duration, Long dataUsage, boolean addForAllUsers, UserHandle userToBeInsertedTo, boolean isRead, int callBlockReason, String callScreeningAppName, String callScreeningComponentName) { String callScreeningComponentName, CallIdentification callIdentification) { if (VERBOSE_LOG) { Log.v(LOG_TAG, String.format("Add call: number=%s, user=%s, for all=%s", number, userToBeInsertedTo, addForAllUsers)); Loading Loading @@ -799,6 +879,22 @@ public class CallLog { values.put(CALL_SCREENING_APP_NAME, 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, callIdentification.getCallScreeningAppName()); values.put(CALL_ID_NAME, callIdentification.getName()); values.put(CALL_ID_DESCRIPTION, callIdentification.getDescription()); values.put(CALL_ID_DETAILS, 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 Loading telecomm/java/android/telecom/Call.java +33 −4 Original line number Diff line number Diff line Loading @@ -518,6 +518,7 @@ public final class Call { private final Bundle mExtras; private final Bundle mIntentExtras; private final long mCreationTimeMillis; private final CallIdentification mCallIdentification; /** * Whether the supplied capabilities supports the specified capability. Loading Loading @@ -699,6 +700,12 @@ 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. */ public String getCallerDisplayName() { Loading Loading @@ -814,6 +821,23 @@ 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; } @Override public boolean equals(Object o) { if (o instanceof Details) { Loading @@ -834,7 +858,8 @@ public final class Call { Objects.equals(mStatusHints, d.mStatusHints) && areBundlesEqual(mExtras, d.mExtras) && areBundlesEqual(mIntentExtras, d.mIntentExtras) && Objects.equals(mCreationTimeMillis, d.mCreationTimeMillis); Objects.equals(mCreationTimeMillis, d.mCreationTimeMillis) && Objects.equals(mCallIdentification, d.mCallIdentification); } return false; } Loading @@ -855,7 +880,8 @@ public final class Call { mStatusHints, mExtras, mIntentExtras, mCreationTimeMillis); mCreationTimeMillis, mCallIdentification); } /** {@hide} */ Loading @@ -875,7 +901,8 @@ public final class Call { StatusHints statusHints, Bundle extras, Bundle intentExtras, long creationTimeMillis) { long creationTimeMillis, CallIdentification callIdentification) { mTelecomCallId = telecomCallId; mHandle = handle; mHandlePresentation = handlePresentation; Loading @@ -892,6 +919,7 @@ public final class Call { mExtras = extras; mIntentExtras = intentExtras; mCreationTimeMillis = creationTimeMillis; mCallIdentification = callIdentification; } /** {@hide} */ Loading @@ -912,7 +940,8 @@ public final class Call { parcelableCall.getStatusHints(), parcelableCall.getExtras(), parcelableCall.getIntentExtras(), parcelableCall.getCreationTimeMillis()); parcelableCall.getCreationTimeMillis(), parcelableCall.getCallIdentification()); } @Override Loading telecomm/java/android/telecom/CallIdentification.aidl 0 → 100644 +22 −0 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; Loading
api/current.txt +36 −2 Original line number Diff line number Diff line Loading @@ -35184,6 +35184,12 @@ package android.provider { field public static final java.lang.String CACHED_NUMBER_TYPE = "numbertype"; field public static final java.lang.String CACHED_PHOTO_ID = "photo_id"; field public static final java.lang.String CACHED_PHOTO_URI = "photo_uri"; field public static final java.lang.String CALL_ID_APP_NAME = "call_id_app_name"; field public static final java.lang.String CALL_ID_DESCRIPTION = "call_id_description"; field public static final java.lang.String CALL_ID_DETAILS = "call_id_details"; field public static final java.lang.String CALL_ID_NAME = "call_id_name"; field public static final java.lang.String CALL_ID_NUISANCE_CONFIDENCE = "call_id_nuisance_confidence"; field public static final java.lang.String CALL_ID_PACKAGE_NAME = "call_id_package_name"; field public static final java.lang.String CALL_SCREENING_APP_NAME = "call_screening_app_name"; field public static final java.lang.String CALL_SCREENING_COMPONENT_NAME = "call_screening_component_name"; field public static final android.net.Uri CONTENT_FILTER_URI; Loading Loading @@ -41185,6 +41191,7 @@ package android.telecom { method public static java.lang.String capabilitiesToString(int); method public android.telecom.PhoneAccountHandle getAccountHandle(); method public int getCallCapabilities(); method public android.telecom.CallIdentification getCallIdentification(); method public int getCallProperties(); method public java.lang.String getCallerDisplayName(); method public int getCallerDisplayNamePresentation(); Loading Loading @@ -41263,6 +41270,34 @@ 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 public java.lang.String getCallScreeningAppName(); method public java.lang.String getCallScreeningPackageName(); method public java.lang.String getDescription(); method public java.lang.String getDetails(); method public java.lang.String getName(); method public int getNuisanceConfidence(); method 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 class CallIdentification.Builder { ctor public CallIdentification.Builder(); method public android.telecom.CallIdentification build(); method public android.telecom.CallIdentification.Builder setDescription(java.lang.String); method public android.telecom.CallIdentification.Builder setDetails(java.lang.String); method public android.telecom.CallIdentification.Builder setName(java.lang.String); method public android.telecom.CallIdentification.Builder setNuisanceConfidence(int); method public android.telecom.CallIdentification.Builder setPhoto(android.graphics.drawable.Icon); } public abstract class CallRedirectionService extends android.app.Service { ctor public CallRedirectionService(); method public final void cancelCall(); Loading @@ -41278,6 +41313,7 @@ package android.telecom { ctor public CallScreeningService(); method public android.os.IBinder onBind(android.content.Intent); method public abstract void onScreenCall(android.telecom.Call.Details); method public final void provideCallIdentification(android.telecom.Call.Details, android.telecom.CallIdentification); method public final void respondToCall(android.telecom.Call.Details, android.telecom.CallScreeningService.CallResponse); field public static final java.lang.String SERVICE_INTERFACE = "android.telecom.CallScreeningService"; } Loading Loading @@ -41875,7 +41911,6 @@ package android.telecom { method public java.lang.String getVoiceMailNumber(android.telecom.PhoneAccountHandle); method public boolean handleMmi(java.lang.String); method public boolean handleMmi(java.lang.String, android.telecom.PhoneAccountHandle); method public boolean isDefaultCallScreeningApp(android.content.ComponentName); method public boolean isInCall(); method public boolean isInManagedCall(); method public boolean isIncomingCallPermitted(android.telecom.PhoneAccountHandle); Loading @@ -41884,7 +41919,6 @@ package android.telecom { method public boolean isVoiceMailNumber(android.telecom.PhoneAccountHandle, java.lang.String); method public void placeCall(android.net.Uri, android.os.Bundle); method public void registerPhoneAccount(android.telecom.PhoneAccount); method public void requestChangeDefaultCallScreeningApp(android.content.ComponentName); method public void showInCallScreen(boolean); method public void silenceRinger(); method public void unregisterPhoneAccount(android.telecom.PhoneAccountHandle);
api/system-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -5052,7 +5052,7 @@ package android.telecom { method public java.util.List<android.telecom.PhoneAccountHandle> getPhoneAccountsSupportingScheme(java.lang.String); method public boolean isInEmergencyCall(); method public boolean isRinging(); method public boolean setDefaultDialer(java.lang.String); method public deprecated boolean setDefaultDialer(java.lang.String); field public static final java.lang.String EXTRA_CALL_BACK_INTENT = "android.telecom.extra.CALL_BACK_INTENT"; field public static final java.lang.String EXTRA_CLEAR_MISSED_CALLS_INTENT = "android.telecom.extra.CLEAR_MISSED_CALLS_INTENT"; field public static final java.lang.String EXTRA_CONNECTION_SERVICE = "android.telecom.extra.CONNECTION_SERVICE"; Loading
core/java/android/provider/CallLog.java +100 −4 Original line number Diff line number Diff line Loading @@ -28,12 +28,14 @@ import android.database.Cursor; import android.location.Country; import android.location.CountryDetector; import android.net.Uri; import android.os.Build; import android.os.UserHandle; import android.os.UserManager; 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; Loading Loading @@ -602,6 +604,69 @@ 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. * Loading Loading @@ -631,7 +696,8 @@ 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 /* callScreeningAppName */, null /* callScreeningComponentName */, null /* callIdentification */); } Loading Loading @@ -671,7 +737,8 @@ public class CallLog { features, accountHandle, start, duration, dataUsage, addForAllUsers, userToBeInsertedTo, false /* isRead */ , Calls.BLOCK_REASON_NOT_BLOCKED /* callBlockReason */, null /* callScreeningAppName */, null /* callScreeningComponentName */); null /* callScreeningComponentName */, null /* callIdentification */); } /** Loading Loading @@ -705,19 +772,32 @@ public class CallLog { * @param callBlockReason The reason why the call is blocked. * @param callScreeningAppName The call screening application name which block the call. * @param callScreeningComponentName The call screening component name which block the call. * @param callIdPackageName The package name of the * {@link android.telecom.CallScreeningService} which provided * {@link CallIdentification}. * @param callIdAppName The app name of the {@link android.telecom.CallScreeningService} * which provided {@link CallIdentification}. * @param callIdName The caller name provided by the * {@link android.telecom.CallScreeningService}. * @param callIdDescription The caller description provided by the * {@link android.telecom.CallScreeningService}. * @param callIdDetails The caller details provided by the * {@link android.telecom.CallScreeningService}. * @param callIdCallType The caller type provided by the * {@link android.telecom.CallScreeningService}. * * @result The URI of the call log entry belonging to the user that made or received this * call. This could be of the shadow provider. Do not return it to non-system apps, * as they don't have permissions. * {@hide} */ @UnsupportedAppUsage @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023) public static Uri addCall(CallerInfo ci, Context context, String number, String postDialDigits, String viaNumber, int presentation, int callType, int features, PhoneAccountHandle accountHandle, long start, int duration, Long dataUsage, boolean addForAllUsers, UserHandle userToBeInsertedTo, boolean isRead, int callBlockReason, String callScreeningAppName, String callScreeningComponentName) { String callScreeningComponentName, CallIdentification callIdentification) { if (VERBOSE_LOG) { Log.v(LOG_TAG, String.format("Add call: number=%s, user=%s, for all=%s", number, userToBeInsertedTo, addForAllUsers)); Loading Loading @@ -799,6 +879,22 @@ public class CallLog { values.put(CALL_SCREENING_APP_NAME, 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, callIdentification.getCallScreeningAppName()); values.put(CALL_ID_NAME, callIdentification.getName()); values.put(CALL_ID_DESCRIPTION, callIdentification.getDescription()); values.put(CALL_ID_DETAILS, 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 Loading
telecomm/java/android/telecom/Call.java +33 −4 Original line number Diff line number Diff line Loading @@ -518,6 +518,7 @@ public final class Call { private final Bundle mExtras; private final Bundle mIntentExtras; private final long mCreationTimeMillis; private final CallIdentification mCallIdentification; /** * Whether the supplied capabilities supports the specified capability. Loading Loading @@ -699,6 +700,12 @@ 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. */ public String getCallerDisplayName() { Loading Loading @@ -814,6 +821,23 @@ 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; } @Override public boolean equals(Object o) { if (o instanceof Details) { Loading @@ -834,7 +858,8 @@ public final class Call { Objects.equals(mStatusHints, d.mStatusHints) && areBundlesEqual(mExtras, d.mExtras) && areBundlesEqual(mIntentExtras, d.mIntentExtras) && Objects.equals(mCreationTimeMillis, d.mCreationTimeMillis); Objects.equals(mCreationTimeMillis, d.mCreationTimeMillis) && Objects.equals(mCallIdentification, d.mCallIdentification); } return false; } Loading @@ -855,7 +880,8 @@ public final class Call { mStatusHints, mExtras, mIntentExtras, mCreationTimeMillis); mCreationTimeMillis, mCallIdentification); } /** {@hide} */ Loading @@ -875,7 +901,8 @@ public final class Call { StatusHints statusHints, Bundle extras, Bundle intentExtras, long creationTimeMillis) { long creationTimeMillis, CallIdentification callIdentification) { mTelecomCallId = telecomCallId; mHandle = handle; mHandlePresentation = handlePresentation; Loading @@ -892,6 +919,7 @@ public final class Call { mExtras = extras; mIntentExtras = intentExtras; mCreationTimeMillis = creationTimeMillis; mCallIdentification = callIdentification; } /** {@hide} */ Loading @@ -912,7 +940,8 @@ public final class Call { parcelableCall.getStatusHints(), parcelableCall.getExtras(), parcelableCall.getIntentExtras(), parcelableCall.getCreationTimeMillis()); parcelableCall.getCreationTimeMillis(), parcelableCall.getCallIdentification()); } @Override Loading
telecomm/java/android/telecom/CallIdentification.aidl 0 → 100644 +22 −0 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;