# This is a configuration file for ProGuard.
# http://proguard.sourceforge.net/index.html#manual/usage.html

# Some tests use thenThrow from Mockito which require information on
# checked exceptions.
-keepattributes Exceptions

# Keep all Fragments in this package, which are used by reflection.
-keep public class com.android.settings.** extends android.app.Fragment

# Keep all preference controllers needed by slice and DashboardFragment.
-keep class * extends com.android.settings.core.BasePreferenceController {
    *;
}

-keep class * extends com.android.settings.core.TogglePreferenceController {
    *;
}

# We want to keep methods in Activity that could be used in the XML attribute onClick.
-keepclassmembers class * extends android.app.Activity {
    public void *(android.view.View);
    public void *(android.view.MenuItem);
}

# Keep setters in Views so that animations can still work.
-keep public class * extends android.view.View {
    public <init>(android.content.Context);
    public <init>(android.content.Context, android.util.AttributeSet);
    public <init>(android.content.Context, android.util.AttributeSet, int);

    void set*(***);
    *** get*();
}

# Keep classes that may be inflated from XML.
-keepclasseswithmembers class * {
    public <init>(android.content.Context, android.util.AttributeSet);
}
-keepclasseswithmembers class * {
    public <init>(android.content.Context, android.util.AttributeSet, int);
}
-keepclasseswithmembers class * {
    public <init>(android.content.Context, android.util.AttributeSet, int, int);
}

# Keep annotated classes or class members.
-keep @android.support.annotation.Keep class *
-keepclassmembers class * {
    @android.support.annotation.Keep *;
}

# Keep specific fields used via reflection.
-keepclassmembers class * {
    public static ** SEARCH_INDEX_DATA_PROVIDER;
    public static ** SUMMARY_PROVIDER_FACTORY;
}
-keep class android.support.v4.app.CoreComponentFactory
