QQ浏览器 v12.2.3.7053版本的 MD5 值为:8285ab3059e5c8b521a264dfbc5c3685
以下内容为反编译后的 H5VideoDlnaDeviceDialog.java 源代码,内容仅作参考
package com.tencent.mtt.video.internal.player.ui.floatelement;
import android.content.Context;
import android.content.DialogInterface;
import android.view.KeyEvent;
import android.view.View;
import android.view.WindowManager;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import com.tencent.luggage.wxa.lk.a;
import com.tencent.mtt.base.skin.MttResources;
import com.tencent.mtt.video.internal.player.ui.floatelement.H5VideoDlnaDeviceView;
import com.tencent.mtt.video.internal.utils.JumpUtils;
import com.tencent.mtt.view.dialog.QBDialogBase;
import com.tencent.mtt.view.layout.QBFrameLayout;
import com.tencent.qqlive.module.videoreport.collect.EventCollector;
public class H5VideoDlnaDeviceDialog extends QBDialogBase implements DialogInterface.OnKeyListener, View.OnClickListener {
QBFrameLayout f73020a;
H5VideoDlnaDialogController f73021b;
H5VideoDlnaDeviceView.OnDeviceItemClickListener f73022c;
H5VideoDlnaDeviceView f73023d;
public H5VideoDlnaDeviceDialog(Context context, H5VideoDlnaDialogController h5VideoDlnaDialogController) {
super(context);
requestWindowFeature(1);
this.f73021b = h5VideoDlnaDialogController;
c();
b();
}
private void b() {
WindowManager.LayoutParams attributes;
int i;
if (getContext().getResources().getConfiguration().orientation == 2) {
attributes = getWindow().getAttributes();
attributes.gravity = 80;
i = MttResources.s(a.CTRL_INDEX);
} else {
attributes = getWindow().getAttributes();
attributes.gravity = 80;
i = -1;
}
attributes.width = i;
getWindow().getDecorView().setPadding(0, 0, 0, 0);
getWindow().setAttributes(attributes);
}
private void c() {
this.f73020a = new QBFrameLayout(this.mContext);
this.f73020a.setBackgroundColor(-1);
this.f73023d = new H5VideoDlnaDeviceView(this.mContext, this);
H5VideoDlnaDeviceView.OnDeviceItemClickListener onDeviceItemClickListener = this.f73022c;
if (onDeviceItemClickListener != null) {
this.f73023d.setOnDeviceItemClickListener(onDeviceItemClickListener);
}
FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(-1, -2);
layoutParams.leftMargin = MttResources.s(16);
this.f73020a.addView(this.f73023d, layoutParams);
setContentView(this.f73020a, new LinearLayout.LayoutParams(-1, -2));
}
public H5VideoDlnaDeviceView a() {
return this.f73023d;
}
@Override
public void dismiss() {
this.f73021b.l();
super.dismiss();
}
@Override
public void onClick(View view) {
EventCollector.getInstance().onViewClickedBefore(view);
int id = view.getId();
if (id == 1) {
JumpUtils.a(this.mContext, "https://bbs.mb.qq.com/mobilefb/fbDetail?tid=56ee7329-d9d7-4296-929f-fe67ec6b101a&id=e316eba2-448b-49c4-a5a7-e5a780554e1f&ttype=1", false);
dismiss();
} else if (id == 2) {
this.f73021b.g();
} else if (id == 3) {
this.f73021b.h();
}
EventCollector.getInstance().onViewClicked(view);
}
@Override
public void onConfigChange() {
b();
}
@Override
public boolean onKey(DialogInterface dialogInterface, int i, KeyEvent keyEvent) {
if (i != 4) {
return false;
}
dismiss();
return true;
}
}