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

Commit fae7a40c authored by Chen Xu's avatar Chen Xu
Browse files

new telephony annotation class

This is a preparatory work for mainline. since Intdef is hidden, so we
have to move some annotation to a separate class and having
other module statically link to it.

Bug: 140908357
Test: Build
Change-Id: I8011015626164a7357c5889733c36f722d4abdca
(cherry picked from commit 64057db5)
Merged-in: I8011015626164a7357c5889733c36f722d4abdca
(cherry picked from commit 9be380c7eec32f3cf945f62c0e8db04187609875)
parent 665e9b53
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -24,6 +24,7 @@ import android.os.Handler;
import android.os.Message;
import android.os.Message;
import android.os.Registrant;
import android.os.Registrant;
import android.os.RegistrantList;
import android.os.RegistrantList;
import android.telephony.Annotation.RadioPowerState;
import android.telephony.TelephonyManager;
import android.telephony.TelephonyManager;


/**
/**
@@ -160,7 +161,7 @@ public abstract class BaseCommands implements CommandsInterface {
    //***** CommandsInterface implementation
    //***** CommandsInterface implementation


    @Override
    @Override
    public @TelephonyManager.RadioPowerState int getRadioState() {
    public @RadioPowerState int getRadioState() {
        return mState;
        return mState;
    }
    }


+6 −5
Original line number Original line Diff line number Diff line
@@ -25,10 +25,12 @@ import android.os.Bundle;
import android.os.RemoteException;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.ServiceManager;
import android.os.telephony.TelephonyRegistryManager;
import android.os.telephony.TelephonyRegistryManager;
import android.telephony.Annotation.DataFailureCause;
import android.telephony.Annotation.RadioPowerState;
import android.telephony.Annotation.SrvccState;
import android.telephony.CallQuality;
import android.telephony.CallQuality;
import android.telephony.CellInfo;
import android.telephony.CellInfo;
import android.telephony.CellLocation;
import android.telephony.CellLocation;
import android.telephony.DataFailCause;
import android.telephony.PhoneCapability;
import android.telephony.PhoneCapability;
import android.telephony.PhysicalChannelConfig;
import android.telephony.PhysicalChannelConfig;
import android.telephony.PreciseCallState;
import android.telephony.PreciseCallState;
@@ -236,13 +238,13 @@ public class DefaultPhoneNotifier implements PhoneNotifier {
    }
    }


    public void notifyPreciseDataConnectionFailed(Phone sender, String apnType,
    public void notifyPreciseDataConnectionFailed(Phone sender, String apnType,
        String apn, @DataFailCause.FailCause int failCause) {
        String apn, @DataFailureCause int failCause) {
        mTelephonyRegistryMgr.notifyPreciseDataConnectionFailed(sender.getSubId(),
        mTelephonyRegistryMgr.notifyPreciseDataConnectionFailed(sender.getSubId(),
            sender.getPhoneId(), apnType, apn, failCause);
            sender.getPhoneId(), apnType, apn, failCause);
    }
    }


    @Override
    @Override
    public void notifySrvccStateChanged(Phone sender, @TelephonyManager.SrvccState int state) {
    public void notifySrvccStateChanged(Phone sender, @SrvccState int state) {
        mTelephonyRegistryMgr.notifySrvccStateChanged(sender.getSubId(), state);
        mTelephonyRegistryMgr.notifySrvccStateChanged(sender.getSubId(), state);
    }
    }


@@ -276,8 +278,7 @@ public class DefaultPhoneNotifier implements PhoneNotifier {
    }
    }


    @Override
    @Override
    public void notifyRadioPowerStateChanged(Phone sender,
    public void notifyRadioPowerStateChanged(Phone sender, @RadioPowerState int state) {
        @TelephonyManager.RadioPowerState int state) {
        mTelephonyRegistryMgr.notifyRadioPowerStateChanged(sender.getSubId(), sender.getPhoneId(),
        mTelephonyRegistryMgr.notifyRadioPowerStateChanged(sender.getSubId(), sender.getPhoneId(),
            state);
            state);
    }
    }
+3 −3
Original line number Original line Diff line number Diff line
@@ -42,12 +42,13 @@ import android.os.WorkSource;
import android.preference.PreferenceManager;
import android.preference.PreferenceManager;
import android.telecom.VideoProfile;
import android.telecom.VideoProfile;
import android.telephony.AccessNetworkConstants;
import android.telephony.AccessNetworkConstants;
import android.telephony.Annotation.ApnType;
import android.telephony.Annotation.DataFailureCause;
import android.telephony.CarrierConfigManager;
import android.telephony.CarrierConfigManager;
import android.telephony.CarrierRestrictionRules;
import android.telephony.CarrierRestrictionRules;
import android.telephony.CellInfo;
import android.telephony.CellInfo;
import android.telephony.CellLocation;
import android.telephony.CellLocation;
import android.telephony.ClientRequestStats;
import android.telephony.ClientRequestStats;
import android.telephony.DataFailCause;
import android.telephony.ImsiEncryptionInfo;
import android.telephony.ImsiEncryptionInfo;
import android.telephony.PhoneStateListener;
import android.telephony.PhoneStateListener;
import android.telephony.PhysicalChannelConfig;
import android.telephony.PhysicalChannelConfig;
@@ -58,7 +59,6 @@ import android.telephony.SignalStrength;
import android.telephony.SubscriptionManager;
import android.telephony.SubscriptionManager;
import android.telephony.TelephonyManager;
import android.telephony.TelephonyManager;
import android.telephony.data.ApnSetting;
import android.telephony.data.ApnSetting;
import android.telephony.data.ApnSetting.ApnType;
import android.telephony.emergency.EmergencyNumber;
import android.telephony.emergency.EmergencyNumber;
import android.telephony.ims.RegistrationManager;
import android.telephony.ims.RegistrationManager;
import android.telephony.ims.stub.ImsRegistrationImplBase;
import android.telephony.ims.stub.ImsRegistrationImplBase;
@@ -3299,7 +3299,7 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
    }
    }


    public void notifyPreciseDataConnectionFailed(String apnType, String apn,
    public void notifyPreciseDataConnectionFailed(String apnType, String apn,
            @DataFailCause.FailCause int failCause) {
                                                  @DataFailureCause int failCause) {
        mNotifier.notifyPreciseDataConnectionFailed(this, apnType, apn, failCause);
        mNotifier.notifyPreciseDataConnectionFailed(this, apnType, apn, failCause);
    }
    }


+6 −5
Original line number Original line Diff line number Diff line
@@ -17,13 +17,14 @@
package com.android.internal.telephony;
package com.android.internal.telephony;


import android.annotation.UnsupportedAppUsage;
import android.annotation.UnsupportedAppUsage;
import android.telephony.Annotation.DataFailureCause;
import android.telephony.Annotation.RadioPowerState;
import android.telephony.Annotation.SrvccState;
import android.telephony.CallQuality;
import android.telephony.CallQuality;
import android.telephony.CellInfo;
import android.telephony.CellInfo;
import android.telephony.CellLocation;
import android.telephony.CellLocation;
import android.telephony.DataFailCause;
import android.telephony.PhoneCapability;
import android.telephony.PhoneCapability;
import android.telephony.PhysicalChannelConfig;
import android.telephony.PhysicalChannelConfig;
import android.telephony.TelephonyManager;
import android.telephony.emergency.EmergencyNumber;
import android.telephony.emergency.EmergencyNumber;
import android.telephony.ims.ImsReasonInfo;
import android.telephony.ims.ImsReasonInfo;


@@ -69,10 +70,10 @@ public interface PhoneNotifier {
    void notifyImsDisconnectCause(Phone sender, ImsReasonInfo imsReasonInfo);
    void notifyImsDisconnectCause(Phone sender, ImsReasonInfo imsReasonInfo);


    public void notifyPreciseDataConnectionFailed(Phone sender, String apnType, String apn,
    public void notifyPreciseDataConnectionFailed(Phone sender, String apnType, String apn,
                                                  @DataFailCause.FailCause int failCause);
                                                  @DataFailureCause int failCause);


    /** send a notification that the SRVCC state has changed.*/
    /** send a notification that the SRVCC state has changed.*/
    void notifySrvccStateChanged(Phone sender, @TelephonyManager.SrvccState int state);
    void notifySrvccStateChanged(Phone sender, @SrvccState int state);


    public void notifyVoiceActivationStateChanged(Phone sender, int activationState);
    public void notifyVoiceActivationStateChanged(Phone sender, int activationState);


@@ -84,7 +85,7 @@ public interface PhoneNotifier {


    public void notifyPhoneCapabilityChanged(PhoneCapability capability);
    public void notifyPhoneCapabilityChanged(PhoneCapability capability);


    void notifyRadioPowerStateChanged(Phone sender, @TelephonyManager.RadioPowerState int state);
    void notifyRadioPowerStateChanged(Phone sender, @RadioPowerState int state);


    /** Notify of change to EmergencyNumberList. */
    /** Notify of change to EmergencyNumberList. */
    void notifyEmergencyNumberList(Phone sender);
    void notifyEmergencyNumberList(Phone sender);
+1 −1
Original line number Original line Diff line number Diff line
@@ -2641,7 +2641,7 @@ public class RIL extends BaseCommands implements CommandsInterface {
    /**
    /**
     * convert RAF from {@link android.hardware.radio.V1_0.RadioAccessFamily} to
     * convert RAF from {@link android.hardware.radio.V1_0.RadioAccessFamily} to
     * {@link TelephonyManager.NetworkTypeBitMask}, the bitmask represented by
     * {@link TelephonyManager.NetworkTypeBitMask}, the bitmask represented by
     * {@link TelephonyManager.NetworkType}.
     * {@link android.telephony.Annotation.NetworkType}.
     *
     *
     * @param raf {@link android.hardware.radio.V1_0.RadioAccessFamily}
     * @param raf {@link android.hardware.radio.V1_0.RadioAccessFamily}
     * @return {@link TelephonyManager.NetworkTypeBitMask}
     * @return {@link TelephonyManager.NetworkTypeBitMask}
Loading