1 /* 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 17 package com.android.ims; 18 19 import android.os.Parcel; 20 import android.os.Parcelable; 21 22 /** 23 * Provides the result to the update operation for the supplementary service configuration. 24 * 25 * @hide 26 */ 27 public 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; 37 38 public ImsSsInfo() { 39 } 40 41 public ImsSsInfo(Parcel in) { 42 readFromParcel(in); 43 } 44 45 @Override 46 public int describeContents() { 47 return 0; 48 } 49 50 @Override 51 public void writeToParcel(Parcel out, int flags) { 52 out.writeInt(mStatus); 53 } 54 55 @Override 56 public String toString() { 57 return super.toString() + ", Status: " + ((mStatus == 0) ? "disabled" : "enabled"); 58 } 59 60 private void readFromParcel(Parcel in) { 61 mStatus = in.readInt(); 62 } 63 64 public static final Creator<ImsSsInfo> CREATOR = 65 new Creator<ImsSsInfo>() { 66 @Override 67 public ImsSsInfo createFromParcel(Parcel in) { 68 return new ImsSsInfo(in); 69 } 70 71 @Override 72 public ImsSsInfo[] newArray(int size) { 73 return new ImsSsInfo[size]; 74 } 75 }; 76 } 77