Advertisement
Jack2

SmsResponse.java

Oct 28th, 2013
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.55 KB | None | 0 0
  1. /*
  2.  * Copyright (C) 2007 The Android Open Source Project
  3.  *
  4.  * Licensed under the Apache License, Version 2.0 (the "License");
  5.  * you may not use this file except in compliance with the License.
  6.  * You may obtain a copy of the License at
  7.  *
  8.  *      http://www.apache.org/licenses/LICENSE-2.0
  9.  *
  10.  * Unless required by applicable law or agreed to in writing, software
  11.  * distributed under the License is distributed on an "AS IS" BASIS,
  12.  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13.  * See the License for the specific language governing permissions and
  14.  * limitations under the License.
  15.  */
  16.  
  17. package com.android.internal.telephony;
  18.  
  19. /**
  20.  * Object returned by the RIL upon successful completion of sendSMS.
  21.  * Contains message reference and ackPdu.
  22.  *
  23.  */
  24. public class SmsResponse {
  25.     /** Message reference of the just-sent SMS. */
  26.     int mMessageRef;
  27.     /** ackPdu for the just-sent SMS. */
  28.     String mAckPdu;
  29.     /**
  30.      * errorCode: See 3GPP 27.005, 3.2.5 for GSM/UMTS,
  31.      * 3GPP2 N.S0005 (IS-41C) Table 171 for CDMA, -1 if unknown or not applicable.
  32.      */
  33.     int mErrorCode;
  34.  
  35.     public SmsResponse(int messageRef, String ackPdu, int errorCode) {
  36.         mMessageRef = messageRef;
  37.         mAckPdu = ackPdu;
  38.         mErrorCode = errorCode;
  39.     }
  40.  
  41.     @Override
  42.     public String toString() {
  43.         String ret = "{ mMessageRef = " + mMessageRef
  44.                    + ", mErrorCode = " + mErrorCode
  45.                    + ", mAckPdu = " + mAckPdu
  46.                    + "}";
  47.         return ret;
  48.     }
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement