正在查看: Chaupal v3.2 应用的 WelcomeVideoActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Chaupal v3.2 应用的 WelcomeVideoActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.yupptv.ott.activity;
import android.media.MediaPlayer;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.VideoView;
import androidx.appcompat.app.e;
import com.yupptv.ott.OTTApplication;
public class WelcomeVideoActivity extends e {
private VideoView a;
private TextView c;
private ImageView d;
private int e = 0;
private boolean f = false;
class a implements View.OnClickListener {
a() {
}
@Override
public void onClick(View view) {
WelcomeVideoActivity.this.f = true;
WelcomeVideoActivity.this.a.stopPlayback();
WelcomeVideoActivity.this.a = null;
WelcomeVideoActivity.this.setResult(-1);
WelcomeVideoActivity.this.finish();
}
}
class b implements View.OnClickListener {
b() {
}
@Override
public void onClick(View view) {
WelcomeVideoActivity.this.f = true;
WelcomeVideoActivity.this.a.stopPlayback();
WelcomeVideoActivity.this.a = null;
WelcomeVideoActivity.this.setResult(-1);
WelcomeVideoActivity.this.finish();
}
}
class c implements MediaPlayer.OnCompletionListener {
c() {
}
@Override
public void onCompletion(MediaPlayer mediaPlayer) {
WelcomeVideoActivity.this.setResult(-1);
WelcomeVideoActivity.this.finish();
}
}
class d implements MediaPlayer.OnPreparedListener {
d() {
}
@Override
public void onPrepared(MediaPlayer mediaPlayer) {
}
}
public void W() {
this.a.setVisibility(0);
this.a.setKeepScreenOn(true);
this.a.setVideoURI(Uri.parse("android.resource://" + getPackageName() + "/2131886084"));
hd.a.a.c(OTTApplication.o()).getWelcomeVideoUrl();
this.a.setOnCompletionListener(new c());
this.a.setOnPreparedListener(new d());
this.a.start();
}
public void onBackPressed() {
setResult(-1);
finish();
}
public void onCreate(Bundle bundle) {
super/*androidx.fragment.app.h*/.onCreate(bundle);
setContentView(2131624534);
this.a = (VideoView) findViewById(2131430003);
TextView textView = (TextView) findViewById(2131429538);
this.c = textView;
textView.setVisibility(8);
ImageView imageView = (ImageView) findViewById(2131427793);
this.d = imageView;
imageView.setVisibility(0);
W();
this.c.setOnClickListener(new a());
this.d.setOnClickListener(new b());
}
protected void onPause() {
super/*androidx.fragment.app.h*/.onPause();
VideoView videoView = this.a;
if (videoView == null || !videoView.isPlaying()) {
return;
}
this.e = this.a.getCurrentPosition();
this.a.pause();
}
protected void onResume() {
super/*androidx.fragment.app.h*/.onResume();
VideoView videoView = this.a;
if (videoView == null || this.f) {
return;
}
videoView.seekTo(this.e);
this.a.start();
}
protected void onStart() {
super.onStart();
VideoView videoView = this.a;
if (videoView == null || this.f) {
return;
}
videoView.seekTo(this.e);
this.a.start();
}
protected void onStop() {
super.onStop();
VideoView videoView = this.a;
if (videoView == null || !videoView.isPlaying()) {
return;
}
this.e = this.a.getCurrentPosition();
this.a.pause();
}
}