TestArgs.java revision 6b57b7e4d568bfa6273f87ef4c9af2fdc0ca1a06
1/*
2 * Copyright (C) 2011 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.frameworkperf;
18
19import android.os.Parcel;
20import android.os.Parcelable;
21
22public class TestArgs implements Parcelable {
23    long maxTime;
24    int combOp = -1;
25    int fgOp = -1;
26    int bgOp = -1;
27
28    public TestArgs() {
29    }
30
31    public TestArgs(Parcel source) {
32        maxTime = source.readLong();
33        combOp = source.readInt();
34        fgOp = source.readInt();
35        bgOp = source.readInt();
36    }
37
38    @Override
39    public int describeContents() {
40        return 0;
41    }
42
43    @Override
44    public void writeToParcel(Parcel dest, int flags) {
45        dest.writeLong(maxTime);
46        dest.writeInt(combOp);
47        dest.writeInt(fgOp);
48        dest.writeInt(bgOp);
49    }
50
51    public static final Parcelable.Creator<TestArgs> CREATOR
52            = new Parcelable.Creator<TestArgs>() {
53        public TestArgs createFromParcel(Parcel in) {
54            return new TestArgs(in);
55        }
56
57        public TestArgs[] newArray(int size) {
58            return new TestArgs[size];
59        }
60    };
61}
62