# Consumer proguard rules for nav-ui

# --- OkHttp ---
-dontwarn okhttp3.**
# A resource is loaded with a relative path so the package of this class must be preserved.
-keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase

# --- Picasso ---
-dontwarn com.squareup.okhttp.**

# --- Java ---
-dontwarn java.awt.Color

# --- ai.nextbillion.kits.directions.NBDirections ---
-dontwarn com.sun.xml.internal.ws.spi.db.BindingContextFactory

# --- com.amazonaws.util.json.JacksonFactory ---
-dontwarn com.fasterxml.jackson.core.**

-optimizationpasses 5

-dontusemixedcaseclassnames

-dontskipnonpubliclibraryclasses

-verbose

-dontskipnonpubliclibraryclassmembers

-dontpreverify

-keepattributes *Annotation*,InnerClasses

-keepattributes Signature

-keepattributes SourceFile,LineNumberTable

-optimizations !code/simplification/cast,!field/*,!class/merging/*


-keep public class * extends android.app.Activity {*;}
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class * extends android.app.backup.BackupAgentHelper
-keep public class * extends android.preference.Preference
-keep public class * extends android.view.View


-keep class android.support.** {*;}

-keep public class * extends android.support.v4.**
-keep public class * extends android.support.v7.**
-keep public class * extends android.support.annotation.**

-keep class **.R$* {*;}

-keepclasseswithmembernames class * {
    native <methods>;
}

-keepclassmembers class * extends android.app.Activity{
    public void *(android.view.View);
}

-keepclassmembers enum * {
    public static **[] values();
    public static ** valueOf(java.lang.String);
}

-keep public class * extends android.view.View{
    *** get*();
    void set*(***);
    public <init>(android.content.Context);
    public <init>(android.content.Context, android.util.AttributeSet);
    public <init>(android.content.Context, android.util.AttributeSet, int);
}

-keep class * implements android.os.Parcelable {
    public static final android.os.Parcelable$Creator *;
}

-keepclassmembers class * implements java.io.Serializable {
    static final long serialVersionUID;
    private static final java.io.ObjectStreamField[] serialPersistentFields;
    !static !transient <fields>;
    !private <fields>;
    !private <methods>;
    private void writeObject(java.io.ObjectOutputStream);
    private void readObject(java.io.ObjectInputStream);
    java.lang.Object writeReplace();
    java.lang.Object readResolve();
}

#keep all class name under the ai.nextbillion.navigation.ui.
-keep class ai.nextbillion.navigation.ui.**

#keep Listeners
-keep class ai.nextbillion.navigation.ui.**Listener {*;}
-keep class ai.nextbillion.navigation.ui.**Config$* {*;}
-keep class ai.nextbillion.navigation.ui.**Callback {*;}

#interface
-keep public abstract class ai.nextbillion.navigation.ui.** {*;}

#utils
-keep public class ai.nextbillion.navigation.ui.utils.StatusBarUtils {*;}

#Launcher
-keep public class ai.nextbillion.navigation.ui.NavigationLauncher {*;}

#Others
-keep class ai.nextbillion.navigation.ui.NavigationView {*;}
-keep public class ai.nextbillion.navigation.ui.map.NavNextbillionMap {*;}
-keep public class ai.nextbillion.navigation.ui.camera.* {*;}
-keep public class ai.nextbillion.navigation.ui.NBNavigation {*;}



# Generated keep rule for Lifecycle observer adapter.
-if class ai.nextbillion.navigation.ui.camera.NavigationCamera {
    <init>(...);
}
-keep class ai.nextbillion.navigation.ui.camera.NavigationCamera_LifecycleAdapter {
    <init>(...);
}

# Generated keep rule for Lifecycle observer adapter.
-if class ai.nextbillion.navigation.ui.route.NavigationMapRoute {
    <init>(...);
}
-keep class ai.nextbillion.navigation.ui.route.NavigationMapRoute_LifecycleAdapter {
    <init>(...);
}

# Generated keep rule for Lifecycle observer adapter.
-if class ai.nextbillion.navigation.ui.summary.SummaryBottomSheet {
    <init>(...);
}
-keep class ai.nextbillion.navigation.ui.summary.SummaryBottomSheet_LifecycleAdapter {
    <init>(...);
}

# Generated keep rule for Lifecycle observer adapter.
-if class ai.nextbillion.navigation.ui.view.GpsSearchingNoticeView {
    <init>(...);
}
-keep class ai.nextbillion.navigation.ui.view.GpsSearchingNoticeView_LifecycleAdapter {
    <init>(...);
}

# Generated keep rule for Lifecycle observer adapter.
-if class ai.nextbillion.navigation.ui.instruction.InstructionView {
    <init>(...);
}
-keep class ai.nextbillion.navigation.ui.instruction.InstructionView_LifecycleAdapter {
    <init>(...);
}


