正在查看: Aptoide v9.22.5.3 应用的 PushNotificationsRequest.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Aptoide v9.22.5.3 应用的 PushNotificationsRequest.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package cm.aptoide.pt.dataprovider.ws.v3;
import android.content.SharedPreferences;
import android.text.TextUtils;
import cm.aptoide.pt.DeepLinkIntentReceiver;
import cm.aptoide.pt.dataprovider.interfaces.TokenInvalidator;
import cm.aptoide.pt.dataprovider.ws.BodyInterceptor;
import cm.aptoide.pt.networking.BodyInterceptorV3;
import cm.aptoide.pt.preferences.managed.ManagerPreferences;
import rx.e;
public class PushNotificationsRequest extends V3<GetPushNotificationsResponse> {
protected PushNotificationsRequest(BaseBody baseBody, BodyInterceptor<BaseBody> bodyInterceptor, TokenInvalidator tokenInvalidator) {
super("https://webservices.aptoide.com/webservices/3/", baseBody, bodyInterceptor, tokenInvalidator);
}
public static PushNotificationsRequest of(SharedPreferences sharedPreferences, String str, BodyInterceptor<BaseBody> bodyInterceptor, TokenInvalidator tokenInvalidator, int i, int i2, String str2) {
BaseBody baseBody = new BaseBody();
baseBody.put("oem_id", str);
baseBody.put("mode", BodyInterceptorV3.RESPONSE_MODE_JSON);
baseBody.put("limit", "1");
baseBody.put("lang", str2);
if (ManagerPreferences.isDebug(sharedPreferences)) {
String notificationType = ManagerPreferences.getNotificationType(sharedPreferences);
if (TextUtils.isEmpty(notificationType)) {
notificationType = "aptoide_tests";
}
baseBody.put("notification_type", notificationType);
} else {
baseBody.put("notification_type", "aptoide_vanilla");
}
baseBody.put(DeepLinkIntentReceiver.DeepLinksKeys.ID, String.valueOf(i2));
baseBody.put("aptoide_vercode", Integer.toString(i));
return new PushNotificationsRequest(baseBody, bodyInterceptor, tokenInvalidator);
}
@Override
public e<GetPushNotificationsResponse> loadDataFromNetwork(Service service, boolean z) {
return service.getPushNotifications(this.map, z);
}
}