Loading src/java/android/provider/Telephony.java +47 −1 Original line number Diff line number Diff line Loading @@ -1070,6 +1070,39 @@ public final class Telephony { public static final String MMS_DOWNLOADED_ACTION = "android.provider.Telephony.MMS_DOWNLOADED"; /** * Broadcast action: When the default SMS package changes, * the previous default SMS package and the new default SMS * package are sent this broadcast to notify them of the change. * A boolean is specified in {@link #EXTRA_IS_DEFAULT_SMS_APP} to * indicate whether the package is the new default SMS package. */ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) public static final String ACTION_DEFAULT_SMS_PACKAGE_CHANGED = "android.provider.action.DEFAULT_SMS_PACKAGE_CHANGED"; /** * The IsDefaultSmsApp boolean passed as an * extra for {@link #ACTION_DEFAULT_SMS_PACKAGE_CHANGED} to indicate whether the * SMS app is becoming the default SMS app or is no longer the default. * * @see #ACTION_DEFAULT_SMS_PACKAGE_CHANGED */ public static final String EXTRA_IS_DEFAULT_SMS_APP = "android.provider.extra.IS_DEFAULT_SMS_APP"; /** * Broadcast action: When a change is made to the SmsProvider or * MmsProvider by a process other than the default SMS application, * this intent is broadcast to the default SMS application so it can * re-sync or update the change. The uri that was used to call the provider * can be retrieved from the intent with getData(). The actual affected uris * (which would depend on the selection specified) are not included. */ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) public static final String ACTION_EXTERNAL_PROVIDER_CHANGE = "android.provider.action.EXTERNAL_PROVIDER_CHANGE"; /** * Read the PDUs out of an {@link #SMS_RECEIVED_ACTION} or a * {@link #DATA_SMS_RECEIVED_ACTION} intent. Loading @@ -1078,7 +1111,20 @@ public final class Telephony { * @return an array of SmsMessages for the PDUs */ public static SmsMessage[] getMessagesFromIntent(Intent intent) { Object[] messages = (Object[]) intent.getSerializableExtra("pdus"); Object[] messages; try { messages = (Object[]) intent.getSerializableExtra("pdus"); } catch (ClassCastException e) { Rlog.e(TAG, "getMessagesFromIntent: " + e); return null; } if (messages == null) { Rlog.e(TAG, "pdus does not exist in the intent"); return null; } String format = intent.getStringExtra("format"); int subId = intent.getIntExtra(PhoneConstants.SUBSCRIPTION_KEY, SubscriptionManager.getDefaultSmsSubId()); Loading src/java/android/telephony/CellBroadcastMessage.java +1 −1 Original line number Diff line number Diff line Loading @@ -173,7 +173,7 @@ public class CellBroadcastMessage implements Parcelable { Telephony.CellBroadcasts.ETWS_WARNING_TYPE); if (etwsWarningTypeColumn != -1 && !cursor.isNull(etwsWarningTypeColumn)) { int warningType = cursor.getInt(etwsWarningTypeColumn); etwsInfo = new SmsCbEtwsInfo(warningType, false, false, null); etwsInfo = new SmsCbEtwsInfo(warningType, false, false, false, null); } else { etwsInfo = null; } Loading src/java/android/telephony/SmsCbEtwsInfo.java +15 −1 Original line number Diff line number Diff line Loading @@ -59,6 +59,9 @@ public class SmsCbEtwsInfo implements Parcelable { /** Whether or not to activate a popup alert. */ private final boolean mActivatePopup; /** Whether ETWS primary message or not/ */ private final boolean mPrimary; /** * 50-byte security information (ETWS primary notification for GSM only). As of Release 10, * 3GPP TS 23.041 states that the UE shall ignore the ETWS primary notification timestamp Loading @@ -70,10 +73,11 @@ public class SmsCbEtwsInfo implements Parcelable { /** Create a new SmsCbEtwsInfo object with the specified values. */ public SmsCbEtwsInfo(int warningType, boolean emergencyUserAlert, boolean activatePopup, byte[] warningSecurityInformation) { boolean primary, byte[] warningSecurityInformation) { mWarningType = warningType; mEmergencyUserAlert = emergencyUserAlert; mActivatePopup = activatePopup; mPrimary = primary; mWarningSecurityInformation = warningSecurityInformation; } Loading @@ -82,6 +86,7 @@ public class SmsCbEtwsInfo implements Parcelable { mWarningType = in.readInt(); mEmergencyUserAlert = (in.readInt() != 0); mActivatePopup = (in.readInt() != 0); mPrimary = (in.readInt() != 0); mWarningSecurityInformation = in.createByteArray(); } Loading @@ -96,6 +101,7 @@ public class SmsCbEtwsInfo implements Parcelable { dest.writeInt(mWarningType); dest.writeInt(mEmergencyUserAlert ? 1 : 0); dest.writeInt(mActivatePopup ? 1 : 0); dest.writeInt(mPrimary ? 1 : 0); dest.writeByteArray(mWarningSecurityInformation); } Loading Loading @@ -123,6 +129,14 @@ public class SmsCbEtwsInfo implements Parcelable { return mActivatePopup; } /** * Returns the ETWS format flag. * @return true if the message is primary message, otherwise secondary message */ public boolean isPrimary() { return mPrimary; } /** * Returns the Warning-Security-Information timestamp (GSM primary notifications only). * As of Release 10, 3GPP TS 23.041 states that the UE shall ignore this value if received. Loading src/java/com/android/internal/telephony/BaseCommands.java +2 −2 Original line number Diff line number Diff line Loading @@ -101,7 +101,7 @@ public abstract class BaseCommands implements CommandsInterface { protected int mPreferredNetworkType; // CDMA subscription received from PhoneFactory protected int mCdmaSubscription; // Type of Phone, GSM or CDMA. Set by CDMAPhone or GSMPhone. // Type of Phone, GSM or CDMA. Set by GsmCdmaPhone. protected int mPhoneType; // RIL Version protected int mRilVersion = -1; Loading Loading @@ -548,7 +548,7 @@ public abstract class BaseCommands implements CommandsInterface { @Override public void unSetOnRestrictedStateChanged(Handler h) { if (mRestrictedStateRegistrant != null && mRestrictedStateRegistrant.getHandler() != h) { if (mRestrictedStateRegistrant != null && mRestrictedStateRegistrant.getHandler() == h) { mRestrictedStateRegistrant.clear(); mRestrictedStateRegistrant = null; } Loading src/java/com/android/internal/telephony/gsm/CallFailCause.java→src/java/com/android/internal/telephony/CallFailCause.java +78 −0 Original line number Diff line number Diff line Loading @@ -14,46 +14,65 @@ * limitations under the License. */ package com.android.internal.telephony.gsm; package com.android.internal.telephony; /** * Call fail causes from TS 24.008 . * These are mostly the cause codes we need to distinguish for the UI. * See 22.001 Annex F.4 for mapping of cause codes to local tones. * * CDMA call failure reasons are derived from the possible call failure scenarios described * in "CDMA IS2000 - Release A (C.S0005-A v6.0)" standard. * * {@hide} * */ public interface CallFailCause { // Unassigned/Unobtainable number static final int UNOBTAINABLE_NUMBER = 1; int UNOBTAINABLE_NUMBER = 1; static final int NORMAL_CLEARING = 16; int NORMAL_CLEARING = 16; // Busy Tone static final int USER_BUSY = 17; int USER_BUSY = 17; // No Tone static final int NUMBER_CHANGED = 22; static final int STATUS_ENQUIRY = 30; static final int NORMAL_UNSPECIFIED = 31; int NUMBER_CHANGED = 22; int STATUS_ENQUIRY = 30; int NORMAL_UNSPECIFIED = 31; // Congestion Tone static final int NO_CIRCUIT_AVAIL = 34; static final int TEMPORARY_FAILURE = 41; static final int SWITCHING_CONGESTION = 42; static final int CHANNEL_NOT_AVAIL = 44; static final int QOS_NOT_AVAIL = 49; static final int BEARER_NOT_AVAIL = 58; int NO_CIRCUIT_AVAIL = 34; int TEMPORARY_FAILURE = 41; int SWITCHING_CONGESTION = 42; int CHANNEL_NOT_AVAIL = 44; int QOS_NOT_AVAIL = 49; int BEARER_NOT_AVAIL = 58; // others static final int ACM_LIMIT_EXCEEDED = 68; static final int CALL_BARRED = 240; static final int FDN_BLOCKED = 241; int ACM_LIMIT_EXCEEDED = 68; int CALL_BARRED = 240; int FDN_BLOCKED = 241; // Stk Call Control static final int DIAL_MODIFIED_TO_USSD = 244; static final int DIAL_MODIFIED_TO_SS = 245; static final int DIAL_MODIFIED_TO_DIAL = 246; int DIAL_MODIFIED_TO_USSD = 244; int DIAL_MODIFIED_TO_SS = 245; int DIAL_MODIFIED_TO_DIAL = 246; int CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000; int CDMA_DROP = 1001; int CDMA_INTERCEPT = 1002; int CDMA_REORDER = 1003; int CDMA_SO_REJECT = 1004; int CDMA_RETRY_ORDER = 1005; int CDMA_ACCESS_FAILURE = 1006; int CDMA_PREEMPTED = 1007; // For non-emergency number dialed while in emergency callback mode. int CDMA_NOT_EMERGENCY = 1008; // Access Blocked by CDMA Network. int CDMA_ACCESS_BLOCKED = 1009; int ERROR_UNSPECIFIED = 0xffff; static final int ERROR_UNSPECIFIED = 0xffff; } Loading
src/java/android/provider/Telephony.java +47 −1 Original line number Diff line number Diff line Loading @@ -1070,6 +1070,39 @@ public final class Telephony { public static final String MMS_DOWNLOADED_ACTION = "android.provider.Telephony.MMS_DOWNLOADED"; /** * Broadcast action: When the default SMS package changes, * the previous default SMS package and the new default SMS * package are sent this broadcast to notify them of the change. * A boolean is specified in {@link #EXTRA_IS_DEFAULT_SMS_APP} to * indicate whether the package is the new default SMS package. */ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) public static final String ACTION_DEFAULT_SMS_PACKAGE_CHANGED = "android.provider.action.DEFAULT_SMS_PACKAGE_CHANGED"; /** * The IsDefaultSmsApp boolean passed as an * extra for {@link #ACTION_DEFAULT_SMS_PACKAGE_CHANGED} to indicate whether the * SMS app is becoming the default SMS app or is no longer the default. * * @see #ACTION_DEFAULT_SMS_PACKAGE_CHANGED */ public static final String EXTRA_IS_DEFAULT_SMS_APP = "android.provider.extra.IS_DEFAULT_SMS_APP"; /** * Broadcast action: When a change is made to the SmsProvider or * MmsProvider by a process other than the default SMS application, * this intent is broadcast to the default SMS application so it can * re-sync or update the change. The uri that was used to call the provider * can be retrieved from the intent with getData(). The actual affected uris * (which would depend on the selection specified) are not included. */ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) public static final String ACTION_EXTERNAL_PROVIDER_CHANGE = "android.provider.action.EXTERNAL_PROVIDER_CHANGE"; /** * Read the PDUs out of an {@link #SMS_RECEIVED_ACTION} or a * {@link #DATA_SMS_RECEIVED_ACTION} intent. Loading @@ -1078,7 +1111,20 @@ public final class Telephony { * @return an array of SmsMessages for the PDUs */ public static SmsMessage[] getMessagesFromIntent(Intent intent) { Object[] messages = (Object[]) intent.getSerializableExtra("pdus"); Object[] messages; try { messages = (Object[]) intent.getSerializableExtra("pdus"); } catch (ClassCastException e) { Rlog.e(TAG, "getMessagesFromIntent: " + e); return null; } if (messages == null) { Rlog.e(TAG, "pdus does not exist in the intent"); return null; } String format = intent.getStringExtra("format"); int subId = intent.getIntExtra(PhoneConstants.SUBSCRIPTION_KEY, SubscriptionManager.getDefaultSmsSubId()); Loading
src/java/android/telephony/CellBroadcastMessage.java +1 −1 Original line number Diff line number Diff line Loading @@ -173,7 +173,7 @@ public class CellBroadcastMessage implements Parcelable { Telephony.CellBroadcasts.ETWS_WARNING_TYPE); if (etwsWarningTypeColumn != -1 && !cursor.isNull(etwsWarningTypeColumn)) { int warningType = cursor.getInt(etwsWarningTypeColumn); etwsInfo = new SmsCbEtwsInfo(warningType, false, false, null); etwsInfo = new SmsCbEtwsInfo(warningType, false, false, false, null); } else { etwsInfo = null; } Loading
src/java/android/telephony/SmsCbEtwsInfo.java +15 −1 Original line number Diff line number Diff line Loading @@ -59,6 +59,9 @@ public class SmsCbEtwsInfo implements Parcelable { /** Whether or not to activate a popup alert. */ private final boolean mActivatePopup; /** Whether ETWS primary message or not/ */ private final boolean mPrimary; /** * 50-byte security information (ETWS primary notification for GSM only). As of Release 10, * 3GPP TS 23.041 states that the UE shall ignore the ETWS primary notification timestamp Loading @@ -70,10 +73,11 @@ public class SmsCbEtwsInfo implements Parcelable { /** Create a new SmsCbEtwsInfo object with the specified values. */ public SmsCbEtwsInfo(int warningType, boolean emergencyUserAlert, boolean activatePopup, byte[] warningSecurityInformation) { boolean primary, byte[] warningSecurityInformation) { mWarningType = warningType; mEmergencyUserAlert = emergencyUserAlert; mActivatePopup = activatePopup; mPrimary = primary; mWarningSecurityInformation = warningSecurityInformation; } Loading @@ -82,6 +86,7 @@ public class SmsCbEtwsInfo implements Parcelable { mWarningType = in.readInt(); mEmergencyUserAlert = (in.readInt() != 0); mActivatePopup = (in.readInt() != 0); mPrimary = (in.readInt() != 0); mWarningSecurityInformation = in.createByteArray(); } Loading @@ -96,6 +101,7 @@ public class SmsCbEtwsInfo implements Parcelable { dest.writeInt(mWarningType); dest.writeInt(mEmergencyUserAlert ? 1 : 0); dest.writeInt(mActivatePopup ? 1 : 0); dest.writeInt(mPrimary ? 1 : 0); dest.writeByteArray(mWarningSecurityInformation); } Loading Loading @@ -123,6 +129,14 @@ public class SmsCbEtwsInfo implements Parcelable { return mActivatePopup; } /** * Returns the ETWS format flag. * @return true if the message is primary message, otherwise secondary message */ public boolean isPrimary() { return mPrimary; } /** * Returns the Warning-Security-Information timestamp (GSM primary notifications only). * As of Release 10, 3GPP TS 23.041 states that the UE shall ignore this value if received. Loading
src/java/com/android/internal/telephony/BaseCommands.java +2 −2 Original line number Diff line number Diff line Loading @@ -101,7 +101,7 @@ public abstract class BaseCommands implements CommandsInterface { protected int mPreferredNetworkType; // CDMA subscription received from PhoneFactory protected int mCdmaSubscription; // Type of Phone, GSM or CDMA. Set by CDMAPhone or GSMPhone. // Type of Phone, GSM or CDMA. Set by GsmCdmaPhone. protected int mPhoneType; // RIL Version protected int mRilVersion = -1; Loading Loading @@ -548,7 +548,7 @@ public abstract class BaseCommands implements CommandsInterface { @Override public void unSetOnRestrictedStateChanged(Handler h) { if (mRestrictedStateRegistrant != null && mRestrictedStateRegistrant.getHandler() != h) { if (mRestrictedStateRegistrant != null && mRestrictedStateRegistrant.getHandler() == h) { mRestrictedStateRegistrant.clear(); mRestrictedStateRegistrant = null; } Loading
src/java/com/android/internal/telephony/gsm/CallFailCause.java→src/java/com/android/internal/telephony/CallFailCause.java +78 −0 Original line number Diff line number Diff line Loading @@ -14,46 +14,65 @@ * limitations under the License. */ package com.android.internal.telephony.gsm; package com.android.internal.telephony; /** * Call fail causes from TS 24.008 . * These are mostly the cause codes we need to distinguish for the UI. * See 22.001 Annex F.4 for mapping of cause codes to local tones. * * CDMA call failure reasons are derived from the possible call failure scenarios described * in "CDMA IS2000 - Release A (C.S0005-A v6.0)" standard. * * {@hide} * */ public interface CallFailCause { // Unassigned/Unobtainable number static final int UNOBTAINABLE_NUMBER = 1; int UNOBTAINABLE_NUMBER = 1; static final int NORMAL_CLEARING = 16; int NORMAL_CLEARING = 16; // Busy Tone static final int USER_BUSY = 17; int USER_BUSY = 17; // No Tone static final int NUMBER_CHANGED = 22; static final int STATUS_ENQUIRY = 30; static final int NORMAL_UNSPECIFIED = 31; int NUMBER_CHANGED = 22; int STATUS_ENQUIRY = 30; int NORMAL_UNSPECIFIED = 31; // Congestion Tone static final int NO_CIRCUIT_AVAIL = 34; static final int TEMPORARY_FAILURE = 41; static final int SWITCHING_CONGESTION = 42; static final int CHANNEL_NOT_AVAIL = 44; static final int QOS_NOT_AVAIL = 49; static final int BEARER_NOT_AVAIL = 58; int NO_CIRCUIT_AVAIL = 34; int TEMPORARY_FAILURE = 41; int SWITCHING_CONGESTION = 42; int CHANNEL_NOT_AVAIL = 44; int QOS_NOT_AVAIL = 49; int BEARER_NOT_AVAIL = 58; // others static final int ACM_LIMIT_EXCEEDED = 68; static final int CALL_BARRED = 240; static final int FDN_BLOCKED = 241; int ACM_LIMIT_EXCEEDED = 68; int CALL_BARRED = 240; int FDN_BLOCKED = 241; // Stk Call Control static final int DIAL_MODIFIED_TO_USSD = 244; static final int DIAL_MODIFIED_TO_SS = 245; static final int DIAL_MODIFIED_TO_DIAL = 246; int DIAL_MODIFIED_TO_USSD = 244; int DIAL_MODIFIED_TO_SS = 245; int DIAL_MODIFIED_TO_DIAL = 246; int CDMA_LOCKED_UNTIL_POWER_CYCLE = 1000; int CDMA_DROP = 1001; int CDMA_INTERCEPT = 1002; int CDMA_REORDER = 1003; int CDMA_SO_REJECT = 1004; int CDMA_RETRY_ORDER = 1005; int CDMA_ACCESS_FAILURE = 1006; int CDMA_PREEMPTED = 1007; // For non-emergency number dialed while in emergency callback mode. int CDMA_NOT_EMERGENCY = 1008; // Access Blocked by CDMA Network. int CDMA_ACCESS_BLOCKED = 1009; int ERROR_UNSPECIFIED = 0xffff; static final int ERROR_UNSPECIFIED = 0xffff; }