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

Commit eaf1d4ce authored by Ta-wei Yen's avatar Ta-wei Yen Committed by Android (Google) Code Review
Browse files

Merge "Allow google dialer code to be compiled against M and N SDKs" into ub-contactsdialer-b-dev

parents 77dad12c 59023c2f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.contacts.common;

import com.android.contacts.common.compat.CompatUtils;
import com.android.contacts.common.compat.PhoneAccountSdkCompat;
import com.android.contacts.common.util.PermissionsUtil;
import com.android.contacts.common.util.PhoneNumberHelper;
import com.android.phone.common.PhoneConstants;
@@ -151,7 +152,7 @@ public class CallUtil {

                    int videoCapabilities = VIDEO_CALLING_ENABLED;
                    if (account.hasCapabilities(
                            PhoneAccount.CAPABILITY_VIDEO_CALLING_RELIES_ON_PRESENCE)) {
                            PhoneAccountSdkCompat.CAPABILITY_VIDEO_CALLING_RELIES_ON_PRESENCE)) {
                        videoCapabilities |= VIDEO_CALLING_PRESENCE;
                    }
                    return videoCapabilities;
+1 −2
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@
package com.android.contacts.common.compat;

import android.net.Uri;
import android.os.Build;
import android.provider.ContactsContract;
import android.provider.ContactsContract.Directory;

@@ -47,7 +46,7 @@ public class DirectoryCompat {
    public static boolean isRemoteDirectory(long directoryId) {
        // TODO: Use N APIs
        if (ContactsUtils.FLAG_N_FEATURE && android.os.Build.VERSION.CODENAME.startsWith("N")) {
            return Directory.isRemoteDirectory(directoryId);
            return DirectorySdkCompat.isRemoteDirectory(directoryId);
        }
        return !(directoryId == Directory.DEFAULT || directoryId == Directory.LOCAL_INVISIBLE);
    }
+5 −3
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@ import com.android.contacts.common.CallUtil;
import com.android.contacts.common.ContactPhotoManager;
import com.android.contacts.common.R;
import com.android.contacts.common.compat.CompatUtils;
import com.android.contacts.common.compat.PhoneAccountSdkCompat;
import com.android.contacts.common.compat.telecom.TelecomManagerCompat;
import com.android.contacts.common.util.UriUtils;
import com.android.phone.common.animation.AnimUtils;
@@ -593,17 +594,18 @@ public class CallSubjectDialog extends Activity {
                (TelecomManager) getSystemService(Context.TELECOM_SERVICE);
        final PhoneAccount account = telecomManager.getPhoneAccount(mPhoneAccountHandle);

        Bundle phoneAccountExtras = account.getExtras();
        Bundle phoneAccountExtras = PhoneAccountSdkCompat.getExtras(account);
        if (phoneAccountExtras == null) {
            return;
        }

        // Get limit, if provided; otherwise default to existing value.
        mLimit = phoneAccountExtras.getInt(PhoneAccount.EXTRA_CALL_SUBJECT_MAX_LENGTH, mLimit);
        mLimit = phoneAccountExtras
                .getInt(PhoneAccountSdkCompat.EXTRA_CALL_SUBJECT_MAX_LENGTH, mLimit);

        // Get charset; default to none (e.g. count characters 1:1).
        String charsetName = phoneAccountExtras.getString(
                PhoneAccount.EXTRA_CALL_SUBJECT_CHARACTER_ENCODING);
                PhoneAccountSdkCompat.EXTRA_CALL_SUBJECT_CHARACTER_ENCODING);

        if (!TextUtils.isEmpty(charsetName)) {
            try {