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