Loading proto/src/telephony.proto +51 −0 Original line number Diff line number Diff line Loading @@ -1199,6 +1199,9 @@ message SmsSession { // Notification about received SMS SMS_RECEIVED = 8; // CB message received CB_SMS_RECEIVED = 9; } // Formats used to encode SMS messages Loading @@ -1224,6 +1227,51 @@ message SmsSession { SMS_IMS = 3; } message CBMessage { // CB message format optional Format msgFormat = 1; // CB message priority optional CBPriority msgPriority = 2; // Type of CB msg optional CBMessageType msgType = 3; // Service category of CB message optional int32 serviceCategory = 4; } enum CBMessageType { // Unknown type TYPE_UNKNOWN = 0; // ETWS CB msg ETWS = 1; // CMAS CB msg CMAS = 2; // CB msg other than ETWS and CMAS OTHER = 3; } enum CBPriority { // Unknown priority PRIORITY_UNKNOWN = 0; // NORMAL priority NORMAL = 1; // Interactive priority INTERACTIVE = 2; // Urgent priority URGENT = 3; // Emergency priority EMERGENCY = 4; } // Event type optional Type type = 1; Loading Loading @@ -1261,6 +1309,9 @@ message SmsSession { // Numeric ID optional int32 ril_request_id = 12; // Cellbroadcast message content optional CBMessage cell_broadcast_message = 13; } // Time when session has started, in minutes since epoch, Loading src/java/com/android/internal/telephony/CellBroadcastHandler.java +8 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,8 @@ import android.provider.Telephony; import android.telephony.SmsCbMessage; import android.telephony.SubscriptionManager; import com.android.internal.telephony.metrics.TelephonyMetrics; /** * Dispatch new Cell Broadcasts to receivers. Acquires a private wakelock until the broadcast * completes and our result receiver is called. Loading Loading @@ -82,6 +84,12 @@ public class CellBroadcastHandler extends WakeLockStateMachine { String receiverPermission; int appOp; // Log Cellbroadcast msg received event TelephonyMetrics metrics = TelephonyMetrics.getInstance(); metrics.writeNewCBSms(mPhone.getPhoneId(), message.getMessageFormat(), message.getMessagePriority(), message.isCmasMessage(), message.isEtwsMessage(), message.getServiceCategory()); Intent intent; if (message.isEmergencyMessage()) { log("Dispatching emergency SMS CB, SmsCbMessage is: " + message); Loading src/java/com/android/internal/telephony/RIL.java +1 −1 Original line number Diff line number Diff line Loading @@ -3098,7 +3098,7 @@ public class RIL extends BaseCommands implements CommandsInterface { try { radioProxy.sendImsSms(rr.mSerial, msg); mMetrics.writeRilSendSms(mPhoneId, rr.mSerial, SmsSession.Event.Tech.SMS_IMS, SmsSession.Event.Format.SMS_FORMAT_3GPP); SmsSession.Event.Format.SMS_FORMAT_3GPP2); } catch (RemoteException | RuntimeException e) { handleRadioProxyExceptionForRR(rr, "sendImsCdmaSms", e); } Loading src/java/com/android/internal/telephony/cdma/CdmaInboundSmsHandler.java +0 −2 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ import android.app.Activity; import android.content.Context; import android.content.res.Resources; import android.os.Message; import android.os.SystemProperties; import android.provider.Telephony.Sms.Intents; import android.telephony.SmsCbMessage; Loading @@ -33,7 +32,6 @@ import com.android.internal.telephony.SmsConstants; import com.android.internal.telephony.SmsMessageBase; import com.android.internal.telephony.SmsStorageMonitor; import com.android.internal.telephony.TelephonyComponentFactory; import com.android.internal.telephony.TelephonyProperties; import com.android.internal.telephony.WspTypeDecoder; import com.android.internal.telephony.cdma.sms.SmsEnvelope; import com.android.internal.util.HexDump; Loading src/java/com/android/internal/telephony/metrics/SmsSessionEventBuilder.java +5 −0 Original line number Diff line number Diff line Loading @@ -88,4 +88,9 @@ public class SmsSessionEventBuilder { mEvent.format = format; return this; } public SmsSessionEventBuilder setCellBroadcastMessage(SmsSession.Event.CBMessage msg) { mEvent.cellBroadcastMessage = msg; return this; } } Loading
proto/src/telephony.proto +51 −0 Original line number Diff line number Diff line Loading @@ -1199,6 +1199,9 @@ message SmsSession { // Notification about received SMS SMS_RECEIVED = 8; // CB message received CB_SMS_RECEIVED = 9; } // Formats used to encode SMS messages Loading @@ -1224,6 +1227,51 @@ message SmsSession { SMS_IMS = 3; } message CBMessage { // CB message format optional Format msgFormat = 1; // CB message priority optional CBPriority msgPriority = 2; // Type of CB msg optional CBMessageType msgType = 3; // Service category of CB message optional int32 serviceCategory = 4; } enum CBMessageType { // Unknown type TYPE_UNKNOWN = 0; // ETWS CB msg ETWS = 1; // CMAS CB msg CMAS = 2; // CB msg other than ETWS and CMAS OTHER = 3; } enum CBPriority { // Unknown priority PRIORITY_UNKNOWN = 0; // NORMAL priority NORMAL = 1; // Interactive priority INTERACTIVE = 2; // Urgent priority URGENT = 3; // Emergency priority EMERGENCY = 4; } // Event type optional Type type = 1; Loading Loading @@ -1261,6 +1309,9 @@ message SmsSession { // Numeric ID optional int32 ril_request_id = 12; // Cellbroadcast message content optional CBMessage cell_broadcast_message = 13; } // Time when session has started, in minutes since epoch, Loading
src/java/com/android/internal/telephony/CellBroadcastHandler.java +8 −0 Original line number Diff line number Diff line Loading @@ -31,6 +31,8 @@ import android.provider.Telephony; import android.telephony.SmsCbMessage; import android.telephony.SubscriptionManager; import com.android.internal.telephony.metrics.TelephonyMetrics; /** * Dispatch new Cell Broadcasts to receivers. Acquires a private wakelock until the broadcast * completes and our result receiver is called. Loading Loading @@ -82,6 +84,12 @@ public class CellBroadcastHandler extends WakeLockStateMachine { String receiverPermission; int appOp; // Log Cellbroadcast msg received event TelephonyMetrics metrics = TelephonyMetrics.getInstance(); metrics.writeNewCBSms(mPhone.getPhoneId(), message.getMessageFormat(), message.getMessagePriority(), message.isCmasMessage(), message.isEtwsMessage(), message.getServiceCategory()); Intent intent; if (message.isEmergencyMessage()) { log("Dispatching emergency SMS CB, SmsCbMessage is: " + message); Loading
src/java/com/android/internal/telephony/RIL.java +1 −1 Original line number Diff line number Diff line Loading @@ -3098,7 +3098,7 @@ public class RIL extends BaseCommands implements CommandsInterface { try { radioProxy.sendImsSms(rr.mSerial, msg); mMetrics.writeRilSendSms(mPhoneId, rr.mSerial, SmsSession.Event.Tech.SMS_IMS, SmsSession.Event.Format.SMS_FORMAT_3GPP); SmsSession.Event.Format.SMS_FORMAT_3GPP2); } catch (RemoteException | RuntimeException e) { handleRadioProxyExceptionForRR(rr, "sendImsCdmaSms", e); } Loading
src/java/com/android/internal/telephony/cdma/CdmaInboundSmsHandler.java +0 −2 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ import android.app.Activity; import android.content.Context; import android.content.res.Resources; import android.os.Message; import android.os.SystemProperties; import android.provider.Telephony.Sms.Intents; import android.telephony.SmsCbMessage; Loading @@ -33,7 +32,6 @@ import com.android.internal.telephony.SmsConstants; import com.android.internal.telephony.SmsMessageBase; import com.android.internal.telephony.SmsStorageMonitor; import com.android.internal.telephony.TelephonyComponentFactory; import com.android.internal.telephony.TelephonyProperties; import com.android.internal.telephony.WspTypeDecoder; import com.android.internal.telephony.cdma.sms.SmsEnvelope; import com.android.internal.util.HexDump; Loading
src/java/com/android/internal/telephony/metrics/SmsSessionEventBuilder.java +5 −0 Original line number Diff line number Diff line Loading @@ -88,4 +88,9 @@ public class SmsSessionEventBuilder { mEvent.format = format; return this; } public SmsSessionEventBuilder setCellBroadcastMessage(SmsSession.Event.CBMessage msg) { mEvent.cellBroadcastMessage = msg; return this; } }