Swiggy v4.51.1版本的 MD5 值为:5af7ec91512a0a8c1510e3f8bac20b8b
以下内容为反编译后的 a.java 源代码,内容仅作参考
package in.swiggy.android.feature.rating;
import android.content.SharedPreferences;
import com.rudderstack.android.sdk.core.ecomm.ECommerceParamNames;
import in.swiggy.android.tejas.feature.edm.model.EdmRatingType;
import kotlin.jvm.internal.o;
import kotlin.text.q;
import okhttp3.HttpUrl;
public final class a {
public static final EdmRatingType a(String str) {
o.k(str, "<this>");
if (o.f("delivery", str)) {
return EdmRatingType.delivery;
}
return EdmRatingType.restaurant;
}
public static final String b(SharedPreferences sharedPreferences) {
o.k(sharedPreferences, "<this>");
String string = sharedPreferences.getString("android_rating_web_page_url", "https://www.swiggy.com/rate/{orderId}");
if (string == null) {
return "https://www.swiggy.com/rate/{orderId}";
}
return string;
}
public static final String c(SharedPreferences sharedPreferences, String orderId, EdmRatingType ratingType, int i, boolean z, String str, String str2) {
String J;
boolean C;
boolean C2;
o.k(sharedPreferences, "<this>");
o.k(orderId, "orderId");
o.k(ratingType, "ratingType");
HttpUrl.Companion companion = HttpUrl.Companion;
J = q.J(b(sharedPreferences), "{orderId}", orderId, false, 4, null);
HttpUrl.Builder addQueryParameter = companion.get(J).newBuilder().addQueryParameter("type", ratingType.name()).addQueryParameter(ECommerceParamNames.RATING, String.valueOf(i)).addQueryParameter("rateAll", String.valueOf(z));
if (str != null) {
C2 = q.C(str);
if (!C2) {
addQueryParameter.addQueryParameter("rating_source", str);
}
}
if (str2 != null) {
C = q.C(str2);
if (!C) {
addQueryParameter.addQueryParameter("title", str2);
}
}
return addQueryParameter.build().toString();
}
public static String d(SharedPreferences sharedPreferences, String str, EdmRatingType edmRatingType, int i, boolean z, String str2, String str3, int i2, Object obj) {
String str4;
String str5;
if ((i2 & 16) != 0) {
str4 = null;
} else {
str4 = str2;
}
if ((i2 & 32) != 0) {
str5 = null;
} else {
str5 = str3;
}
return c(sharedPreferences, str, edmRatingType, i, z, str4, str5);
}
}