2 * Copyright (C) 2007 The Android Open Source Project
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 package com.android.internal.telephony.gsm;
19 import android.telephony.PhoneNumberUtils;
22 * Represents a Supplementary Service Notification received from the network.
26 public class SuppServiceNotification {
27 /** Type of notification: 0 = MO; 1 = MT */
28 public int notificationType;
29 /** TS 27.007 7.17 "code1" or "code2" */
31 /** TS 27.007 7.17 "index" */
33 /** TS 27.007 7.17 "type" (MT only) */
35 /** TS 27.007 7.17 "number" (MT only) */
38 static public final int MO_CODE_UNCONDITIONAL_CF_ACTIVE = 0;
39 static public final int MO_CODE_SOME_CF_ACTIVE = 1;
40 static public final int MO_CODE_CALL_FORWARDED = 2;
41 static public final int MO_CODE_CALL_IS_WAITING = 3;
42 static public final int MO_CODE_CUG_CALL = 4;
43 static public final int MO_CODE_OUTGOING_CALLS_BARRED = 5;
44 static public final int MO_CODE_INCOMING_CALLS_BARRED = 6;
45 static public final int MO_CODE_CLIR_SUPPRESSION_REJECTED = 7;
46 static public final int MO_CODE_CALL_DEFLECTED = 8;
48 static public final int MT_CODE_FORWARDED_CALL = 0;
49 static public final int MT_CODE_CUG_CALL = 1;
50 static public final int MT_CODE_CALL_ON_HOLD = 2;
51 static public final int MT_CODE_CALL_RETRIEVED = 3;
52 static public final int MT_CODE_MULTI_PARTY_CALL = 4;
53 static public final int MT_CODE_ON_HOLD_CALL_RELEASED = 5;
54 static public final int MT_CODE_FORWARD_CHECK_RECEIVED = 6;
55 static public final int MT_CODE_CALL_CONNECTING_ECT = 7;
56 static public final int MT_CODE_CALL_CONNECTED_ECT = 8;
57 static public final int MT_CODE_DEFLECTED_CALL = 9;
58 static public final int MT_CODE_ADDITIONAL_CALL_FORWARDED = 10;
60 public String toString()
62 return super.toString() + " mobile"
63 + (notificationType == 0 ? " originated " : " terminated ")
67 + PhoneNumberUtils.stringFromStringAndTOA(number, type) + "\" ";