package org.robolectric.shadows;

import android.content.res.Configuration;
import java.util.Locale;
import org.robolectric.annotation.Implementation;
import org.robolectric.annotation.Implements;
import org.robolectric.annotation.RealObject;

import static org.robolectric.shadow.api.Shadow.directlyOn;

/**
 * Shadow for {@link android.content.res.Configuration}.
 */
@Implements(Configuration.class)
public class ShadowConfiguration {


}

@@ -93,16 +93,102 @@
 .Locale;
+%0A%0Aimport org.robolectric.RuntimeEnvironment;%0Aimport org.robolectric.annotation.Config;
 %0Aimport 
@@ -451,78 +451,2053 @@
 .%0A *
-/%0A@Implements(Configuration.class)%0Apublic class ShadowConfiguration %7B%0A%0A
+ @deprecated This will be removed in Robolectric 3.4 - %7B@link Configuration%7D is pure Java so there is no need for a%0A * shadow to exist. The methods have been preserved but marked deprecated to prevent build breakages but in this%0A * version implementation has been modified to simply call through to the Framework code which may in some cases cause%0A * test failures due to the way the shadow diverged in behaviour from the Framework code. Some notes have been added%0A * to help you migrate in these cases.%0A *%0A * Some notes to help you migrate:-%0A *%0A * %3Col%3E%0A * %3Cli%3E%7B@link #setLocale%7D only exists in API 17+ so calling this on earlier APIs will fail with %7B@link NoSuchMethodException%7D%0A * %3Cli%3E%7B@link #setToDefaults()%7D overrides the frameworks natural defaults to set the flags for%0A *     %7B@link Configuration#screenLayout%7D to include %7B@link Configuration#SCREENLAYOUT_LONG_NO%7D and%0A *     %7B@link Configuration#SCREENLAYOUT_SIZE_NORMAL%7D%0A * %3Cli%3E%7B@link #overrideQualifiers%7D and %7B@link #getQualifiers()%7D have no effect and can be removed.%0A * %3C/ol%3E%0A */%0A@Deprecated%0A@Implements(Configuration.class)%0Apublic class ShadowConfiguration %7B%0A%0A  @RealObject%0A  private Configuration realConfiguration;%0A%0A  @Deprecated%0A  @Implementation%0A  public void setTo(Configuration o) %7B%0A    directlyOn(realConfiguration, Configuration.class).setTo(o);%0A  %7D%0A%0A  @Deprecated%0A  @Implementation%0A  public void setToDefaults() %7B%0A    directlyOn(realConfiguration, Configuration.class).setToDefaults();%0A  %7D%0A%0A  @Deprecated%0A  @Implementation%0A  public void setLocale( Locale l ) %7B%0A    directlyOn(realConfiguration, Configuration.class).setLocale(l);%0A  %7D%0A%0A  @Deprecated%0A  public void overrideQualifiers(String qualifiers) %7B%0A    // Never worked.%0A  %7D%0A%0A  /**%0A   * @deprecated  Use %7B@link RuntimeEnvironment#getQualifiers()%7D although there should be no reason to obtain this%0A   * since it is typically set in tests through %7B@link Config#qualifiers()%7D so you should use a constant in these cases.%0A   */%0A  @Deprecated%0A  public String getQualifiers() %7B%0A    return RuntimeEnvironment.getQualifiers();%0A  %7D
 %0A%7D%0A

Mark the common methods @Deprecated.