1 package com.xtremelabs.robolectric.shadows;
2 
3 import java.util.Locale;
4 
5 import android.content.res.Configuration;
6 
7 import com.xtremelabs.robolectric.internal.Implementation;
8 import com.xtremelabs.robolectric.internal.Implements;
9 import com.xtremelabs.robolectric.internal.RealObject;
10 
11 @Implements(Configuration.class)
12 public class ShadowConfiguration {
13 
14     @RealObject
15     private Configuration realConfiguration;
16 
17     public int screenLayout;
18     public int touchscreen;
19     public int orientation;
20 
21     @Implementation
setToDefaults()22     public void setToDefaults() {
23         realConfiguration.screenLayout = Configuration.SCREENLAYOUT_LONG_NO |
24                 Configuration.SCREENLAYOUT_SIZE_NORMAL;
25     }
26 
setLocale( Locale l )27     public void setLocale( Locale l ) {
28     	realConfiguration.locale = l;
29     }
30 }
31