SyncInfo.java revision 231cc608d06ffc31c24bf8aa8c8275bdd2636581
1/*
2 * Copyright (C) 2009 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 android.content;
18
19import android.os.Parcel;
20import android.os.Parcelable.Creator;
21
22/** @hide */
23public class ActiveSyncInfo {
24    public final int authorityId;
25    public final String account;
26    public final String authority;
27    public final long startTime;
28
29    ActiveSyncInfo(int authorityId, String account, String authority,
30            long startTime) {
31        this.authorityId = authorityId;
32        this.account = account;
33        this.authority = authority;
34        this.startTime = startTime;
35    }
36
37    public int describeContents() {
38        return 0;
39    }
40
41    public void writeToParcel(Parcel parcel, int flags) {
42        parcel.writeInt(authorityId);
43        parcel.writeString(account);
44        parcel.writeString(authority);
45        parcel.writeLong(startTime);
46    }
47
48    ActiveSyncInfo(Parcel parcel) {
49        authorityId = parcel.readInt();
50        account = parcel.readString();
51        authority = parcel.readString();
52        startTime = parcel.readLong();
53    }
54
55    public static final Creator<ActiveSyncInfo> CREATOR = new Creator<ActiveSyncInfo>() {
56        public ActiveSyncInfo createFromParcel(Parcel in) {
57            return new ActiveSyncInfo(in);
58        }
59
60        public ActiveSyncInfo[] newArray(int size) {
61            return new ActiveSyncInfo[size];
62        }
63    };
64}