导航菜单

页面标题

页面副标题

xDrip+ v04633772025.07.16 - LicenseAgreementActivity.java 源代码

正在查看: xDrip+ v04633772025.07.16 应用的 LicenseAgreementActivity.java JAVA 源代码文件

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


package com.eveningoutpost.dexdrip;

import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;
import com.eveningoutpost.dexdrip.models.JoH;
import com.google.android.gms.oss.licenses.OssLicensesMenuActivity;

public class LicenseAgreementActivity extends BaseAppCompatActivity {
    boolean IUnderstand;
    CheckBox agreeCheckBox;
    SharedPreferences prefs;
    Button saveButton;

    @Override
    protected void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        SharedPreferences defaultSharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
        this.prefs = defaultSharedPreferences;
        this.IUnderstand = defaultSharedPreferences.getBoolean("I_understand", false);
        try {
            setContentView(2131492923);
            JoH.fixActionBar(this);
            findViewById(2131296636).setAlpha(0.5f);
            CheckBox checkBox = (CheckBox) findViewById(2131296352);
            this.agreeCheckBox = checkBox;
            checkBox.setChecked(this.IUnderstand);
            this.saveButton = (Button) findViewById(2131296923);
            addListenerOnButton();
        } catch (UnsupportedOperationException unused) {
            JoH.static_toast_long("Unable to display license agreement? blocked by user? Cannot continue");
            finish();
        }
    }

    public void viewGoogleLicenses(View view) {
        startActivity(new Intent(this, (Class<?>) OssLicensesMenuActivity.class));
    }

    public void viewWarning(View view) {
        startActivity(new Intent(getApplicationContext(), (Class<?>) Agreement.class));
    }

    public void addListenerOnButton() {
        this.saveButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                LicenseAgreementActivity.this.prefs.edit().putBoolean("I_understand", LicenseAgreementActivity.this.agreeCheckBox.isChecked()).apply();
                LicenseAgreementActivity.this.startActivity(new Intent(LicenseAgreementActivity.this.getApplicationContext(), (Class<?>) Home.class));
                LicenseAgreementActivity.this.finish();
            }
        });
    }
}