blob: 7acc3bfd45c95aa76dc0d89cd9cad6bf26c7e8c5 [file] [log] [blame]
Wink Savillef8458ff2014-06-25 16:08:02 -07001/*
2 * Copyright (c) 2013 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
17package com.android.ims;
18
19import android.os.Parcel;
20import android.os.Parcelable;
21
22/**
23 * Provides the result to the update operation for the supplementary service configuration.
24 *
25 * @hide
26 */
27public class ImsSsInfo implements Parcelable {
28 /**
29 * For the status of service registration or activation/deactivation.
30 */
31 public static final int NOT_REGISTERED = (-1);
32 public static final int DISABLED = 0;
33 public static final int ENABLED = 1;
34
35 // 0: disabled, 1: enabled
36 public int mStatus;
Shriram Ganeshddf570e2015-05-31 09:18:48 -070037 public String mIcbNum;
Wink Savillef8458ff2014-06-25 16:08:02 -070038
39 public ImsSsInfo() {
40 }
41
42 public ImsSsInfo(Parcel in) {
43 readFromParcel(in);
44 }
45
46 @Override
47 public int describeContents() {
48 return 0;
49 }
50
51 @Override
52 public void writeToParcel(Parcel out, int flags) {
53 out.writeInt(mStatus);
Shriram Ganeshddf570e2015-05-31 09:18:48 -070054 out.writeString(mIcbNum);
Wink Savillef8458ff2014-06-25 16:08:02 -070055 }
56
57 @Override
58 public String toString() {
59 return super.toString() + ", Status: " + ((mStatus == 0) ? "disabled" : "enabled");
60 }
61
62 private void readFromParcel(Parcel in) {
63 mStatus = in.readInt();
Shriram Ganeshddf570e2015-05-31 09:18:48 -070064 mIcbNum = in.readString();
Wink Savillef8458ff2014-06-25 16:08:02 -070065 }
66
67 public static final Creator<ImsSsInfo> CREATOR =
68 new Creator<ImsSsInfo>() {
69 @Override
70 public ImsSsInfo createFromParcel(Parcel in) {
71 return new ImsSsInfo(in);
72 }
73
74 @Override
75 public ImsSsInfo[] newArray(int size) {
76 return new ImsSsInfo[size];
77 }
78 };
79}