OSDN Git Service

am e726495a: am fe5e7e92: Merge "docs: Fix issue with onCreate() method declaration...
[android-x86/frameworks-base.git] / telephony / java / com / android / internal / telephony / DcParamObject.java
1 /*
2  * Copyright (C) 2014 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 import android.os.Parcelable;
20 import android.os.Parcel;
21
22 public class DcParamObject implements Parcelable {
23
24     private long mSubId;
25
26     public DcParamObject(long subId) {
27         mSubId = subId;
28     }
29
30     public DcParamObject(Parcel in) {
31         readFromParcel(in);
32     }
33
34     public int describeContents() {
35         return 0;
36     }
37
38     public void writeToParcel(Parcel dest, int flags) {
39         dest.writeLong(mSubId);
40     }
41
42     private void readFromParcel(Parcel in) {
43         mSubId = in.readLong();
44     }
45
46     public static final Parcelable.Creator<DcParamObject> CREATOR = new Parcelable.Creator<DcParamObject>() {
47         public DcParamObject createFromParcel(Parcel in) {
48             return new DcParamObject(in);
49         }
50         public DcParamObject[] newArray(int size) {
51             return new DcParamObject[size];
52         }
53     };
54
55     public long getSubId() {
56         return mSubId;
57     }
58 }