TopTV v3.0.1版本的 MD5 值为:0fc1b9ce94885bc92edd11a6ee3e5932
以下内容为反编译后的 RoutingActivity.java 源代码,内容仅作参考
package com.toptvone.toptviptvbox.view.activity;
import a.b.k.b;
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 c.k.a.g.d;
import c.k.a.g.n.e;
import com.amazonaws.mobileconnectors.cognitoauth.util.ClientConstants;
import com.amazonaws.services.s3.model.InstructionFileId;
import com.facebook.ads.AdError;
import com.toptvone.toptviptvbox.R;
import com.toptvone.toptviptvbox.model.database.SharepreferenceDBHandler;
import me.zhanghai.android.materialprogressbar.BuildConfig;
public class RoutingActivity extends a.b.k.c {
public static c.k.a.i.d.a.a f25646d;
public Context f25647e = this;
public Dialog f25648f;
public long f25649g;
public RelativeLayout f25650h;
public RelativeLayout f25651i;
@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 RelativeLayout f25652j;
public TextView f25653k;
public a.b.k.b f25654l;
@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;
@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 class a implements TextView.OnEditorActionListener {
public a() {
}
@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.f25650h.setVisibility(0);
RoutingActivity.this.f25651i.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.f25648f.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() {
}
@Override
public void onDismiss(DialogInterface dialogInterface) {
}
}
public class g implements d.g {
public final String[] f25661a;
public g(String[] strArr) {
this.f25661a = 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.f25647e, RoutingActivity.this.f25647e.getResources().getString(R.string.grant_the_permission), 1).show();
} catch (Exception unused) {
}
RoutingActivity.this.f25654l.dismiss();
}
}
public class i implements View.OnClickListener {
public i() {
}
@Override
public void onClick(View view) {
RoutingActivity.this.f25654l.dismiss();
}
}
public class j implements View.OnClickListener {
public final EditText f25665b;
public j(EditText editText) {
this.f25665b = editText;
}
@Override
public void onClick(View view) {
Context applicationContext;
Resources resources;
int i2;
Intent intent;
String trim = this.f25665b.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(ClientConstants.DOMAIN_SCHEME) && (!trim.contains("http") || !trim.contains("//") || !trim.contains(InstructionFileId.DOT) || !trim.contains("/") || !trim.contains(":") || !substring.contains(InstructionFileId.DOT))) {
applicationContext = RoutingActivity.this.getApplicationContext();
resources = RoutingActivity.this.getResources();
i2 = R.string.please_enter_correct_url_format;
} else if (!trim.endsWith(".com") && (trim.startsWith(ClientConstants.DOMAIN_SCHEME) || trim.startsWith("http"))) {
if (RoutingActivity.this.f25647e != null) {
c.k.a.i.d.a.a unused = RoutingActivity.f25646d = new c.k.a.i.d.a.a(RoutingActivity.this.f25647e);
if (RoutingActivity.f25646d.w() == 3) {
RoutingActivity.f25646d.Q(RoutingActivity.this.f25647e.getResources().getString(R.string.hardware_decoder));
intent = new Intent(RoutingActivity.this.f25647e, HoneyPlayer.class);
} else {
intent = new Intent(RoutingActivity.this.f25647e, HoneyPlayer.class);
}
intent.putExtra("type", "loadurl");
intent.putExtra("VIDEO_NUM", 0);
intent.putExtra("VIDEO_PATH", trim);
RoutingActivity.this.f25647e.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 f25667b;
public k(View view) {
this.f25667b = view;
}
public final void a(boolean z) {
if (z) {
ObjectAnimator ofFloat = ObjectAnimator.ofFloat(this.f25667b, "alpha", z ? 0.6f : 0.5f);
ofFloat.setDuration(150L);
ofFloat.start();
}
}
public final void b(float f2) {
ObjectAnimator ofFloat = ObjectAnimator.ofFloat(this.f25667b, "scaleX", f2);
ofFloat.setDuration(150L);
ofFloat.start();
}
public final void c(float f2) {
ObjectAnimator ofFloat = ObjectAnimator.ofFloat(this.f25667b, "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 {
View view2 = this.f25667b;
if (view2 == null || view2.getTag() == null || !this.f25667b.getTag().equals("rl_login_with_m3u")) {
View view3 = this.f25667b;
if (view3 == null || view3.getTag() == null || !this.f25667b.getTag().equals("rl_login_with_xtream_codes_api")) {
View view4 = this.f25667b;
if (view4 == null || view4.getTag() == null || !this.f25667b.getTag().equals("rl_play_from_device")) {
View view5 = this.f25667b;
if (view5 == null || view5.getTag() == null || !this.f25667b.getTag().equals("rl_play_single_stream")) {
View view6 = this.f25667b;
if (view6 == null || view6.getTag() == null || !this.f25667b.getTag().equals("rl_list_users")) {
View view7 = this.f25667b;
if (view7 == null || view7.getTag() == null || !this.f25667b.getTag().equals("rl_accept")) {
View view8 = this.f25667b;
if (view8 == null || view8.getTag() == null || !this.f25667b.getTag().equals("rl_cancel")) {
View view9 = this.f25667b;
if (view9 == null || view9.getTag() == null || !this.f25667b.getTag().equals("rl_play")) {
return;
}
RoutingActivity.this.f25652j.setBackgroundResource(R.drawable.login_btn_focused);
RoutingActivity.this.f25653k.setTextColor(RoutingActivity.this.f25647e.getResources().getColor(R.color.white));
return;
}
relativeLayout = RoutingActivity.this.f25651i;
} else {
relativeLayout = RoutingActivity.this.f25650h;
}
relativeLayout.setBackgroundResource(R.drawable.box_focused);
return;
}
RoutingActivity.this.rl_list_users.setBackgroundResource(R.drawable.box_focused);
RoutingActivity.this.iv_list_users.setImageResource(R.drawable.login_icon2_focused);
RoutingActivity routingActivity = RoutingActivity.this;
routingActivity.tv_list_users.setTextColor(routingActivity.f25647e.getResources().getColor(R.color.white));
imageView = RoutingActivity.this.iv_list_users_arrow;
} else {
RoutingActivity.this.rl_play_single_stream.setBackgroundResource(R.drawable.box_focused);
RoutingActivity.this.iv_play_single_stream.setImageResource(R.drawable.icon4_focused);
RoutingActivity routingActivity2 = RoutingActivity.this;
routingActivity2.tv_play_single_stream.setTextColor(routingActivity2.f25647e.getResources().getColor(R.color.white));
imageView = RoutingActivity.this.iv_play_single_stream_arrow;
}
} else {
RoutingActivity.this.rl_play_from_device.setBackgroundResource(R.drawable.box_focused);
RoutingActivity.this.iv_play_from_device.setImageResource(R.drawable.icon2_focused);
RoutingActivity routingActivity3 = RoutingActivity.this;
routingActivity3.tv_play_from_device.setTextColor(routingActivity3.f25647e.getResources().getColor(R.color.white));
imageView = RoutingActivity.this.iv_play_from_device_arrow;
}
} else {
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 routingActivity4 = RoutingActivity.this;
routingActivity4.tv_login_with_xtream_codes_api.setTextColor(routingActivity4.f25647e.getResources().getColor(R.color.white));
imageView = RoutingActivity.this.iv_login_with_xtream_codes_api_arrow;
}
} else {
RoutingActivity.this.rl_login_with_m3u.setBackgroundResource(R.drawable.box_focused);
RoutingActivity.this.iv_login_with_m3u.setImageResource(R.drawable.icon1_focused);
RoutingActivity routingActivity5 = RoutingActivity.this;
routingActivity5.tv_login_with_m3u.setTextColor(routingActivity5.f25647e.getResources().getColor(R.color.white));
imageView = RoutingActivity.this.iv_login_with_m3u_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 view10 = this.f25667b;
if (view10 == null || view10.getTag() == null || !this.f25667b.getTag().equals("rl_login_with_m3u")) {
View view11 = this.f25667b;
if (view11 == null || view11.getTag() == null || !this.f25667b.getTag().equals("rl_login_with_xtream_codes_api")) {
View view12 = this.f25667b;
if (view12 == null || view12.getTag() == null || !this.f25667b.getTag().equals("rl_play_from_device")) {
View view13 = this.f25667b;
if (view13 == null || view13.getTag() == null || !this.f25667b.getTag().equals("rl_play_single_stream")) {
View view14 = this.f25667b;
if (view14 == null || view14.getTag() == null || !this.f25667b.getTag().equals("rl_list_users")) {
View view15 = this.f25667b;
if (view15 == null || view15.getTag() == null || !this.f25667b.getTag().equals("rl_accept")) {
View view16 = this.f25667b;
if (view16 == null || view16.getTag() == null || !this.f25667b.getTag().equals("rl_cancel")) {
View view17 = this.f25667b;
if (view17 == null || view17.getTag() == null || !this.f25667b.getTag().equals("rl_play")) {
return;
}
RoutingActivity.this.f25652j.setBackgroundResource(R.drawable.login_btn_unfocused);
RoutingActivity.this.f25653k.setTextColor(RoutingActivity.this.f25647e.getResources().getColor(R.color.black));
return;
}
relativeLayout2 = RoutingActivity.this.f25651i;
} else {
relativeLayout2 = RoutingActivity.this.f25650h;
}
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 routingActivity6 = RoutingActivity.this;
routingActivity6.tv_list_users.setTextColor(routingActivity6.f25647e.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 routingActivity7 = RoutingActivity.this;
routingActivity7.tv_play_single_stream.setTextColor(routingActivity7.f25647e.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 routingActivity8 = RoutingActivity.this;
routingActivity8.tv_play_from_device.setTextColor(routingActivity8.f25647e.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 routingActivity9 = RoutingActivity.this;
routingActivity9.tv_login_with_xtream_codes_api.setTextColor(routingActivity9.f25647e.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 routingActivity10 = RoutingActivity.this;
routingActivity10.tv_login_with_m3u.setTextColor(routingActivity10.f25647e.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 B0() {
Dialog dialog;
int i2;
this.f25648f = new Dialog(this, 16973840);
if (f25646d.z().equals(c.k.a.g.n.a.s0)) {
dialog = this.f25648f;
i2 = R.layout.activity_terms_condition_page_tv;
} else {
dialog = this.f25648f;
i2 = R.layout.activity_terms_condition_page;
}
dialog.setContentView(i2);
this.f25648f.setCancelable(false);
Window window = this.f25648f.getWindow();
WindowManager.LayoutParams attributes = window.getAttributes();
attributes.gravity = 17;
window.setAttributes(attributes);
this.f25648f.getWindow().setLayout(-1, -1);
this.f25648f.show();
this.f25648f.setCanceledOnTouchOutside(false);
this.f25650h = (RelativeLayout) this.f25648f.findViewById(R.id.rl_accept);
this.f25651i = (RelativeLayout) this.f25648f.findViewById(R.id.rl_cancel);
RelativeLayout relativeLayout = this.f25650h;
relativeLayout.setOnFocusChangeListener(new k(relativeLayout));
RelativeLayout relativeLayout2 = this.f25651i;
relativeLayout2.setOnFocusChangeListener(new k(relativeLayout2));
WebView webView = (WebView) this.f25648f.findViewById(R.id.webview);
webView.getSettings().setJavaScriptEnabled(true);
webView.loadUrl("file:///android_asset/terms.html");
webView.setWebViewClient(new c());
this.f25650h.setOnClickListener(new d());
this.f25651i.setOnClickListener(new e());
this.f25648f.setOnDismissListener(new f());
this.f25648f.show();
}
public void C0() {
((ConstraintLayout) findViewById(R.id.main_layout)).setSystemUiVisibility(4871);
}
public void D0() {
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 E0() {
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");
a.i.h.a.q(this, new String[]{"android.permission.READ_EXTERNAL_STORAGE"}, 101);
return false;
}
}
public void F0() {
c.k.a.g.d dVar = new c.k.a.g.d(this.f25647e, new g(new String[]{BuildConfig.FLAVOR}));
if (Build.VERSION.SDK_INT >= 30) {
dVar.w(BuildConfig.FLAVOR);
} else {
dVar.v(BuildConfig.FLAVOR);
}
}
@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 {
E0();
}
}
@Override
public void onBackPressed() {
if (this.f25649g + 2000 > System.currentTimeMillis()) {
super.onBackPressed();
finishAffinity();
finish();
} else {
try {
Toast.makeText(getBaseContext(), getResources().getString(R.string.press_back_to_exit), 0).show();
} catch (Exception unused) {
}
}
this.f25649g = System.currentTimeMillis();
}
@Override
public void onCreate(Bundle bundle) {
this.f25647e = this;
super.onCreate(bundle);
c.k.a.i.d.a.a aVar = new c.k.a.i.d.a.a(this.f25647e);
f25646d = aVar;
String z = aVar.z();
setContentView(c.k.a.g.n.a.M.booleanValue() ? z.equals(c.k.a.g.n.a.s0) ? R.layout.activity_routing_p_tv : R.layout.activity_routing_p : z.equals(c.k.a.g.n.a.s0) ? R.layout.activity_routing_tv : R.layout.activity_routing);
ButterKnife.a(this);
if (c.k.a.g.n.a.M.booleanValue() && !getSharedPreferences("Accept_clicked", 0).getString("Accept_clicked", BuildConfig.FLAVOR).equals("true")) {
B0();
}
C0();
D0();
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) {
D0();
} else if (Build.VERSION.SDK_INT < 23 || shouldShowRequestPermissionRationale(strArr[0])) {
Toast.makeText(this, this.f25647e.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.setView(inflate);
this.f25654l = aVar.create();
WindowManager.LayoutParams layoutParams = new WindowManager.LayoutParams();
Window window = this.f25654l.getWindow();
window.getClass();
layoutParams.copyFrom(window.getAttributes());
layoutParams.width = -1;
layoutParams.height = -2;
this.f25654l.show();
this.f25654l.getWindow().setAttributes(layoutParams);
this.f25654l.setCancelable(false);
this.f25654l.show();
}
} catch (Exception unused) {
}
}
}
@Override
public void onResume() {
super.onResume();
overridePendingTransition(R.anim.fade_out, R.anim.fade_in);
C0();
}
@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:
SharepreferenceDBHandler.O("m3u", this.f25647e);
intent = new Intent(this, LoginM3uActivity.class);
break;
case R.id.rl_login_with_xtream_codes_api:
SharepreferenceDBHandler.O("api", this.f25647e);
intent = new Intent(this, LoginActivity.class);
break;
case R.id.rl_play_from_device:
try {
if (f25646d.z().equals(c.k.a.g.n.a.s0)) {
if (!E0()) {
return;
}
F0();
} else if (!E0()) {
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 = f25646d.z().equals(c.k.a.g.n.a.s0) ? 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.f25652j = (RelativeLayout) inflate.findViewById(R.id.rl_play);
this.f25653k = (TextView) inflate.findViewById(R.id.tv_play);
RelativeLayout relativeLayout = this.f25652j;
relativeLayout.setOnFocusChangeListener(new k(relativeLayout));
TextView textView = this.f25653k;
textView.setOnFocusChangeListener(new k(textView));
this.f25652j.setOnClickListener(new j(editText));
editText.setOnEditorActionListener(new a());
} catch (Exception e2) {
e2.printStackTrace();
}
}
}