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

Commit 7e902363 authored by Chen Xu's avatar Chen Xu Committed by Gerrit Code Review
Browse files

Merge "make CallerInfo as SystemAPI"

parents 4be2934e fba9ca44
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -7202,6 +7202,13 @@ package android.telephony {
    field @NonNull public static final android.os.Parcelable.Creator<android.telephony.CallQuality> CREATOR;
  }
  public class CallerInfo {
    method @Nullable public android.net.Uri getContactDisplayPhotoUri();
    method public long getContactId();
    method @Nullable public String getName();
    method @Nullable public String getPhoneNumber();
  }
  public class CarrierConfigManager {
    method @NonNull public static android.os.PersistableBundle getDefaultConfig();
    method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void overrideConfig(int, @Nullable android.os.PersistableBundle);
+1 −1
Original line number Diff line number Diff line
@@ -255,7 +255,7 @@ com.android.internal.os.SomeArgs
com.android.internal.policy.DecorView
com.android.internal.statusbar.IStatusBarService
com.android.internal.telephony.AppSmsManager
com.android.internal.telephony.CallerInfoAsyncQuery$OnQueryCompleteListener
android.telephony.CallerInfoAsyncQuery$OnQueryCompleteListener
com.android.internal.telephony.CarrierActionAgent
com.android.internal.telephony.cat.CatService
com.android.internal.telephony.cat.IconLoader
+0 −3
Original line number Diff line number Diff line
@@ -1167,9 +1167,6 @@ Lcom/android/internal/telephony/Call$State;->INCOMING:Lcom/android/internal/tele
Lcom/android/internal/telephony/Call$State;->values()[Lcom/android/internal/telephony/Call$State;
Lcom/android/internal/telephony/Call$State;->WAITING:Lcom/android/internal/telephony/Call$State;
Lcom/android/internal/telephony/Call;-><init>()V
Lcom/android/internal/telephony/CallerInfoAsyncQuery$CallerInfoAsyncQueryHandler;-><init>(Lcom/android/internal/telephony/CallerInfoAsyncQuery;Landroid/content/Context;)V
Lcom/android/internal/telephony/CallerInfoAsyncQuery$CookieWrapper;-><init>()V
Lcom/android/internal/telephony/CallerInfoAsyncQuery;->release()V
Lcom/android/internal/telephony/CallForwardInfo;-><init>()V
Lcom/android/internal/telephony/CallTracker;-><init>()V
Lcom/android/internal/telephony/cat/AppInterface$CommandType;->values()[Lcom/android/internal/telephony/cat/AppInterface$CommandType;
+1 −1
Original line number Diff line number Diff line
@@ -4695,7 +4695,7 @@ com.android.internal.telephony.CallManager$CallManagerHandler
com.android.internal.telephony.CallManager
com.android.internal.telephony.CallStateException
com.android.internal.telephony.CallTracker
com.android.internal.telephony.CallerInfoAsyncQuery$OnQueryCompleteListener
android.telephony.CallerInfoAsyncQuery$OnQueryCompleteListener
com.android.internal.telephony.CarrierActionAgent$1
com.android.internal.telephony.CarrierActionAgent
com.android.internal.telephony.CarrierAppUtils
+9 −9
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ import android.telephony.PhoneNumberUtils;
import android.text.TextUtils;
import android.util.Log;

import com.android.internal.telephony.CallerInfo;
import android.telephony.CallerInfo;
import com.android.internal.telephony.PhoneConstants;

import java.util.List;
@@ -728,10 +728,11 @@ public class CallLog {
            String accountAddress = getLogAccountAddress(context, accountHandle);

            int numberPresentation = getLogNumberPresentation(number, presentation);
            String name = (ci != null) ? ci.getName() : "";
            if (numberPresentation != PRESENTATION_ALLOWED) {
                number = "";
                if (ci != null) {
                    ci.name = "";
                    name = "";
                }
            }

@@ -760,9 +761,7 @@ public class CallLog {
            values.put(PHONE_ACCOUNT_ID, accountId);
            values.put(PHONE_ACCOUNT_ADDRESS, accountAddress);
            values.put(NEW, Integer.valueOf(1));
            if ((ci != null) && (ci.name != null)) {
                values.put(CACHED_NAME, ci.name);
            }
            values.put(CACHED_NAME, name);
            values.put(ADD_FOR_ALL_USERS, addForAllUsers ? 1 : 0);

            if (callType == MISSED_TYPE) {
@@ -773,7 +772,7 @@ public class CallLog {
            values.put(CALL_SCREENING_APP_NAME, charSequenceToString(callScreeningAppName));
            values.put(CALL_SCREENING_COMPONENT_NAME, callScreeningComponentName);

            if ((ci != null) && (ci.contactIdOrZero > 0)) {
            if ((ci != null) && (ci.getContactId() > 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
                // contacts may have the same number.
@@ -787,17 +786,18 @@ public class CallLog {
                    cursor = resolver.query(Phone.CONTENT_URI,
                            new String[] { Phone._ID },
                            Phone.CONTACT_ID + " =? AND " + Phone.NORMALIZED_NUMBER + " =?",
                            new String[] { String.valueOf(ci.contactIdOrZero),
                            new String[] { String.valueOf(ci.getContactId()),
                                    normalizedPhoneNumber},
                            null);
                } else {
                    final String phoneNumber = ci.phoneNumber != null ? ci.phoneNumber : number;
                    final String phoneNumber = ci.getPhoneNumber() != null
                        ? ci.getPhoneNumber() : number;
                    cursor = resolver.query(
                            Uri.withAppendedPath(Callable.CONTENT_FILTER_URI,
                                    Uri.encode(phoneNumber)),
                            new String[] { Phone._ID },
                            Phone.CONTACT_ID + " =?",
                            new String[] { String.valueOf(ci.contactIdOrZero) },
                            new String[] { String.valueOf(ci.getContactId()) },
                            null);
                }

Loading