1 package com.android.settings.testutils.shadow;
2 
3 import android.os.Parcel;
4 
5 import org.robolectric.annotation.Implementation;
6 import org.robolectric.annotation.Implements;
7 
8 /**
9  * This class provides helpers to test logic that reads from parcels.
10  */
11 @Implements(Parcel.class)
12 public class ShadowParcel {
13 
14     public static int sReadIntResult;
15     public static int sWriteIntResult;
16     public static boolean sReadBoolResult;
17 
18     @Implementation
readInt()19     protected int readInt() {
20         return sReadIntResult;
21     }
22 
23     @Implementation
writeInt(int val)24     protected void writeInt(int val) {
25         sWriteIntResult = val;
26     }
27 
28     @Implementation
readBoolean()29     protected boolean readBoolean() {
30         return sReadBoolResult;
31     }
32 }
33