导航菜单

页面标题

页面副标题

管控平台 v5.2.3.0. - BatteryActivity.java 源代码

正在查看: 管控平台 v5.2.3.0. 应用的 BatteryActivity.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.iflytek.mdmservice.ui;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
import androidx.annotation.Nullable;
import com.iflytek.mdmservice.R$id;
import com.iflytek.mdmservice.R$layout;
import com.iflytek.mdmservice.R$string;
import org.greenrobot.eventbus.ThreadMode;

public class BatteryActivity extends Activity {

    private TextView f550a;

    private TextView f551b;

    private void b() {
        if (com.iflytek.mdmservice.utils.h.c(this)) {
            finish();
            return;
        }
        int b2 = com.iflytek.mdmservice.utils.h.b(this);
        if (b2 < 1 || b2 > 100) {
            finish();
        } else {
            this.f550a.setText(getString(R$string.charge_tip, new Object[]{Integer.valueOf(b2)}));
            this.f551b.setOnClickListener(new View.OnClickListener() {
                @Override
                public final void onClick(View view) {
                    BatteryActivity.this.a(view);
                }
            });
        }
    }

    public void a(View view) {
        finish();
    }

    @org.greenrobot.eventbus.l(threadMode = ThreadMode.MAIN)
    public void onChargeEvent(com.iflytek.mdmservice.m.a aVar) {
        finish();
    }

    @Override
    protected void onCreate(@Nullable Bundle bundle) {
        super.onCreate(bundle);
        setContentView(R$layout.activity_battery);
        org.greenrobot.eventbus.c.c().o(this);
        this.f550a = (TextView) findViewById(R$id.tv_tip);
        this.f551b = (TextView) findViewById(R$id.tv_ok);
        b();
    }

    @Override
    protected void onDestroy() {
        org.greenrobot.eventbus.c.c().q(this);
        super.onDestroy();
    }

    @Override
    protected void onNewIntent(Intent intent) {
        super.onNewIntent(intent);
        b();
    }
}