55 lines
1.6 KiB
Java
55 lines
1.6 KiB
Java
package com.ubt.jimu.connect.view;
|
|
|
|
import android.app.Dialog;
|
|
import android.content.Context;
|
|
import android.graphics.drawable.ColorDrawable;
|
|
import android.os.Bundle;
|
|
import android.view.KeyEvent;
|
|
import android.widget.TextView;
|
|
import com.ubt.jimu.R;
|
|
|
|
/* loaded from: classes.dex */
|
|
public class FirmwareUpdateDialog extends Dialog {
|
|
private TextView a;
|
|
private TextView b;
|
|
|
|
public FirmwareUpdateDialog(Context context) {
|
|
super(context);
|
|
}
|
|
|
|
public void a(final String str, final int i) {
|
|
TextView textView = this.a;
|
|
if (textView == null) {
|
|
return;
|
|
}
|
|
textView.post(new Runnable() { // from class: com.ubt.jimu.connect.view.m
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
FirmwareUpdateDialog.this.a(i, str);
|
|
}
|
|
});
|
|
}
|
|
|
|
@Override // android.app.Dialog
|
|
protected void onCreate(Bundle bundle) {
|
|
super.onCreate(bundle);
|
|
getWindow().requestFeature(1);
|
|
setContentView(R.layout.dialog_firmware_update);
|
|
getWindow().setBackgroundDrawable(new ColorDrawable(0));
|
|
getWindow().setLayout(-1, -1);
|
|
setCanceledOnTouchOutside(false);
|
|
this.a = (TextView) findViewById(R.id.tvUpdateProgress);
|
|
this.b = (TextView) findViewById(R.id.tvCurrentFirmware);
|
|
}
|
|
|
|
@Override // android.app.Dialog, android.view.KeyEvent.Callback
|
|
public boolean onKeyDown(int i, KeyEvent keyEvent) {
|
|
return true;
|
|
}
|
|
|
|
public /* synthetic */ void a(int i, String str) {
|
|
this.a.setText(i + "%");
|
|
this.b.setText(str);
|
|
}
|
|
}
|