CCIPTV PRO v3.0.9.1版本的 MD5 值为:e78d4d980447be4a9f823314f45bbf03
以下内容为反编译后的 RoutingActivity.java 源代码,内容仅作参考
package boxbr.apksrebrand.smarters.view.activity;
import android.animation.ObjectAnimator;
import android.annotation.SuppressLint;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.res.Resources;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Log;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import android.view.inputmethod.InputMethodManager;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.PopupWindow;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;
import androidx.constraintlayout.widget.ConstraintLayout;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import com.facebook.ads.AdError;
import com.iptvsmarters.cciptv.R;
import d.a.k.b;
import f.j.a.h.a;
import f.j.a.h.i.e;
import f.j.a.i.p.l;
import tv.danmaku.ijk.media.player.IjkMediaMeta;
public class RoutingActivity extends d.a.k.c {
public static f.j.a.k.d.a.a z;
@BindView
public ImageView iv_list_users;
@BindView
public ImageView iv_list_users_arrow;
@BindView
public ImageView iv_login_with_m3u;
@BindView
public ImageView iv_login_with_m3u_arrow;
@BindView
public ImageView iv_login_with_xtream_codes_api;
@BindView
public ImageView iv_login_with_xtream_codes_api_arrow;
@BindView
public ImageView iv_play_from_device;
@BindView
public ImageView iv_play_from_device_arrow;
@BindView
public ImageView iv_play_single_stream;
@BindView
public ImageView iv_play_single_stream_arrow;
public Context r = this;
@BindView
public RelativeLayout rl_list_users;
@BindView
public RelativeLayout rl_login_with_m3u;
@BindView
public RelativeLayout rl_login_with_xtream_codes_api;
@BindView
public RelativeLayout rl_play_from_device;
@BindView
public RelativeLayout rl_play_single_stream;
public Dialog s;
public long t;
@BindView
public TextView tv_link2;
@BindView
public TextView tv_list_users;
@BindView
public TextView tv_login_with_m3u;
@BindView
public TextView tv_login_with_xtream_codes_api;
@BindView
public TextView tv_play_from_device;
@BindView
public TextView tv_play_single_stream;
public RelativeLayout u;
public RelativeLayout v;
public RelativeLayout w;
public TextView x;
public d.a.k.b y;
public class a implements TextView.OnEditorActionListener {
public a(RoutingActivity routingActivity) {
}
@Override
public boolean onEditorAction(TextView textView, int i2, KeyEvent keyEvent) {
if (i2 == 6) {
((InputMethodManager) textView.getContext().getSystemService("input_method")).hideSoftInputFromWindow(textView.getWindowToken(), 0);
return true;
}
return false;
}
}
public class b implements View.OnClickListener {
public b() {
}
@Override
public void onClick(View view) {
try {
Intent intent = new Intent("android.intent.action.VIEW");
intent.setData(Uri.parse("https://www.iptvsmarters.com/terms-and-conditions/"));
RoutingActivity.this.startActivity(intent);
} catch (Exception unused) {
Toast.makeText(RoutingActivity.this.getApplicationContext(), "Your Device Not Supported !!", 1).show();
}
}
}
public class c extends WebViewClient {
public c() {
}
@Override
public void onPageFinished(WebView webView, String str) {
RoutingActivity.this.u.setVisibility(0);
RoutingActivity.this.v.setVisibility(0);
}
}
public class d implements View.OnClickListener {
public d() {
}
@Override
@SuppressLint({"ApplySharedPref"})
public void onClick(View view) {
RoutingActivity.this.getSharedPreferences("Accept_clicked", 0).edit().putString("Accept_clicked", "true").apply();
RoutingActivity.this.s.dismiss();
}
}
public class e implements View.OnClickListener {
public e() {
}
@Override
@SuppressLint({"ApplySharedPref"})
public void onClick(View view) {
RoutingActivity.this.finishAffinity();
}
}
public class f implements DialogInterface.OnDismissListener {
public f(RoutingActivity routingActivity) {
}
@Override
public void onDismiss(DialogInterface dialogInterface) {
}
}
public class g implements a.g {
public g(RoutingActivity routingActivity, String[] strArr) {
}
}
public class h implements View.OnClickListener {
public h() {
}
@Override
public void onClick(View view) {
try {
Intent intent = new Intent("android.settings.APPLICATION_DETAILS_SETTINGS");
intent.setData(Uri.fromParts("package", RoutingActivity.this.getPackageName(), null));
RoutingActivity.this.startActivityForResult(intent, 101);
Toast.makeText(RoutingActivity.this.r, RoutingActivity.this.r.getResources().getString(R.string.grant_the_permission), 1).show();
} catch (Exception unused) {
}
RoutingActivity.this.y.dismiss();
}
}
public class i implements View.OnClickListener {
public i() {
}
@Override
public void onClick(View view) {
RoutingActivity.this.y.dismiss();
}
}
public class j implements View.OnClickListener {
public final EditText b;
public j(EditText editText) {
this.b = editText;
}
@Override
public void onClick(View view) {
Context applicationContext;
Resources resources;
int i2;
Intent intent;
String trim = this.b.getText().toString().trim();
String substring = trim.substring(trim.lastIndexOf("/") + 1);
if (TextUtils.isEmpty(trim)) {
applicationContext = RoutingActivity.this.getApplicationContext();
resources = RoutingActivity.this.getResources();
i2 = R.string.please_enter_url;
} else if (!trim.contains("https") && (!trim.contains("http") || !trim.contains("//") || !trim.contains(".") || !trim.contains("/") || !trim.contains(":") || !substring.contains("."))) {
applicationContext = RoutingActivity.this.getApplicationContext();
resources = RoutingActivity.this.getResources();
i2 = R.string.please_enter_correct_url_format;
} else if (!trim.endsWith(".com") && (trim.startsWith("https") || trim.startsWith("http"))) {
if (RoutingActivity.this.r != null) {
f.j.a.k.d.a.a unused = RoutingActivity.z = new f.j.a.k.d.a.a(RoutingActivity.this.r);
if (RoutingActivity.z.t() == 3) {
RoutingActivity.z.I(RoutingActivity.this.r.getResources().getString(R.string.hardware_decoder));
intent = new Intent(RoutingActivity.this.r, HoneyPlayer.class);
} else {
intent = new Intent(RoutingActivity.this.r, HoneyPlayer.class);
}
intent.putExtra(IjkMediaMeta.IJKM_KEY_TYPE, "loadurl");
intent.putExtra("VIDEO_NUM", 0);
intent.putExtra("VIDEO_PATH", trim);
RoutingActivity.this.r.startActivity(intent);
return;
}
return;
} else {
applicationContext = RoutingActivity.this.getApplicationContext();
resources = RoutingActivity.this.getResources();
i2 = R.string.can_not_play;
}
Toast.makeText(applicationContext, resources.getString(i2), 1).show();
}
}
public class k implements View.OnFocusChangeListener {
public final View b;
public k(View view) {
this.b = view;
}
public final void a(boolean z) {
if (z) {
ObjectAnimator ofFloat = ObjectAnimator.ofFloat(this.b, "alpha", z ? 0.6f : 0.5f);
ofFloat.setDuration(150L);
ofFloat.start();
}
}
public final void b(float f2) {
ObjectAnimator ofFloat = ObjectAnimator.ofFloat(this.b, "scaleX", f2);
ofFloat.setDuration(150L);
ofFloat.start();
}
public final void c(float f2) {
ObjectAnimator ofFloat = ObjectAnimator.ofFloat(this.b, "scaleY", f2);
ofFloat.setDuration(150L);
ofFloat.start();
}
@Override
@SuppressLint({"ResourceType"})
public void onFocusChange(View view, boolean z) {
RelativeLayout relativeLayout;
ImageView imageView;
RelativeLayout relativeLayout2;
ImageView imageView2;
if (z) {
try {
if (this.b != null && this.b.getTag() != null && this.b.getTag().equals("rl_login_with_m3u")) {
RoutingActivity.this.rl_login_with_m3u.setBackgroundResource(R.drawable.box_focused);
RoutingActivity.this.iv_login_with_m3u.setImageResource(R.drawable.icon1_focused);
RoutingActivity.this.tv_login_with_m3u.setTextColor(RoutingActivity.this.r.getResources().getColor(R.color.white));
imageView = RoutingActivity.this.iv_login_with_m3u_arrow;
} else if (this.b != null && this.b.getTag() != null && this.b.getTag().equals("rl_login_with_xtream_codes_api")) {
RoutingActivity.this.rl_login_with_xtream_codes_api.setBackgroundResource(R.drawable.box_focused);
RoutingActivity.this.iv_login_with_xtream_codes_api.setImageResource(R.drawable.icon3_focused);
RoutingActivity.this.tv_login_with_xtream_codes_api.setTextColor(RoutingActivity.this.r.getResources().getColor(R.color.white));
imageView = RoutingActivity.this.iv_login_with_xtream_codes_api_arrow;
} else if (this.b != null && this.b.getTag() != null && this.b.getTag().equals("rl_play_from_device")) {
RoutingActivity.this.rl_play_from_device.setBackgroundResource(R.drawable.box_focused);
RoutingActivity.this.iv_play_from_device.setImageResource(R.drawable.icon2_focused);
RoutingActivity.this.tv_play_from_device.setTextColor(RoutingActivity.this.r.getResources().getColor(R.color.white));
imageView = RoutingActivity.this.iv_play_from_device_arrow;
} else if (this.b != null && this.b.getTag() != null && this.b.getTag().equals("rl_play_single_stream")) {
RoutingActivity.this.rl_play_single_stream.setBackgroundResource(R.drawable.box_focused);
RoutingActivity.this.iv_play_single_stream.setImageResource(R.drawable.icon4_focused);
RoutingActivity.this.tv_play_single_stream.setTextColor(RoutingActivity.this.r.getResources().getColor(R.color.white));
imageView = RoutingActivity.this.iv_play_single_stream_arrow;
} else if (this.b == null || this.b.getTag() == null || !this.b.getTag().equals("rl_list_users")) {
if (this.b != null && this.b.getTag() != null && this.b.getTag().equals("rl_accept")) {
relativeLayout = RoutingActivity.this.u;
} else if (this.b == null || this.b.getTag() == null || !this.b.getTag().equals("rl_cancel")) {
if (this.b == null || this.b.getTag() == null || !this.b.getTag().equals("rl_play")) {
return;
}
RoutingActivity.this.w.setBackgroundResource(R.drawable.login_btn_focused);
RoutingActivity.this.x.setTextColor(RoutingActivity.this.r.getResources().getColor(R.color.white));
return;
} else {
relativeLayout = RoutingActivity.this.v;
}
relativeLayout.setBackgroundResource(R.drawable.box_focused);
return;
} else {
RoutingActivity.this.rl_list_users.setBackgroundResource(R.drawable.box_focused);
RoutingActivity.this.iv_list_users.setImageResource(R.drawable.login_icon2_focused);
RoutingActivity.this.tv_list_users.setTextColor(RoutingActivity.this.r.getResources().getColor(R.color.white));
imageView = RoutingActivity.this.iv_list_users_arrow;
}
imageView.setImageResource(R.drawable.white_arrow_right);
} catch (Exception e2) {
e2.printStackTrace();
}
} else if (z) {
} else {
float f2 = z ? 1.09f : 1.0f;
b(f2);
c(f2);
a(z);
View view2 = this.b;
if (view2 == null || view2.getTag() == null || !this.b.getTag().equals("rl_login_with_m3u")) {
View view3 = this.b;
if (view3 == null || view3.getTag() == null || !this.b.getTag().equals("rl_login_with_xtream_codes_api")) {
View view4 = this.b;
if (view4 == null || view4.getTag() == null || !this.b.getTag().equals("rl_play_from_device")) {
View view5 = this.b;
if (view5 == null || view5.getTag() == null || !this.b.getTag().equals("rl_play_single_stream")) {
View view6 = this.b;
if (view6 == null || view6.getTag() == null || !this.b.getTag().equals("rl_list_users")) {
View view7 = this.b;
if (view7 == null || view7.getTag() == null || !this.b.getTag().equals("rl_accept")) {
View view8 = this.b;
if (view8 == null || view8.getTag() == null || !this.b.getTag().equals("rl_cancel")) {
View view9 = this.b;
if (view9 == null || view9.getTag() == null || !this.b.getTag().equals("rl_play")) {
return;
}
RoutingActivity.this.w.setBackgroundResource(R.drawable.login_btn_unfocused);
RoutingActivity.this.x.setTextColor(RoutingActivity.this.r.getResources().getColor(R.color.black));
return;
}
relativeLayout2 = RoutingActivity.this.v;
} else {
relativeLayout2 = RoutingActivity.this.u;
}
relativeLayout2.setBackgroundResource(R.drawable.black_button_dark);
return;
}
RoutingActivity.this.rl_list_users.setBackgroundResource(R.drawable.box_unfocused);
RoutingActivity.this.iv_list_users.setImageResource(R.drawable.login_icon2_unfocused);
RoutingActivity routingActivity = RoutingActivity.this;
routingActivity.tv_list_users.setTextColor(routingActivity.r.getResources().getColor(R.color.black));
imageView2 = RoutingActivity.this.iv_list_users_arrow;
} else {
RoutingActivity.this.rl_play_single_stream.setBackgroundResource(R.drawable.box_unfocused);
RoutingActivity.this.iv_play_single_stream.setImageResource(R.drawable.icon4_unfocused);
RoutingActivity routingActivity2 = RoutingActivity.this;
routingActivity2.tv_play_single_stream.setTextColor(routingActivity2.r.getResources().getColor(R.color.black));
imageView2 = RoutingActivity.this.iv_play_single_stream_arrow;
}
} else {
RoutingActivity.this.rl_play_from_device.setBackgroundResource(R.drawable.box_unfocused);
RoutingActivity.this.iv_play_from_device.setImageResource(R.drawable.icon2_unfocused);
RoutingActivity routingActivity3 = RoutingActivity.this;
routingActivity3.tv_play_from_device.setTextColor(routingActivity3.r.getResources().getColor(R.color.black));
imageView2 = RoutingActivity.this.iv_play_from_device_arrow;
}
} else {
RoutingActivity.this.rl_login_with_xtream_codes_api.setBackgroundResource(R.drawable.box_unfocused);
RoutingActivity.this.iv_login_with_xtream_codes_api.setImageResource(R.drawable.icon3_unfocused);
RoutingActivity routingActivity4 = RoutingActivity.this;
routingActivity4.tv_login_with_xtream_codes_api.setTextColor(routingActivity4.r.getResources().getColor(R.color.black));
imageView2 = RoutingActivity.this.iv_login_with_xtream_codes_api_arrow;
}
} else {
RoutingActivity.this.rl_login_with_m3u.setBackgroundResource(R.drawable.box_unfocused);
RoutingActivity.this.iv_login_with_m3u.setImageResource(R.drawable.icon1_unfocused);
RoutingActivity routingActivity5 = RoutingActivity.this;
routingActivity5.tv_login_with_m3u.setTextColor(routingActivity5.r.getResources().getColor(R.color.black));
imageView2 = RoutingActivity.this.iv_login_with_m3u_arrow;
}
imageView2.setImageResource(R.drawable.black_arrow_right);
}
}
}
@SuppressLint({"SetJavaScriptEnabled"})
public final void W0() {
Dialog dialog;
int i2;
this.s = new Dialog(this, 16973840);
if (z.w().equals(f.j.a.h.i.a.i0)) {
dialog = this.s;
i2 = R.layout.activity_terms_condition_page_tv;
} else {
dialog = this.s;
i2 = R.layout.activity_terms_condition_page;
}
dialog.setContentView(i2);
this.s.setCancelable(false);
Window window = this.s.getWindow();
WindowManager.LayoutParams attributes = window.getAttributes();
attributes.gravity = 17;
window.setAttributes(attributes);
this.s.getWindow().setLayout(-1, -1);
this.s.show();
this.s.setCanceledOnTouchOutside(false);
this.u = (RelativeLayout) this.s.findViewById(R.id.rl_accept);
this.v = (RelativeLayout) this.s.findViewById(R.id.rl_cancel);
RelativeLayout relativeLayout = this.u;
relativeLayout.setOnFocusChangeListener(new k(relativeLayout));
RelativeLayout relativeLayout2 = this.v;
relativeLayout2.setOnFocusChangeListener(new k(relativeLayout2));
WebView webView = (WebView) this.s.findViewById(R.id.webview);
webView.getSettings().setJavaScriptEnabled(true);
webView.loadUrl("file:///android_asset/terms.html");
webView.setWebViewClient(new c());
this.u.setOnClickListener(new d());
this.v.setOnClickListener(new e());
this.s.setOnDismissListener(new f(this));
this.s.show();
}
public void X0() {
((ConstraintLayout) findViewById(R.id.main_layout)).setSystemUiVisibility(4871);
}
public void Y0() {
RelativeLayout relativeLayout = this.rl_login_with_m3u;
relativeLayout.setOnFocusChangeListener(new k(relativeLayout));
RelativeLayout relativeLayout2 = this.rl_login_with_xtream_codes_api;
relativeLayout2.setOnFocusChangeListener(new k(relativeLayout2));
RelativeLayout relativeLayout3 = this.rl_play_from_device;
relativeLayout3.setOnFocusChangeListener(new k(relativeLayout3));
RelativeLayout relativeLayout4 = this.rl_play_single_stream;
relativeLayout4.setOnFocusChangeListener(new k(relativeLayout4));
RelativeLayout relativeLayout5 = this.rl_list_users;
relativeLayout5.setOnFocusChangeListener(new k(relativeLayout5));
}
public boolean Z0() {
if (Build.VERSION.SDK_INT < 23) {
Log.v("TAG", "Permission is granted");
return true;
} else if (checkSelfPermission("android.permission.READ_EXTERNAL_STORAGE") == 0) {
Log.v("TAG", "Permission is granted");
return true;
} else {
Log.v("TAG", "Permission is revoked");
d.h.h.a.o(this, new String[]{"android.permission.READ_EXTERNAL_STORAGE"}, 101);
return false;
}
}
public void a1() {
f.j.a.h.a aVar = new f.j.a.h.a(this.r, new g(this, new String[]{""}));
if (Build.VERSION.SDK_INT >= 30) {
aVar.x("");
} else {
aVar.w("");
}
}
@Override
public void onActivityResult(int i2, int i3, Intent intent) {
if (i2 != 101) {
switch (i2) {
case AdError.NO_FILL_ERROR_CODE:
case AdError.LOAD_TOO_FREQUENTLY_ERROR_CODE:
case 1003:
case 1004:
default:
return;
}
} else {
Z0();
}
}
@Override
public void onBackPressed() {
if (this.t + 2000 > System.currentTimeMillis()) {
super.onBackPressed();
finishAffinity();
finish();
} else {
Toast.makeText(getBaseContext(), getResources().getString(R.string.press_back_to_exit), 0).show();
}
this.t = System.currentTimeMillis();
}
@Override
public void onCreate(Bundle bundle) {
this.r = this;
super.onCreate(bundle);
f.j.a.k.d.a.a aVar = new f.j.a.k.d.a.a(this.r);
z = aVar;
String w = aVar.w();
setContentView(f.j.a.h.i.a.D.booleanValue() ? w.equals(f.j.a.h.i.a.i0) ? R.layout.activity_routing_p_tv : R.layout.activity_routing_p : w.equals(f.j.a.h.i.a.i0) ? R.layout.activity_routing_tv : R.layout.activity_routing);
ButterKnife.a(this);
if (f.j.a.h.i.a.D.booleanValue() && !getSharedPreferences("Accept_clicked", 0).getString("Accept_clicked", "").equals("true")) {
W0();
}
X0();
Y0();
try {
this.tv_link2.setOnClickListener(new b());
} catch (Exception unused) {
}
}
@Override
public void onRequestPermissionsResult(int i2, String[] strArr, int[] iArr) {
if (i2 == 101) {
try {
if (iArr.length > 0 && iArr[0] == 0) {
Y0();
} else if (Build.VERSION.SDK_INT < 23 || shouldShowRequestPermissionRationale(strArr[0])) {
Toast.makeText(this, this.r.getResources().getString(R.string.access_denied), 0).show();
} else {
b.a aVar = new b.a(this, R.style.AlertDialogCustom);
View inflate = LayoutInflater.from(this).inflate(R.layout.permission_alertbox, (ViewGroup) null);
Button button = (Button) inflate.findViewById(R.id.btn_grant);
Button button2 = (Button) inflate.findViewById(R.id.btn_cancel);
button.setOnFocusChangeListener(new e.i(button, this));
button2.setOnFocusChangeListener(new e.i(button2, this));
button.requestFocus();
button.setOnClickListener(new h());
button2.setOnClickListener(new i());
aVar.r(inflate);
this.y = aVar.a();
WindowManager.LayoutParams layoutParams = new WindowManager.LayoutParams();
Window window = this.y.getWindow();
window.getClass();
layoutParams.copyFrom(window.getAttributes());
layoutParams.width = -1;
layoutParams.height = -2;
this.y.show();
this.y.getWindow().setAttributes(layoutParams);
this.y.setCancelable(false);
this.y.show();
}
} catch (Exception unused) {
}
}
}
@Override
public void onResume() {
super.onResume();
overridePendingTransition(R.anim.fade_out, R.anim.fade_in);
X0();
}
@OnClick
public void onViewClicked(View view) {
Intent intent;
switch (view.getId()) {
case R.id.rl_list_users:
on_click_list(view);
return;
case R.id.rl_login_with_m3u:
l.N("m3u", this.r);
intent = new Intent(this, LoginM3uActivity.class);
break;
case R.id.rl_login_with_xtream_codes_api:
l.N("api", this.r);
intent = new Intent(this, LoginActivity.class);
break;
case R.id.rl_play_from_device:
try {
if (z.w().equals(f.j.a.h.i.a.i0)) {
if (!Z0()) {
return;
}
a1();
} else if (!Z0()) {
return;
} else {
Intent intent2 = new Intent(this, Local_media_Activity.class);
overridePendingTransition(R.anim.fade_out, R.anim.fade_in);
startActivity(intent2);
finish();
}
return;
} catch (Exception unused) {
return;
}
case R.id.rl_play_single_stream:
single_stream_click(view);
return;
default:
return;
}
startActivity(intent);
overridePendingTransition(R.anim.fade_out, R.anim.fade_in);
}
public void on_click_list(View view) {
startActivity(new Intent(this, MultiUserActivity.class));
}
public void single_stream_click(View view) {
try {
LayoutInflater layoutInflater = (LayoutInflater) getSystemService("layout_inflater");
View inflate = z.w().equals(f.j.a.h.i.a.i0) ? layoutInflater.inflate(R.layout.single_stream_pop_up_window_tv, (ViewGroup) null) : layoutInflater.inflate(R.layout.single_stream_pop_up_window, (ViewGroup) null);
PopupWindow popupWindow = new PopupWindow(inflate, -1, -1, true);
popupWindow.showAtLocation(inflate, 16, 0, 0);
popupWindow.setTouchable(true);
popupWindow.setFocusable(true);
EditText editText = (EditText) inflate.findViewById(R.id.et_link);
this.w = (RelativeLayout) inflate.findViewById(R.id.rl_play);
this.x = (TextView) inflate.findViewById(R.id.tv_play);
this.w.setOnFocusChangeListener(new k(this.w));
this.x.setOnFocusChangeListener(new k(this.x));
this.w.setOnClickListener(new j(editText));
editText.setOnEditorActionListener(new a(this));
} catch (Exception e2) {
e2.printStackTrace();
}
}
}