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

Commit d459a8da authored by Svet Ganov's avatar Svet Ganov Committed by Svetoslav Ganov
Browse files

Revert an API breaking changes

bug:150281259

Test: N/A

Exempt-From-Owner-Approval: porting upstream

Change-Id: Ie30286456af15dd7b81bceb0547ffe8bfac422d2
Merged-In: Ie30286456af15dd7b81bceb0547ffe8bfac422d2
parent 87ccbfaa
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -9766,7 +9766,7 @@ package android.service.euicc {
  public abstract class EuiccService extends android.app.Service {
    ctor public EuiccService();
    method public void dump(@NonNull java.io.PrintWriter);
    method public int encodeSmdxSubjectAndReasonCode(@NonNull String, @NonNull String);
    method public int encodeSmdxSubjectAndReasonCode(@Nullable String, @Nullable String);
    method @CallSuper public android.os.IBinder onBind(android.content.Intent);
    method public abstract int onDeleteSubscription(int, String);
    method public android.service.euicc.DownloadSubscriptionResult onDownloadSubscription(int, @NonNull android.telephony.euicc.DownloadableSubscription, boolean, boolean, @Nullable android.os.Bundle);
@@ -11059,6 +11059,7 @@ package android.telephony {
  }
  public class SmsMessage {
    method @Nullable public static android.telephony.SmsMessage createFromNativeSmsSubmitPdu(@NonNull byte[], boolean);
    method @Nullable public static android.telephony.SmsMessage.SubmitPdu getSmsPdu(int, int, @Nullable String, @NonNull String, @NonNull String, long);
    method @NonNull @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public static byte[] getSubmitPduEncodedMessage(boolean, @NonNull String, @NonNull String, int, @IntRange(from=0) int, @IntRange(from=0) int, @IntRange(from=0, to=255) int, @IntRange(from=1, to=255) int, @IntRange(from=1, to=255) int);
  }
+1 −0
Original line number Diff line number Diff line
@@ -562,6 +562,7 @@ package android.telephony {
  }

  public class SmsMessage {
    method @Nullable public static android.telephony.SmsMessage createFromNativeSmsSubmitPdu(@NonNull byte[], boolean);
    method @Nullable public static android.telephony.SmsMessage.SubmitPdu getSmsPdu(int, int, @Nullable String, @NonNull String, @NonNull String, long);
    method @NonNull @RequiresPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED) public static byte[] getSubmitPduEncodedMessage(boolean, @NonNull String, @NonNull String, int, @IntRange(from=0) int, @IntRange(from=0) int, @IntRange(from=0, to=255) int, @IntRange(from=1, to=255) int, @IntRange(from=1, to=255) int);
  }
+2 −2
Original line number Diff line number Diff line
@@ -327,8 +327,8 @@ public abstract class EuiccService extends Service {
     * @throws UnsupportedOperationException when sections has more than four layers (e.g 5.8.1.2)
     *                                       or when an number is bigger than 15
     */
    public int encodeSmdxSubjectAndReasonCode(@NonNull String subjectCode,
            @NonNull String reasonCode) {
    public int encodeSmdxSubjectAndReasonCode(@Nullable String subjectCode,
            @Nullable String reasonCode) {
        final int maxSupportedSection = 3;
        final int maxSupportedDigit = 15;
        final int bitsPerSection = 4;
+17 −0
Original line number Diff line number Diff line
@@ -338,6 +338,23 @@ public class SmsMessage {
        return wrappedMessage != null ? new SmsMessage(wrappedMessage) : null;
    }

    /**
     * Create an SmsMessage from a native SMS-Submit PDU, specified by Bluetooth Message Access
     * Profile Specification v1.4.2 5.8.
     * This is used by Bluetooth MAP profile to decode message when sending non UTF-8 SMS messages.
     *
     * @param data Message data.
     * @param isCdma Indicates weather the type of the SMS is CDMA.
     * @return An SmsMessage representing the message.
     *
     * @hide
     */
    @SystemApi
    @Nullable
    public static SmsMessage createFromNativeSmsSubmitPdu(@NonNull byte[] data, boolean isCdma) {
        return null;
    }

    /**
     * Get the TP-Layer-Length for the given SMS-SUBMIT PDU Basically, the
     * length in bytes (not hex chars) less the SMSC header