正在查看: Chaupal v3.2 应用的 a.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Chaupal v3.2 应用的 a.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package wd;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.text.TextUtils;
import android.util.Log;
import in.startv.hotstar.hotstarlauncher.VersionNotSupportedException;
import java.security.GeneralSecurityException;
import java.util.HashMap;
import org.json.JSONObject;
public final class a {
private static final Integer l = e.a;
private Context a;
private String b;
private String c;
private String d;
private String e;
private String f;
private String g;
private String h;
private int i;
private HashMap<String, String> j;
private String k;
public a(Context context) {
this.a = context;
try {
this.k = c.d(f.a());
this.g = context.getPackageName();
} catch (GeneralSecurityException e) {
Log.d("HotstarLauncher", e.getMessage());
}
}
private final String a() {
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("programId", this.b);
jSONObject.put("contentId", this.c);
jSONObject.put("userEmail", this.d);
jSONObject.put("userId", this.e);
jSONObject.put("subscriptionType", String.valueOf(this.i));
jSONObject.put("launchType", this.f);
jSONObject.put("packageName", this.g);
jSONObject.put("episodeNo", this.h);
HashMap<String, String> hashMap = this.j;
if (hashMap != null && hashMap.size() > 0) {
JSONObject jSONObject2 = new JSONObject();
for (String str : this.j.keySet()) {
jSONObject2.put(str, this.j.get(str));
}
jSONObject.put("metadata", jSONObject2);
}
return c.a(this.k, jSONObject.toString());
} catch (Exception e) {
Log.d("HotstarLauncher", e.getLocalizedMessage());
e.printStackTrace();
return null;
}
}
private boolean b() {
if (TextUtils.isEmpty(this.f)) {
return false;
}
return this.f.equals("LIVE") || this.f.equals("LIVE_DELAYED") || this.f.equals("VOD");
}
public final void c() {
if (TextUtils.isEmpty(this.f)) {
Context context = this.a;
int i = b.d;
Log.d("HotstarLauncher", context.getString(i));
throw new IllegalArgumentException(this.a.getString(i));
}
Context context2 = this.a;
if (context2 == null) {
int i2 = b.b;
Log.d("HotstarLauncher", context2.getString(i2));
throw new IllegalArgumentException(this.a.getString(i2));
}
Intent intent = new Intent("android.intent.action.VIEW", Uri.parse("https://play.google.com/store/apps/details?id=in.startv.hotstar&referrer=utm_source=" + this.a.getPackageName()));
if (intent.resolveActivity(this.a.getPackageManager()) != null) {
this.a.startActivity(intent);
} else {
Log.d("HotstarLauncher", this.a.getString(b.a));
throw new ActivityNotFoundException();
}
}
public final void d(String str) {
this.c = str;
}
public void e(String str) {
this.f = str;
}
public void f(HashMap<String, String> hashMap) {
this.j = hashMap;
}
public final void g(String str) {
this.d = str;
}
public final void h(String str) {
this.e = str;
}
public final void i() {
Context context = this.a;
if (context == null) {
int i = b.b;
Log.d("HotstarLauncher", context.getString(i));
throw new IllegalArgumentException(this.a.getString(i));
}
if (TextUtils.isEmpty(this.b) && TextUtils.isEmpty(this.c)) {
Context context2 = this.a;
int i2 = b.e;
Log.d("HotstarLauncher", context2.getString(i2));
throw new IllegalArgumentException(this.a.getString(i2));
}
if (!b()) {
Context context3 = this.a;
int i3 = b.d;
Log.d("HotstarLauncher", context3.getString(i3));
throw new IllegalArgumentException(this.a.getString(i3));
}
if (TextUtils.isEmpty(this.g)) {
Context context4 = this.a;
int i4 = b.c;
Log.d("HotstarLauncher", context4.getString(i4));
throw new IllegalArgumentException(this.a.getString(i4));
}
Intent intent = new Intent();
intent.setAction("in.startv.hotstar.action.WATCH");
intent.putExtra("HOTSTAR_LAUNCH_INFO", a());
intent.putExtra("SALT", this.k);
intent.setFlags(268468224);
if (intent.resolveActivity(this.a.getPackageManager()) == null) {
c();
return;
}
Context context5 = this.a;
Integer num = l;
if (!d.a(context5, num)) {
this.a.startActivity(intent);
return;
}
Log.d("HotstarLauncher", "Hotstar version should be " + num + " or above");
throw new VersionNotSupportedException("Hotstar version should be " + num + " or above");
}
}