正在查看: 050 IP Phone v2.3.0 应用的 VolumeSettingActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 050 IP Phone v2.3.0 应用的 VolumeSettingActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.ntt.voip.android.com050plus.setting;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.SeekBar;
import android.widget.Toast;
import com.oki_access.android.ims.call.BaseFragmentActivity;
import java.text.MessageFormat;
import k4.s;
import t4.p;
import t4.z;
public class VolumeSettingActivity extends BaseFragmentActivity {
private static int v0;
private static int w0;
private SeekBar X;
private SeekBar Y;
private Toast Z;
private Runnable s0;
private Runnable t0;
private int u0;
private s x;
private Handler y;
class a implements DialogInterface.OnCancelListener {
a() {
}
@Override
public void onCancel(DialogInterface dialogInterface) {
VolumeSettingActivity.this.Z.cancel();
}
}
class b implements View.OnClickListener {
b() {
}
@Override
public void onClick(View view) {
CheckBox checkBox = (CheckBox) VolumeSettingActivity.this.findViewById(2131296716);
checkBox.toggle();
VolumeSettingActivity.this.d0(checkBox.isChecked());
VolumeSettingActivity.this.findViewById(2131296714).setEnabled(!checkBox.isChecked());
}
}
class c implements View.OnClickListener {
c() {
}
@Override
public void onClick(View view) {
p.s(VolumeSettingActivity.this, 1, null);
}
}
class d implements View.OnClickListener {
d() {
}
@Override
public void onClick(View view) {
p.s(VolumeSettingActivity.this, 2, null);
}
}
class e implements Runnable {
e() {
}
@Override
public void run() {
VolumeSettingActivity.this.Z.cancel();
int i = VolumeSettingActivity.this.u0 + VolumeSettingActivity.w0;
if (i > 0) {
?? r22 = VolumeSettingActivity.this;
((VolumeSettingActivity) r22).Z = Toast.makeText((Context) r22, "+" + String.valueOf(i), 0);
} else {
?? r23 = VolumeSettingActivity.this;
((VolumeSettingActivity) r23).Z = Toast.makeText((Context) r23, String.valueOf(i), 0);
}
VolumeSettingActivity.this.Z.show();
}
}
class f implements SeekBar.OnSeekBarChangeListener {
f() {
}
@Override
public void onProgressChanged(SeekBar seekBar, int i, boolean z) {
if (z) {
VolumeSettingActivity.this.u0 = i;
VolumeSettingActivity.this.y.removeCallbacks(VolumeSettingActivity.this.s0);
VolumeSettingActivity.this.y.postDelayed(VolumeSettingActivity.this.s0, 50L);
}
}
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
}
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
}
}
class g implements Runnable {
g() {
}
@Override
public void run() {
VolumeSettingActivity.this.Z.cancel();
int i = VolumeSettingActivity.this.u0 + VolumeSettingActivity.w0;
if (i > 0) {
?? r22 = VolumeSettingActivity.this;
((VolumeSettingActivity) r22).Z = Toast.makeText((Context) r22, "+" + String.valueOf(i), 0);
} else {
?? r23 = VolumeSettingActivity.this;
((VolumeSettingActivity) r23).Z = Toast.makeText((Context) r23, String.valueOf(i), 0);
}
VolumeSettingActivity.this.Z.show();
}
}
class h implements SeekBar.OnSeekBarChangeListener {
h() {
}
@Override
public void onProgressChanged(SeekBar seekBar, int i, boolean z) {
if (z) {
VolumeSettingActivity.this.u0 = i;
VolumeSettingActivity.this.y.removeCallbacks(VolumeSettingActivity.this.t0);
VolumeSettingActivity.this.y.postDelayed(VolumeSettingActivity.this.t0, 50L);
}
}
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
}
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
}
}
class i implements DialogInterface.OnClickListener {
i() {
}
@Override
public void onClick(DialogInterface dialogInterface, int i) {
VolumeSettingActivity.this.Z.cancel();
}
}
class j implements DialogInterface.OnClickListener {
final int x;
j(int i) {
this.x = i;
}
@Override
public void onClick(DialogInterface dialogInterface, int i) {
int progress = (this.x == 1 ? VolumeSettingActivity.this.X : VolumeSettingActivity.this.Y).getProgress() + VolumeSettingActivity.w0;
if (this.x == 1) {
VolumeSettingActivity.this.x.w(65583, progress);
h4.d.i0(65583, progress);
Button button = (Button) VolumeSettingActivity.this.findViewById(2131296714);
if (progress == VolumeSettingActivity.this.x.f(65583)) {
button.setText(MessageFormat.format(VolumeSettingActivity.this.getString(2131886815), String.valueOf(progress)));
} else if (progress > 0) {
button.setText("+" + String.valueOf(progress));
} else {
button.setText(String.valueOf(progress));
}
} else {
VolumeSettingActivity.this.x.w(65584, progress);
h4.d.i0(65584, progress);
Button button2 = (Button) VolumeSettingActivity.this.findViewById(2131296715);
if (progress == VolumeSettingActivity.this.x.f(65584)) {
button2.setText(MessageFormat.format(VolumeSettingActivity.this.getString(2131886815), String.valueOf(progress)));
} else if (progress > 0) {
button2.setText("+" + String.valueOf(progress));
} else {
button2.setText(String.valueOf(progress));
}
}
VolumeSettingActivity.this.Z.cancel();
}
}
private Dialog b0(int i8, p pVar) {
LinearLayout linearLayout = new LinearLayout(this);
linearLayout.setOrientation(0);
linearLayout.setGravity(16);
linearLayout.setPadding(0, 20, 0, 20);
this.Z = Toast.makeText((Context) this, (CharSequence) "", 0);
ImageView imageView = new ImageView(this);
ImageView imageView2 = new ImageView(this);
imageView.setImageResource(i8 == 1 ? 2131230880 : 2131230882);
imageView2.setImageResource(i8 == 1 ? 2131230879 : 2131230881);
linearLayout.addView(imageView);
if (i8 == 1) {
SeekBar seekBar = new SeekBar(this);
this.X = seekBar;
seekBar.setMax(v0);
this.X.setLayoutParams(new LinearLayout.LayoutParams(-2, -2, 1.0f));
this.s0 = new e();
this.X.setOnSeekBarChangeListener(new f());
linearLayout.addView(this.X);
} else {
SeekBar seekBar2 = new SeekBar(this);
this.Y = seekBar2;
seekBar2.setMax(v0);
this.Y.setLayoutParams(new LinearLayout.LayoutParams(-2, -2, 1.0f));
this.t0 = new g();
this.Y.setOnSeekBarChangeListener(new h());
linearLayout.addView(this.Y);
}
linearLayout.addView(imageView2);
AlertDialog create = new AlertDialog.Builder(this).setTitle(i8 == 1 ? 2131886821 : 2131886822).setPositiveButton(2131887450, new j(i8)).setNeutralButton(2131886816, new i()).setView(linearLayout).create();
pVar.p(new a());
return create;
}
private boolean c0() {
return this.x.k(1114129) != 0;
}
public void d0(boolean z) {
if (z) {
this.x.w(1114129, 1);
h4.d.i0(1114129, 1);
} else {
this.x.w(1114129, 0);
h4.d.i0(1114129, 0);
}
}
@Override
public void B(int i8, Dialog dialog, Bundle bundle, p pVar) {
z.h("VolumeSettingActivity", "dialog");
if (i8 == 1) {
this.X.setProgress(this.x.k(65583) - w0);
} else if (i8 == 2) {
this.Y.setProgress(this.x.k(65584) - w0);
}
super.B(i8, dialog, bundle, pVar);
k4.i.d(this, dialog);
}
@Override
public void onCreate(Bundle bundle) {
z.a("VolumeSettingActivity", "onCreate");
super.onCreate(bundle);
this.x = new s(this, "spitz.call", 2);
this.y = new Handler(Looper.getMainLooper());
int intValue = Integer.valueOf(getString(2131886818)).intValue() - Integer.valueOf(getString(2131886819)).intValue();
v0 = intValue;
w0 = -(intValue - Integer.valueOf(getString(2131886818)).intValue());
setContentView(2131492955);
((CheckBox) findViewById(2131296716)).setChecked(c0());
((Button) findViewById(2131296713)).setOnClickListener(new b());
Button button = (Button) findViewById(2131296714);
button.setEnabled(!c0());
button.setOnClickListener(new c());
int f8 = this.x.f(65583);
int k = this.x.k(65583);
if (k == f8) {
button.setText(MessageFormat.format(getString(2131886815), String.valueOf(k)));
} else if (k > 0) {
button.setText("+" + String.valueOf(k));
} else {
button.setText(String.valueOf(k));
}
Button button2 = (Button) findViewById(2131296715);
button2.setOnClickListener(new d());
int f9 = this.x.f(65584);
int k8 = this.x.k(65584);
if (k8 == f9) {
button2.setText(MessageFormat.format(getString(2131886815), String.valueOf(k8)));
return;
}
if (k8 <= 0) {
button2.setText(String.valueOf(k8));
return;
}
button2.setText("+" + String.valueOf(k8));
}
@Override
protected void onDestroy() {
z.a("VolumeSettingActivity", "onDestroy");
super.onDestroy();
}
@Override
protected void onPause() {
z.a("VolumeSettingActivity", "onPause");
super.onPause();
}
@Override
protected void onRestart() {
z.a("VolumeSettingActivity", "onRestart");
super.onRestart();
}
@Override
protected void onResume() {
z.a("VolumeSettingActivity", "onResume");
super.onResume();
}
@Override
protected void onStart() {
z.a("VolumeSettingActivity", "onStart");
super.onStart();
}
@Override
protected void onStop() {
z.a("VolumeSettingActivity", "onStop");
super.onStop();
}
@Override
public Dialog y(int i8, Bundle bundle, p pVar) {
return i8 != 1 ? i8 != 2 ? super.y(i8, bundle, pVar) : b0(2, pVar) : b0(1, pVar);
}
}