导航菜单

页面标题

页面副标题

CleanTube v9.9.5 - Settings.java 源代码

正在查看: CleanTube v9.9.5 应用的 Settings.java JAVA 源代码文件

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


package com.sgebrelibanos.aderaser;

import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageButton;
import android.widget.TextView;
import androidx.appcompat.app.c;
import androidx.appcompat.widget.SwitchCompat;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.core.content.a;
import com.sgebrelibanos.aderaser.Settings;
import e.AbstractC0746a;
import kotlin.Metadata;
import o1.k;

@Metadata(d1 = {"\u0000\u001a\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b\u0002\u0010\u0003J\u0019\u0010\u0007\u001a\u00020\u00062\b\u0010\u0005\u001a\u0004\u0018\u00010\u0004H\u0014¢\u0006\u0004\b\u0007\u0010\b¨\u0006\t"}, d2 = {"Lcom/sgebrelibanos/aderaser/Settings;", "Landroidx/appcompat/app/c;", "<init>", "()V", "Landroid/os/Bundle;", "savedInstanceState", "Lc1/y;", "onCreate", "(Landroid/os/Bundle;)V", "app_release"}, k = 1, mv = {1, 7, 1}, xi = 48)
public final class Settings extends c {
    private static final void l0(SharedPreferences sharedPreferences, ConstraintLayout constraintLayout, TextView textView, Settings settings, TextView textView2, TextView textView3, TextView textView4, TextView textView5, TextView textView6, TextView textView7) {
        if (sharedPreferences.getBoolean("DARKMODE", false)) {
            constraintLayout.setBackgroundResource(2131099696);
            textView.setTextColor(a.b(settings.getApplicationContext(), 2131099699));
            textView2.setTextColor(a.b(settings.getApplicationContext(), 2131099699));
            textView3.setTextColor(a.b(settings.getApplicationContext(), 2131099699));
            textView4.setTextColor(a.b(settings.getApplicationContext(), 2131099699));
            textView5.setTextColor(a.b(settings.getApplicationContext(), 2131099699));
            textView6.setTextColor(a.b(settings.getApplicationContext(), 2131099699));
            textView7.setTextColor(a.b(settings.getApplicationContext(), 2131099699));
            return;
        }
        constraintLayout.setBackgroundResource(2131099699);
        textView.setTextColor(a.b(settings.getApplicationContext(), 2131099696));
        textView2.setTextColor(a.b(settings.getApplicationContext(), 2131099696));
        textView3.setTextColor(a.b(settings.getApplicationContext(), 2131099696));
        textView4.setTextColor(a.b(settings.getApplicationContext(), 2131099696));
        textView5.setTextColor(a.b(settings.getApplicationContext(), 2131099696));
        textView6.setTextColor(a.b(settings.getApplicationContext(), 2131099696));
        textView7.setTextColor(a.b(settings.getApplicationContext(), 2131099696));
    }

    private static final void m0(SwitchCompat switchCompat, SharedPreferences.Editor editor, Settings settings) {
        if (switchCompat.isChecked()) {
            editor.putBoolean("DARKMODE", true);
            editor.apply();
            switchCompat.setTrackTintList(AbstractC0746a.a(settings.getApplicationContext(), 2131099697));
            switchCompat.setThumbTintList(AbstractC0746a.a(settings.getApplicationContext(), 2131099699));
            return;
        }
        editor.putBoolean("DARKMODE", false);
        editor.apply();
        switchCompat.setTrackTintList(AbstractC0746a.a(settings.getApplicationContext(), 2131100078));
        switchCompat.setThumbTintList(AbstractC0746a.a(settings.getApplicationContext(), 2131099699));
    }

    private static final void n0(SwitchCompat switchCompat, SharedPreferences.Editor editor, Settings settings) {
        if (switchCompat.isChecked()) {
            editor.putBoolean("SPONSORBLOCK", true);
            editor.apply();
            switchCompat.setTrackTintList(AbstractC0746a.a(settings.getApplicationContext(), 2131099697));
            switchCompat.setThumbTintList(AbstractC0746a.a(settings.getApplicationContext(), 2131099699));
            return;
        }
        editor.putBoolean("SPONSORBLOCK", false);
        editor.apply();
        switchCompat.setTrackTintList(AbstractC0746a.a(settings.getApplicationContext(), 2131100078));
        switchCompat.setThumbTintList(AbstractC0746a.a(settings.getApplicationContext(), 2131099699));
    }

    public static final void o0(Settings settings, View view) {
        k.f(settings, "this$0");
        settings.startActivity(new Intent(settings, (Class<?>) MainActivity.class));
    }

    public static final void p0(SwitchCompat switchCompat, SharedPreferences.Editor editor, Settings settings, SharedPreferences sharedPreferences, ConstraintLayout constraintLayout, TextView textView, TextView textView2, TextView textView3, TextView textView4, TextView textView5, TextView textView6, TextView textView7, View view) {
        k.f(switchCompat, "$sponsorBlockToggle");
        k.f(settings, "this$0");
        n0(switchCompat, editor, settings);
        l0(sharedPreferences, constraintLayout, textView, settings, textView2, textView3, textView4, textView5, textView6, textView7);
    }

    public static final void q0(SwitchCompat switchCompat, SharedPreferences.Editor editor, Settings settings, SharedPreferences sharedPreferences, ConstraintLayout constraintLayout, TextView textView, TextView textView2, TextView textView3, TextView textView4, TextView textView5, TextView textView6, TextView textView7, View view) {
        k.f(switchCompat, "$darkModeToggle");
        k.f(settings, "this$0");
        m0(switchCompat, editor, settings);
        l0(sharedPreferences, constraintLayout, textView, settings, textView2, textView3, textView4, textView5, textView6, textView7);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(2131558437);
        final SharedPreferences sharedPreferences = getSharedPreferences("SETTINGS", 0);
        final SharedPreferences.Editor edit = sharedPreferences.edit();
        View findViewById = findViewById(2131361985);
        k.e(findViewById, "findViewById(R.id.darkModeToggle)");
        final SwitchCompat switchCompat = (SwitchCompat) findViewById;
        View findViewById2 = findViewById(2131362344);
        k.e(findViewById2, "findViewById(R.id.sponsorBlockToggle)");
        final SwitchCompat switchCompat2 = (SwitchCompat) findViewById2;
        View findViewById3 = findViewById(2131361900);
        k.e(findViewById3, "findViewById(R.id.backButton)");
        ImageButton imageButton = (ImageButton) findViewById3;
        boolean z3 = sharedPreferences.getBoolean("SPONSORBLOCK", false);
        boolean z4 = sharedPreferences.getBoolean("DARKMODE", false);
        final ConstraintLayout constraintLayout = (ConstraintLayout) findViewById(2131362225);
        final TextView textView = (TextView) findViewById(2131362297);
        final TextView textView2 = (TextView) findViewById(2131361983);
        final TextView textView3 = (TextView) findViewById(2131361982);
        final TextView textView4 = (TextView) findViewById(2131362342);
        final TextView textView5 = (TextView) findViewById(2131362341);
        final TextView textView6 = (TextView) findViewById(2131362296);
        final TextView textView7 = (TextView) findViewById(2131362420);
        l0(sharedPreferences, constraintLayout, textView, this, textView2, textView3, textView4, textView5, textView6, textView7);
        imageButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                Settings.o0(Settings.this, view);
            }
        });
        if (z3) {
            switchCompat2.setChecked(true);
        }
        if (z4) {
            switchCompat.setChecked(true);
        }
        n0(switchCompat2, edit, this);
        m0(switchCompat, edit, this);
        switchCompat2.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                Settings.p0(SwitchCompat.this, edit, this, sharedPreferences, constraintLayout, textView, textView2, textView3, textView4, textView5, textView6, textView7, view);
            }
        });
        switchCompat.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                Settings.q0(SwitchCompat.this, edit, this, sharedPreferences, constraintLayout, textView, textView2, textView3, textView4, textView5, textView6, textView7, view);
            }
        });
    }
}