diff options
-rwxr-xr-x | api/system-current.txt | 2 | ||||
-rw-r--r-- | config/boot-image-profile.txt | 1 | ||||
-rw-r--r-- | telephony/java/android/telephony/ServiceState.java | 14 |
3 files changed, 11 insertions, 6 deletions
diff --git a/api/system-current.txt b/api/system-current.txt index 6e05db9d2d2e..d11145c491cc 100755 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -9764,6 +9764,7 @@ package android.telephony { public class ServiceState implements android.os.Parcelable { method @NonNull public android.telephony.ServiceState createLocationInfoSanitizedCopy(boolean); + method public void fillInNotifierBundle(@NonNull android.os.Bundle); method public int getDataRegistrationState(); method @Nullable public android.telephony.NetworkRegistrationInfo getNetworkRegistrationInfo(int, int); method @NonNull public java.util.List<android.telephony.NetworkRegistrationInfo> getNetworkRegistrationInfoList(); @@ -9772,6 +9773,7 @@ package android.telephony { method public int getNrFrequencyRange(); method @Nullable public String getOperatorAlphaLongRaw(); method @Nullable public String getOperatorAlphaShortRaw(); + method @NonNull public static android.telephony.ServiceState newFromBundle(@NonNull android.os.Bundle); field public static final int ROAMING_TYPE_DOMESTIC = 2; // 0x2 field public static final int ROAMING_TYPE_INTERNATIONAL = 3; // 0x3 field public static final int ROAMING_TYPE_NOT_ROAMING = 0; // 0x0 diff --git a/config/boot-image-profile.txt b/config/boot-image-profile.txt index 652669c9f54e..4d0acb3c2330 100644 --- a/config/boot-image-profile.txt +++ b/config/boot-image-profile.txt @@ -14142,7 +14142,6 @@ HSPLandroid/telephony/ServiceState;->convertNetworkTypeBitmaskToBearerBitmask(I) HSPLandroid/telephony/ServiceState;->copyFrom(Landroid/telephony/ServiceState;)V HSPLandroid/telephony/ServiceState;->describeContents()I HSPLandroid/telephony/ServiceState;->equals(Ljava/lang/Object;)Z -HSPLandroid/telephony/ServiceState;->fillInNotifierBundle(Landroid/os/Bundle;)V HSPLandroid/telephony/ServiceState;->getCdmaDefaultRoamingIndicator()I HSPLandroid/telephony/ServiceState;->getCdmaEriIconIndex()I HSPLandroid/telephony/ServiceState;->getCdmaEriIconMode()I diff --git a/telephony/java/android/telephony/ServiceState.java b/telephony/java/android/telephony/ServiceState.java index 0a6183c13950..599cd9fde985 100644 --- a/telephony/java/android/telephony/ServiceState.java +++ b/telephony/java/android/telephony/ServiceState.java @@ -379,15 +379,15 @@ public class ServiceState implements Parcelable { /** * Create a new ServiceState from a intent notifier Bundle * - * This method is used by PhoneStateIntentReceiver, CellBroadcastReceiver, and maybe by - * external applications. + * This method is used to get ServiceState object from extras upon receiving + * {@link Intent#ACTION_SERVICE_STATE}. * * @param m Bundle from intent notifier * @return newly created ServiceState * @hide */ + @SystemApi @NonNull - @UnsupportedAppUsage public static ServiceState newFromBundle(@NonNull Bundle m) { ServiceState ret; ret = new ServiceState(); @@ -1281,11 +1281,15 @@ public class ServiceState implements Parcelable { /** * Set intent notifier Bundle based on service state. * + * Put ServiceState object and its fields into bundle which is used by TelephonyRegistry + * to broadcast {@link Intent#ACTION_SERVICE_STATE}. + * * @param m intent notifier Bundle * @hide + * */ - @UnsupportedAppUsage - public void fillInNotifierBundle(Bundle m) { + @SystemApi + public void fillInNotifierBundle(@NonNull Bundle m) { m.putParcelable(Intent.EXTRA_SERVICE_STATE, this); // serviceState already consists of below entries. // for backward compatibility, we continue fill in below entries. |