导航菜单

页面标题

页面副标题

Fancy Optimizer v4.6.3 - NotificationSettingActivity.java 源代码

正在查看: Fancy Optimizer v4.6.3 应用的 NotificationSettingActivity.java JAVA 源代码文件

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


package com.fancyclean.boost.main.ui.activity;

import android.app.Dialog;
import android.content.SharedPreferences;
import android.os.Bundle;
import androidx.annotation.NonNull;
import com.thinkyeah.common.ui.dialog.c;
import com.thinkyeah.common.ui.thinklist.a;
import com.thinkyeah.common.ui.view.TitleBar;
import f.g;
import g9.f;
import java.util.ArrayList;
import java.util.HashMap;
import jl.d;
import vj.h;

public class NotificationSettingActivity extends v7.a {
    public static final h o = h.f(NotificationSettingActivity.class);
    public jl.b l;
    public final a m = new a();
    public final g n = new g(this, 15);

    public class a implements a.c {
        public a() {
        }

        public final boolean a(int i, boolean z10) {
            return true;
        }

        public final void b(int i, boolean z10) {
            SharedPreferences.Editor edit;
            ?? r42 = NotificationSettingActivity.this;
            if (i == 101) {
                if (z10) {
                    SharedPreferences sharedPreferences = r42.getSharedPreferences("junk_clean", 0);
                    edit = sharedPreferences != null ? sharedPreferences.edit() : null;
                    if (edit != null) {
                        edit.putBoolean("is_remind_clean_junk_enabled", true);
                        edit.apply();
                    }
                } else {
                    SharedPreferences sharedPreferences2 = r42.getSharedPreferences("junk_clean", 0);
                    SharedPreferences.Editor edit2 = sharedPreferences2 == null ? null : sharedPreferences2.edit();
                    if (edit2 != null) {
                        edit2.putBoolean("is_remind_clean_junk_enabled", false);
                        edit2.apply();
                    }
                    tk.b.a().b("disable_junk_clean_reminder", (HashMap) null);
                }
                h hVar = NotificationSettingActivity.o;
                r42.X2();
                return;
            }
            if (i == 106) {
                if (z10) {
                    SharedPreferences sharedPreferences3 = f.b(r42).a.getSharedPreferences("notification_reminder", 0);
                    edit = sharedPreferences3 != null ? sharedPreferences3.edit() : null;
                    if (edit == null) {
                        return;
                    }
                    edit.putBoolean("apk_install_reminder_enabled", true);
                    edit.apply();
                    return;
                }
                SharedPreferences sharedPreferences4 = f.b(r42).a.getSharedPreferences("notification_reminder", 0);
                SharedPreferences.Editor edit3 = sharedPreferences4 == null ? null : sharedPreferences4.edit();
                if (edit3 != null) {
                    edit3.putBoolean("apk_install_reminder_enabled", false);
                    edit3.apply();
                }
                tk.b.a().b("disable_apk_install_reminder", (HashMap) null);
                return;
            }
            if (i != 107) {
                return;
            }
            if (z10) {
                SharedPreferences sharedPreferences5 = f.b(r42).a.getSharedPreferences("notification_reminder", 0);
                edit = sharedPreferences5 != null ? sharedPreferences5.edit() : null;
                if (edit == null) {
                    return;
                }
                edit.putBoolean("uninstalled_apps_enabled", true);
                edit.apply();
                return;
            }
            SharedPreferences sharedPreferences6 = f.b(r42).a.getSharedPreferences("notification_reminder", 0);
            SharedPreferences.Editor edit4 = sharedPreferences6 == null ? null : sharedPreferences6.edit();
            if (edit4 != null) {
                edit4.putBoolean("uninstalled_apps_enabled", false);
                edit4.apply();
            }
            tk.b.a().b("disable_uninstall_apps_reminder", (HashMap) null);
        }
    }

    public static class b extends com.thinkyeah.common.ui.dialog.c<NotificationSettingActivity> {
        public static final int c = 0;

        @NonNull
        public final Dialog onCreateDialog(Bundle bundle) {
            ArrayList arrayList = new ArrayList();
            for (String str : getResources().getStringArray(2130903044)) {
                arrayList.add(new c.b(str));
            }
            c.a aVar = new c.a(getActivity());
            aVar.g(2131887914);
            com.facebook.login.g gVar = new com.facebook.login.g(this, 6);
            aVar.v = arrayList;
            aVar.w = gVar;
            return aVar.a();
        }
    }

    public static class c extends com.thinkyeah.common.ui.dialog.c<NotificationSettingActivity> {
        public static final int c = 0;

        @NonNull
        public final Dialog onCreateDialog(Bundle bundle) {
            ArrayList arrayList = new ArrayList();
            for (String str : getResources().getStringArray(2130903043)) {
                arrayList.add(new c.b(str));
            }
            c.a aVar = new c.a(getActivity());
            aVar.g(2131887915);
            t4.g gVar = new t4.g(this, 5);
            aVar.v = arrayList;
            aVar.w = gVar;
            return aVar.a();
        }
    }

    public final void X2() {
        ArrayList arrayList = new ArrayList();
        d dVar = new d(this, 99, getString(2131887959));
        g gVar = this.n;
        dVar.setThinkItemClickListener(gVar);
        arrayList.add(dVar);
        d dVar2 = new d(this, 100, getString(2131887915));
        String[] stringArray = getResources().getStringArray(2130903043);
        SharedPreferences sharedPreferences = f.b(this).a.getSharedPreferences("notification_reminder", 0);
        int i = sharedPreferences == null ? 1 : sharedPreferences.getInt("frequency_junk_clean_reminder", 1);
        if (i <= stringArray.length - 1) {
            dVar2.setComment(stringArray[i]);
        } else {
            o.d("frequencyIdx out of bounds!", (Throwable) null);
        }
        dVar2.setThinkItemClickListener(gVar);
        arrayList.add(dVar2);
        com.thinkyeah.common.ui.thinklist.a aVar = new com.thinkyeah.common.ui.thinklist.a(getString(2131887912), this, f.b(this).d(), 106);
        aVar.setComment(getString(2131886408));
        a aVar2 = this.m;
        aVar.setToggleButtonClickListener(aVar2);
        arrayList.add(aVar);
        String string = getString(2131887913);
        SharedPreferences sharedPreferences2 = f.b(this).a.getSharedPreferences("notification_reminder", 0);
        com.thinkyeah.common.ui.thinklist.a aVar3 = new com.thinkyeah.common.ui.thinklist.a(string, this, sharedPreferences2 != null ? sharedPreferences2.getBoolean("uninstalled_apps_enabled", true) : true, 107);
        aVar3.setComment(getString(2131886409));
        aVar3.setToggleButtonClickListener(aVar2);
        arrayList.add(aVar3);
        this.l = new jl.b(arrayList);
        findViewById(2131363199).setAdapter(this.l);
    }

    public final void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(2131558500);
        TitleBar.a configure = findViewById(2131363196).getConfigure();
        configure.e(2131887921);
        configure.g(new t4.a(this, 16));
        configure.a.z = 0.0f;
        configure.a();
        X2();
    }

    public final void onStart() {
        super/*il.b*/.onStart();
        d a10 = this.l.a(99);
        SharedPreferences sharedPreferences = getSharedPreferences("toolbar", 0);
        a10.setValue(sharedPreferences != null ? sharedPreferences.getBoolean("notification_toolbar_enabled", true) : true ? getString(2131887786) : getString(2131887785));
    }
}