Loading src/java/com/android/internal/telephony/SMSDispatcher.java +8 −6 Original line number Diff line number Diff line Loading @@ -131,8 +131,8 @@ public abstract class SMSDispatcher extends Handler { /** Confirmation required for third-party apps sending to an SMS short code. */ private static final int EVENT_CONFIRM_SEND_TO_PREMIUM_SHORT_CODE = 9; /** Handle status report from {@code CdmaInboundSmsHandler}. */ protected static final int EVENT_HANDLE_STATUS_REPORT = 10; /** New status report received. */ protected static final int EVENT_NEW_SMS_STATUS_REPORT = 10; // other protected static final int EVENT_NEW_ICC_SMS = 14; Loading Loading @@ -247,9 +247,11 @@ public abstract class SMSDispatcher extends Handler { protected abstract String getFormat(); /** * Pass the Message object to subclass to handle. Currently used to pass CDMA status reports * from {@link com.android.internal.telephony.cdma.CdmaInboundSmsHandler}. * @param o the SmsMessage containing the status report * Called when a status report is received. This should correspond to a previously successful * SEND. * * @param o AsyncResult object including a byte array for 3GPP status report PDU or SmsMessage * object for 3GPP2 status report. */ protected void handleStatusReport(Object o) { Rlog.d(TAG, "handleStatusReport() called with no subclass."); Loading Loading @@ -333,7 +335,7 @@ public abstract class SMSDispatcher extends Handler { break; } case EVENT_HANDLE_STATUS_REPORT: case EVENT_NEW_SMS_STATUS_REPORT: handleStatusReport(msg.obj); break; Loading src/java/com/android/internal/telephony/cdma/CdmaSMSDispatcher.java +2 −3 Original line number Diff line number Diff line Loading @@ -56,14 +56,13 @@ public class CdmaSMSDispatcher extends SMSDispatcher { * @param sms the CDMA SMS message containing the status report */ public void sendStatusReportMessage(SmsMessage sms) { if (VDBG) Rlog.d(TAG, "sending EVENT_HANDLE_STATUS_REPORT message"); sendMessage(obtainMessage(EVENT_HANDLE_STATUS_REPORT, sms)); if (VDBG) Rlog.d(TAG, "sending EVENT_NEW_SMS_STATUS_REPORT message"); sendMessage(obtainMessage(EVENT_NEW_SMS_STATUS_REPORT, sms)); } @Override protected void handleStatusReport(Object o) { if (o instanceof SmsMessage) { if (VDBG) Rlog.d(TAG, "calling handleSmsStatusReport()"); byte[] pdu = ((SmsMessage) o).getPdu(); mSmsDispatchersController.handleSmsStatusReport(SmsConstants.FORMAT_3GPP2, pdu); } else { Loading src/java/com/android/internal/telephony/gsm/GsmSMSDispatcher.java +18 −27 Original line number Diff line number Diff line Loading @@ -51,9 +51,6 @@ public final class GsmSMSDispatcher extends SMSDispatcher { @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) private GsmInboundSmsHandler mGsmInboundSmsHandler; /** Status report received */ private static final int EVENT_NEW_SMS_STATUS_REPORT = 100; public GsmSMSDispatcher(Phone phone, SmsDispatchersController smsDispatchersController, GsmInboundSmsHandler gsmInboundSmsHandler) { super(phone, smsDispatchersController); Loading Loading @@ -86,10 +83,6 @@ public final class GsmSMSDispatcher extends SMSDispatcher { @Override public void handleMessage(Message msg) { switch (msg.what) { case EVENT_NEW_SMS_STATUS_REPORT: handleStatusReport((AsyncResult) msg.obj); break; case EVENT_NEW_ICC_SMS: // pass to InboundSmsHandler to process mGsmInboundSmsHandler.sendMessage(InboundSmsHandler.EVENT_NEW_SMS, msg.obj); Loading Loading @@ -130,17 +123,15 @@ public final class GsmSMSDispatcher extends SMSDispatcher { return SMSDispatcherUtil.calculateLengthGsm(messageBody, use7bitOnly); } /** * Called when a status report is received. This should correspond to a previously successful * SEND. * * @param ar AsyncResult passed into the message handler. ar.result should be a byte array for * the status report PDU. */ private void handleStatusReport(AsyncResult ar) { byte[] pdu = (byte[]) ar.result; @Override protected void handleStatusReport(Object o) { if (o instanceof AsyncResult) { byte[] pdu = (byte[]) ((AsyncResult) o).result; mSmsDispatchersController.handleSmsStatusReport(SmsConstants.FORMAT_3GPP, pdu); mCi.acknowledgeLastIncomingGsmSms(true, 0 /* cause */, null); } else { Rlog.e(TAG, "handleStatusReport() called for object type " + o.getClass().getName()); } } /** {@inheritDoc} */ Loading Loading
src/java/com/android/internal/telephony/SMSDispatcher.java +8 −6 Original line number Diff line number Diff line Loading @@ -131,8 +131,8 @@ public abstract class SMSDispatcher extends Handler { /** Confirmation required for third-party apps sending to an SMS short code. */ private static final int EVENT_CONFIRM_SEND_TO_PREMIUM_SHORT_CODE = 9; /** Handle status report from {@code CdmaInboundSmsHandler}. */ protected static final int EVENT_HANDLE_STATUS_REPORT = 10; /** New status report received. */ protected static final int EVENT_NEW_SMS_STATUS_REPORT = 10; // other protected static final int EVENT_NEW_ICC_SMS = 14; Loading Loading @@ -247,9 +247,11 @@ public abstract class SMSDispatcher extends Handler { protected abstract String getFormat(); /** * Pass the Message object to subclass to handle. Currently used to pass CDMA status reports * from {@link com.android.internal.telephony.cdma.CdmaInboundSmsHandler}. * @param o the SmsMessage containing the status report * Called when a status report is received. This should correspond to a previously successful * SEND. * * @param o AsyncResult object including a byte array for 3GPP status report PDU or SmsMessage * object for 3GPP2 status report. */ protected void handleStatusReport(Object o) { Rlog.d(TAG, "handleStatusReport() called with no subclass."); Loading Loading @@ -333,7 +335,7 @@ public abstract class SMSDispatcher extends Handler { break; } case EVENT_HANDLE_STATUS_REPORT: case EVENT_NEW_SMS_STATUS_REPORT: handleStatusReport(msg.obj); break; Loading
src/java/com/android/internal/telephony/cdma/CdmaSMSDispatcher.java +2 −3 Original line number Diff line number Diff line Loading @@ -56,14 +56,13 @@ public class CdmaSMSDispatcher extends SMSDispatcher { * @param sms the CDMA SMS message containing the status report */ public void sendStatusReportMessage(SmsMessage sms) { if (VDBG) Rlog.d(TAG, "sending EVENT_HANDLE_STATUS_REPORT message"); sendMessage(obtainMessage(EVENT_HANDLE_STATUS_REPORT, sms)); if (VDBG) Rlog.d(TAG, "sending EVENT_NEW_SMS_STATUS_REPORT message"); sendMessage(obtainMessage(EVENT_NEW_SMS_STATUS_REPORT, sms)); } @Override protected void handleStatusReport(Object o) { if (o instanceof SmsMessage) { if (VDBG) Rlog.d(TAG, "calling handleSmsStatusReport()"); byte[] pdu = ((SmsMessage) o).getPdu(); mSmsDispatchersController.handleSmsStatusReport(SmsConstants.FORMAT_3GPP2, pdu); } else { Loading
src/java/com/android/internal/telephony/gsm/GsmSMSDispatcher.java +18 −27 Original line number Diff line number Diff line Loading @@ -51,9 +51,6 @@ public final class GsmSMSDispatcher extends SMSDispatcher { @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) private GsmInboundSmsHandler mGsmInboundSmsHandler; /** Status report received */ private static final int EVENT_NEW_SMS_STATUS_REPORT = 100; public GsmSMSDispatcher(Phone phone, SmsDispatchersController smsDispatchersController, GsmInboundSmsHandler gsmInboundSmsHandler) { super(phone, smsDispatchersController); Loading Loading @@ -86,10 +83,6 @@ public final class GsmSMSDispatcher extends SMSDispatcher { @Override public void handleMessage(Message msg) { switch (msg.what) { case EVENT_NEW_SMS_STATUS_REPORT: handleStatusReport((AsyncResult) msg.obj); break; case EVENT_NEW_ICC_SMS: // pass to InboundSmsHandler to process mGsmInboundSmsHandler.sendMessage(InboundSmsHandler.EVENT_NEW_SMS, msg.obj); Loading Loading @@ -130,17 +123,15 @@ public final class GsmSMSDispatcher extends SMSDispatcher { return SMSDispatcherUtil.calculateLengthGsm(messageBody, use7bitOnly); } /** * Called when a status report is received. This should correspond to a previously successful * SEND. * * @param ar AsyncResult passed into the message handler. ar.result should be a byte array for * the status report PDU. */ private void handleStatusReport(AsyncResult ar) { byte[] pdu = (byte[]) ar.result; @Override protected void handleStatusReport(Object o) { if (o instanceof AsyncResult) { byte[] pdu = (byte[]) ((AsyncResult) o).result; mSmsDispatchersController.handleSmsStatusReport(SmsConstants.FORMAT_3GPP, pdu); mCi.acknowledgeLastIncomingGsmSms(true, 0 /* cause */, null); } else { Rlog.e(TAG, "handleStatusReport() called for object type " + o.getClass().getName()); } } /** {@inheritDoc} */ Loading