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

Commit 278c3912 authored by Hall Liu's avatar Hall Liu Committed by Android (Google) Code Review
Browse files

Merge "Revert "Update docs for getServiceState"" into sc-dev

parents 9bb2b4cc 44b92a62
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -42479,7 +42479,7 @@ package android.telephony {
    method @Deprecated public int getPhoneCount();
    method @Deprecated public int getPhoneCount();
    method public int getPhoneType();
    method public int getPhoneType();
    method @RequiresPermission(anyOf={"android.permission.READ_PRIVILEGED_PHONE_STATE", android.Manifest.permission.READ_PHONE_STATE}) public int getPreferredOpportunisticDataSubscription();
    method @RequiresPermission(anyOf={"android.permission.READ_PRIVILEGED_PHONE_STATE", android.Manifest.permission.READ_PHONE_STATE}) public int getPreferredOpportunisticDataSubscription();
    method @Nullable @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public android.telephony.ServiceState getServiceState();
    method @Nullable @RequiresPermission(allOf={android.Manifest.permission.READ_PHONE_STATE, android.Manifest.permission.ACCESS_COARSE_LOCATION}) public android.telephony.ServiceState getServiceState();
    method @Nullable public android.telephony.SignalStrength getSignalStrength();
    method @Nullable public android.telephony.SignalStrength getSignalStrength();
    method public int getSimCarrierId();
    method public int getSimCarrierId();
    method @Nullable public CharSequence getSimCarrierIdName();
    method @Nullable public CharSequence getSimCarrierIdName();
+5 −10
Original line number Original line Diff line number Diff line
@@ -11293,21 +11293,16 @@ public class TelephonyManager {
     *
     *
     * <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
     * <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
     * or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges})
     * or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges})
     * Additionally, depending on the level of location permissions the caller holds (i.e. no
     * and {@link android.Manifest.permission#ACCESS_COARSE_LOCATION}.
     * location permissions, {@link android.Manifest.permission#ACCESS_COARSE_LOCATION}, or
     * {@link android.Manifest.permission#ACCESS_FINE_LOCATION}), location-sensitive fields will
     * be cleared from the return value.
     *
     * <p>Note also that if the caller holds any sort of location permission, a usage event for the
     * {@link android.app.AppOpsManager#OPSTR_FINE_LOCATION} or
     * {@link android.app.AppOpsManager#OPSTR_FINE_LOCATION}
     * will be logged against the caller when calling this method.
     *
     *
     * May return {@code null} when the subscription is inactive or when there was an error
     * May return {@code null} when the subscription is inactive or when there was an error
     * communicating with the phone process.
     * communicating with the phone process.
     */
     */
    @SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
    @SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
    @RequiresPermission(Manifest.permission.READ_PHONE_STATE)
    @RequiresPermission(allOf = {
            Manifest.permission.READ_PHONE_STATE,
            Manifest.permission.ACCESS_COARSE_LOCATION
    })
    public @Nullable ServiceState getServiceState() {
    public @Nullable ServiceState getServiceState() {
        return getServiceStateForSubscriber(getSubId());
        return getServiceStateForSubscriber(getSubId());
    }
    }