1 /* 2 * Copyright (C) 2012 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 package com.android.internal.telephony; 17 18 import android.compat.annotation.UnsupportedAppUsage; 19 20 /** 21 * SMS Constants and must be the same as the corresponding 22 * deprecated version in SmsMessage. 23 * 24 * @hide 25 */ 26 public class SmsConstants { 27 /** User data text encoding code unit size */ 28 public static final int ENCODING_UNKNOWN = 0; 29 public static final int ENCODING_7BIT = 1; 30 public static final int ENCODING_8BIT = 2; 31 public static final int ENCODING_16BIT = 3; 32 33 /** The maximum number of payload septets per message */ 34 public static final int MAX_USER_DATA_SEPTETS = 160; 35 36 /** 37 * The maximum number of payload septets per message if a user data header 38 * is present. This assumes the header only contains the 39 * CONCATENATED_8_BIT_REFERENCE element. 40 */ 41 public static final int MAX_USER_DATA_SEPTETS_WITH_HEADER = 153; 42 43 /** 44 * This value is not defined in global standard. Only in Korea, this is used. 45 */ 46 public static final int ENCODING_KSC5601 = 4; 47 48 /** The maximum number of payload bytes per message */ 49 public static final int MAX_USER_DATA_BYTES = 140; 50 51 /** 52 * The maximum number of payload bytes per message if a user data header 53 * is present. This assumes the header only contains the 54 * CONCATENATED_8_BIT_REFERENCE element. 55 */ 56 public static final int MAX_USER_DATA_BYTES_WITH_HEADER = 134; 57 58 /** 59 * SMS Class enumeration. 60 * See TS 23.038. 61 */ 62 public enum MessageClass{ 63 @UnsupportedAppUsage 64 UNKNOWN, 65 @UnsupportedAppUsage 66 CLASS_0, 67 @UnsupportedAppUsage 68 CLASS_1, 69 @UnsupportedAppUsage 70 CLASS_2, 71 @UnsupportedAppUsage 72 CLASS_3; 73 } 74 75 /** 76 * Indicates unknown format SMS message. 77 * @hide pending API council approval 78 */ 79 public static final String FORMAT_UNKNOWN = "unknown"; 80 81 /** 82 * Indicates a 3GPP format SMS message. 83 * @hide pending API council approval 84 */ 85 public static final String FORMAT_3GPP = "3gpp"; 86 87 /** 88 * Indicates a 3GPP2 format SMS message. 89 * @hide pending API council approval 90 */ 91 public static final String FORMAT_3GPP2 = "3gpp2"; 92 } 93