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

Commit 50665529 authored by Jack Yu's avatar Jack Yu Committed by Gerrit Code Review
Browse files

Merge "Renamed DisplayInfo to TelephonyDisplayInfo"

parents bda2aaa2 ecfb37b8
Loading
Loading
Loading
Loading
+14 −14
Original line number Original line Diff line number Diff line
@@ -45247,19 +45247,6 @@ package android.telephony {
    field @NonNull public static final android.os.Parcelable.Creator<android.telephony.ClosedSubscriberGroupInfo> CREATOR;
    field @NonNull public static final android.os.Parcelable.Creator<android.telephony.ClosedSubscriberGroupInfo> CREATOR;
  }
  }
  public final class DisplayInfo implements android.os.Parcelable {
    method public int describeContents();
    method public int getNetworkType();
    method public int getOverrideNetworkType();
    method public void writeToParcel(@NonNull android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.telephony.DisplayInfo> CREATOR;
    field public static final int OVERRIDE_NETWORK_TYPE_LTE_ADVANCED_PRO = 2; // 0x2
    field public static final int OVERRIDE_NETWORK_TYPE_LTE_CA = 1; // 0x1
    field public static final int OVERRIDE_NETWORK_TYPE_NONE = 0; // 0x0
    field public static final int OVERRIDE_NETWORK_TYPE_NR_NSA = 3; // 0x3
    field public static final int OVERRIDE_NETWORK_TYPE_NR_NSA_MMWAVE = 4; // 0x4
  }
  public class IccOpenLogicalChannelResponse implements android.os.Parcelable {
  public class IccOpenLogicalChannelResponse implements android.os.Parcelable {
    method public int describeContents();
    method public int describeContents();
    method public int getChannel();
    method public int getChannel();
@@ -45486,7 +45473,7 @@ package android.telephony {
    method public void onDataActivity(int);
    method public void onDataActivity(int);
    method public void onDataConnectionStateChanged(int);
    method public void onDataConnectionStateChanged(int);
    method public void onDataConnectionStateChanged(int, int);
    method public void onDataConnectionStateChanged(int, int);
    method @RequiresPermission("android.permission.READ_PHONE_STATE") public void onDisplayInfoChanged(@NonNull android.telephony.DisplayInfo);
    method @RequiresPermission("android.permission.READ_PHONE_STATE") public void onDisplayInfoChanged(@NonNull android.telephony.TelephonyDisplayInfo);
    method @RequiresPermission("android.permission.READ_PRECISE_PHONE_STATE") public void onImsCallDisconnectCauseChanged(@NonNull android.telephony.ims.ImsReasonInfo);
    method @RequiresPermission("android.permission.READ_PRECISE_PHONE_STATE") public void onImsCallDisconnectCauseChanged(@NonNull android.telephony.ims.ImsReasonInfo);
    method public void onMessageWaitingIndicatorChanged(boolean);
    method public void onMessageWaitingIndicatorChanged(boolean);
    method @RequiresPermission("android.permission.MODIFY_PHONE_STATE") public void onPreciseDataConnectionStateChanged(@NonNull android.telephony.PreciseDataConnectionState);
    method @RequiresPermission("android.permission.MODIFY_PHONE_STATE") public void onPreciseDataConnectionStateChanged(@NonNull android.telephony.PreciseDataConnectionState);
@@ -45902,6 +45889,19 @@ package android.telephony {
    method public android.telephony.SubscriptionPlan.Builder setTitle(@Nullable CharSequence);
    method public android.telephony.SubscriptionPlan.Builder setTitle(@Nullable CharSequence);
  }
  }
  public final class TelephonyDisplayInfo implements android.os.Parcelable {
    method public int describeContents();
    method public int getNetworkType();
    method public int getOverrideNetworkType();
    method public void writeToParcel(@NonNull android.os.Parcel, int);
    field @NonNull public static final android.os.Parcelable.Creator<android.telephony.TelephonyDisplayInfo> CREATOR;
    field public static final int OVERRIDE_NETWORK_TYPE_LTE_ADVANCED_PRO = 2; // 0x2
    field public static final int OVERRIDE_NETWORK_TYPE_LTE_CA = 1; // 0x1
    field public static final int OVERRIDE_NETWORK_TYPE_NONE = 0; // 0x0
    field public static final int OVERRIDE_NETWORK_TYPE_NR_NSA = 3; // 0x3
    field public static final int OVERRIDE_NETWORK_TYPE_NR_NSA_MMWAVE = 4; // 0x4
  }
  public class TelephonyManager {
  public class TelephonyManager {
    method public boolean canChangeDtmfToneLength();
    method public boolean canChangeDtmfToneLength();
    method @Nullable public android.telephony.TelephonyManager createForPhoneAccountHandle(android.telecom.PhoneAccountHandle);
    method @Nullable public android.telephony.TelephonyManager createForPhoneAccountHandle(android.telecom.PhoneAccountHandle);
+5 −5
Original line number Original line Diff line number Diff line
@@ -893,16 +893,16 @@ public class PhoneStateListener {


    /**
    /**
     * Callback invoked when the display info has changed on the registered subscription.
     * Callback invoked when the display info has changed on the registered subscription.
     * <p> The {@link DisplayInfo} contains status information shown to the user based on
     * <p> The {@link TelephonyDisplayInfo} contains status information shown to the user based on
     * carrier policy.
     * carrier policy.
     *
     *
     * Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE} or that the calling
     * Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE} or that the calling
     * app has carrier privileges (see {@link TelephonyManager#hasCarrierPrivileges}).
     * app has carrier privileges (see {@link TelephonyManager#hasCarrierPrivileges}).
     *
     *
     * @param displayInfo The display information.
     * @param telephonyDisplayInfo The display information.
     */
     */
    @RequiresPermission((android.Manifest.permission.READ_PHONE_STATE))
    @RequiresPermission((android.Manifest.permission.READ_PHONE_STATE))
    public void onDisplayInfoChanged(@NonNull DisplayInfo displayInfo) {
    public void onDisplayInfoChanged(@NonNull TelephonyDisplayInfo telephonyDisplayInfo) {
        // default implementation empty
        // default implementation empty
    }
    }


@@ -1285,13 +1285,13 @@ public class PhoneStateListener {
                            () -> psl.onUserMobileDataStateChanged(enabled)));
                            () -> psl.onUserMobileDataStateChanged(enabled)));
        }
        }


        public void onDisplayInfoChanged(DisplayInfo displayInfo) {
        public void onDisplayInfoChanged(TelephonyDisplayInfo telephonyDisplayInfo) {
            PhoneStateListener psl = mPhoneStateListenerWeakRef.get();
            PhoneStateListener psl = mPhoneStateListenerWeakRef.get();
            if (psl == null) return;
            if (psl == null) return;


            Binder.withCleanCallingIdentity(
            Binder.withCleanCallingIdentity(
                    () -> mExecutor.execute(
                    () -> mExecutor.execute(
                            () -> psl.onDisplayInfoChanged(displayInfo)));
                            () -> psl.onDisplayInfoChanged(telephonyDisplayInfo)));
        }
        }


        public void onOemHookRawEvent(byte[] rawData) {
        public void onOemHookRawEvent(byte[] rawData) {
+3 −3
Original line number Original line Diff line number Diff line
@@ -500,12 +500,12 @@ public class TelephonyRegistryManager {
     * derived from {@code subscriptionId} except when {@code subscriptionId} is invalid, such as
     * derived from {@code subscriptionId} except when {@code subscriptionId} is invalid, such as
     * when the device is in emergency-only mode.
     * when the device is in emergency-only mode.
     * @param subscriptionId Subscription id for which display network info has changed.
     * @param subscriptionId Subscription id for which display network info has changed.
     * @param displayInfo The display info.
     * @param telephonyDisplayInfo The display info.
     */
     */
    public void notifyDisplayInfoChanged(int slotIndex, int subscriptionId,
    public void notifyDisplayInfoChanged(int slotIndex, int subscriptionId,
            @NonNull DisplayInfo displayInfo) {
                                         @NonNull TelephonyDisplayInfo telephonyDisplayInfo) {
        try {
        try {
            sRegistry.notifyDisplayInfoChanged(slotIndex, subscriptionId, displayInfo);
            sRegistry.notifyDisplayInfoChanged(slotIndex, subscriptionId, telephonyDisplayInfo);
        } catch (RemoteException ex) {
        } catch (RemoteException ex) {
            // system process is dead
            // system process is dead
        }
        }
+2 −2
Original line number Original line Diff line number Diff line
@@ -21,7 +21,7 @@ import android.telephony.CallAttributes;
import android.telephony.CellIdentity;
import android.telephony.CellIdentity;
import android.telephony.CellInfo;
import android.telephony.CellInfo;
import android.telephony.DataConnectionRealTimeInfo;
import android.telephony.DataConnectionRealTimeInfo;
import android.telephony.DisplayInfo;
import android.telephony.TelephonyDisplayInfo;
import android.telephony.PhoneCapability;
import android.telephony.PhoneCapability;
import android.telephony.PreciseCallState;
import android.telephony.PreciseCallState;
import android.telephony.PreciseDataConnectionState;
import android.telephony.PreciseDataConnectionState;
@@ -55,7 +55,7 @@ oneway interface IPhoneStateListener {
    void onOemHookRawEvent(in byte[] rawData);
    void onOemHookRawEvent(in byte[] rawData);
    void onCarrierNetworkChange(in boolean active);
    void onCarrierNetworkChange(in boolean active);
    void onUserMobileDataStateChanged(in boolean enabled);
    void onUserMobileDataStateChanged(in boolean enabled);
    void onDisplayInfoChanged(in DisplayInfo displayInfo);
    void onDisplayInfoChanged(in TelephonyDisplayInfo telephonyDisplayInfo);
    void onPhoneCapabilityChanged(in PhoneCapability capability);
    void onPhoneCapabilityChanged(in PhoneCapability capability);
    void onActiveDataSubIdChanged(in int subId);
    void onActiveDataSubIdChanged(in int subId);
    void onRadioPowerStateChanged(in int state);
    void onRadioPowerStateChanged(in int state);
+2 −2
Original line number Original line Diff line number Diff line
@@ -23,7 +23,7 @@ import android.telephony.BarringInfo;
import android.telephony.CallQuality;
import android.telephony.CallQuality;
import android.telephony.CellIdentity;
import android.telephony.CellIdentity;
import android.telephony.CellInfo;
import android.telephony.CellInfo;
import android.telephony.DisplayInfo;
import android.telephony.TelephonyDisplayInfo;
import android.telephony.ims.ImsReasonInfo;
import android.telephony.ims.ImsReasonInfo;
import android.telephony.PhoneCapability;
import android.telephony.PhoneCapability;
import android.telephony.PhysicalChannelConfig;
import android.telephony.PhysicalChannelConfig;
@@ -89,7 +89,7 @@ interface ITelephonyRegistry {
    void notifyOpportunisticSubscriptionInfoChanged();
    void notifyOpportunisticSubscriptionInfoChanged();
    void notifyCarrierNetworkChange(in boolean active);
    void notifyCarrierNetworkChange(in boolean active);
    void notifyUserMobileDataStateChangedForPhoneId(in int phoneId, in int subId, in boolean state);
    void notifyUserMobileDataStateChangedForPhoneId(in int phoneId, in int subId, in boolean state);
    void notifyDisplayInfoChanged(int slotIndex, int subId, in DisplayInfo displayInfo);
    void notifyDisplayInfoChanged(int slotIndex, int subId, in TelephonyDisplayInfo telephonyDisplayInfo);
    void notifyPhoneCapabilityChanged(in PhoneCapability capability);
    void notifyPhoneCapabilityChanged(in PhoneCapability capability);
    void notifyActiveDataSubIdChanged(int activeDataSubId);
    void notifyActiveDataSubIdChanged(int activeDataSubId);
    void notifyRadioPowerStateChanged(in int phoneId, in int subId, in int state);
    void notifyRadioPowerStateChanged(in int phoneId, in int subId, in int state);
Loading