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

Commit 8b5ab0fc authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge changes I5c5c4eb3,I36712447,I5b78d449 am: fd5241f1 am: 2d5bf0b8

Change-Id: I02040c779e3537d02389a7c6408761122dcad284
parents 37794825 2d5bf0b8
Loading
Loading
Loading
Loading
+0 −14
Original line number Diff line number Diff line
@@ -4117,20 +4117,6 @@ public final class Telephony {
         */
        public static final String CID = "cid";

        /**
         * Message code. <em>OBSOLETE: merged into SERIAL_NUMBER.</em>
         * <P>Type: INTEGER</P>
         * @hide
         */
        public static final String V1_MESSAGE_CODE = "message_code";

        /**
         * Message identifier. <em>OBSOLETE: renamed to SERVICE_CATEGORY.</em>
         * <P>Type: INTEGER</P>
         * @hide
         */
        public static final String V1_MESSAGE_IDENTIFIER = "message_id";

        /**
         * Service category which represents the general topic of the message.
         * <p>
+20 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package android.telephony;

import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.os.Build;
import android.text.TextUtils;

import java.util.ArrayList;
@@ -257,6 +258,15 @@ public class CbGeoUtils {
                return new Point(x - p.x, y - p.y);
            }
        }

        @Override
        public String toString() {
            String str = "Polygon: ";
            if (Build.IS_DEBUGGABLE) {
                str += mVertices;
            }
            return str;
        }
    }

    /**
@@ -284,6 +294,16 @@ public class CbGeoUtils {
        public boolean contains(LatLng p) {
            return mCenter.distance(p) <= mRadiusMeter;
        }

        @Override
        public String toString() {
            String str = "Circle: ";
            if (Build.IS_DEBUGGABLE) {
                str += mCenter + ", radius = " + mRadiusMeter;
            }

            return str;
        }
    }

    /**
+2 −1
Original line number Diff line number Diff line
@@ -534,6 +534,7 @@ public final class SmsCbMessage implements Parcelable {
                + (mEtwsWarningInfo != null ? (", " + mEtwsWarningInfo.toString()) : "")
                + (mCmasWarningInfo != null ? (", " + mCmasWarningInfo.toString()) : "")
                + ", maximumWaitingTime=" + mMaximumWaitTimeSec
                + ", received time=" + mReceivedTimeMillis
                + ", slotIndex = " + mSlotIndex
                + ", geo=" + (mGeometries != null
                ? CbGeoUtils.encodeGeometriesToString(mGeometries) : "null")
+6 −0
Original line number Diff line number Diff line
@@ -2378,6 +2378,8 @@ public class TelephonyManager {
     *
     * @return the lowercase 2 character ISO-3166 country code, or empty string if not available.
     *
     * @throws IllegalArgumentException when the slotIndex is invalid.
     *
     * {@hide}
     */
    @SystemApi
@@ -2385,6 +2387,10 @@ public class TelephonyManager {
    @NonNull
    public String getNetworkCountryIso(int slotIndex) {
        try {
            if (!SubscriptionManager.isValidSlotIndex(slotIndex)) {
                throw new IllegalArgumentException("invalid slot index " + slotIndex);
            }

            ITelephony telephony = getITelephony();
            if (telephony == null) return "";
            return telephony.getNetworkCountryIsoForPhone(slotIndex);