导航菜单

页面标题

页面副标题

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

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

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


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

import android.app.Dialog;
import android.content.DialogInterface;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.v4.media.c;
import androidx.annotation.NonNull;
import androidx.fragment.app.FragmentActivity;
import com.fancyclean.boost.appdiary.ui.activity.AppDiarySettingsActivity;
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 java.util.ArrayList;
import wk.d;

public class AppDiarySettingsActivity extends com.fancyclean.boost.applock.ui.activity.b<hl.b> {
    public static final int t = 0;
    public final a r = new a();
    public final g s = new g(this, 6);

    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) {
            if (i != 1) {
                return;
            }
            d dVar = AppDiarySettingsActivity.this;
            SharedPreferences sharedPreferences = dVar.getSharedPreferences("app_diary", 0);
            SharedPreferences.Editor edit = sharedPreferences == null ? null : sharedPreferences.edit();
            if (edit != null) {
                edit.putBoolean("daily_report_enabled", z10);
                edit.apply();
            }
            if (z10) {
                z4.a.b(dVar).e();
            } else {
                z4.a.b(dVar).g();
                c.v("where", "AppDiarySetting", tk.b.a(), "disable_app_diary_report");
            }
        }
    }

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

        public class a extends ArrayList<String> {
            public a() {
                add("19:00");
                add("20:00");
                add("21:00");
                add("22:00");
                add("23:00");
                add("24:00");
            }
        }

        @NonNull
        public final Dialog onCreateDialog(Bundle bundle) {
            final a aVar = new a();
            SharedPreferences sharedPreferences = getActivity().getSharedPreferences("app_diary", 0);
            int indexOf = aVar.indexOf(sharedPreferences != null ? sharedPreferences.getString("daily_report_time", "20:00") : "20:00");
            final int[] iArr = new int[1];
            c.a aVar2 = new c.a(getContext());
            aVar2.g(2131887031);
            aVar2.f((CharSequence[]) aVar.toArray(new String[0]), indexOf, new com.facebook.login.g(iArr, 2));
            aVar2.e(2131886190, new DialogInterface.OnClickListener() {
                @Override
                public final void onClick(DialogInterface dialogInterface, int i) {
                    int i10 = AppDiarySettingsActivity.b.c;
                    AppDiarySettingsActivity.b bVar = AppDiarySettingsActivity.b.this;
                    FragmentActivity activity = bVar.getActivity();
                    String str = (String) aVar.get(iArr[0]);
                    SharedPreferences sharedPreferences2 = activity.getSharedPreferences("app_diary", 0);
                    SharedPreferences.Editor edit = sharedPreferences2 == null ? null : sharedPreferences2.edit();
                    if (edit != null) {
                        edit.putString("daily_report_time", str);
                        edit.apply();
                    }
                    SharedPreferences sharedPreferences3 = bVar.getActivity().getSharedPreferences("app_diary", 0);
                    if (sharedPreferences3 != null ? sharedPreferences3.getBoolean("daily_report_enabled", true) : true) {
                        z4.a b = z4.a.b(bVar.getActivity());
                        b.g();
                        b.e();
                    }
                    AppDiarySettingsActivity activity2 = bVar.getActivity();
                    int i11 = AppDiarySettingsActivity.t;
                    activity2.X2();
                }
            });
            aVar2.d(2131886274, (DialogInterface.OnClickListener) null);
            return aVar2.a();
        }
    }

    public final void X2() {
        ArrayList arrayList = new ArrayList();
        String string = getString(2131886470);
        SharedPreferences sharedPreferences = getSharedPreferences("app_diary", 0);
        com.thinkyeah.common.ui.thinklist.a aVar = new com.thinkyeah.common.ui.thinklist.a(string, this, sharedPreferences == null ? true : sharedPreferences.getBoolean("daily_report_enabled", true), 1);
        aVar.setToggleButtonClickListener(this.r);
        arrayList.add(aVar);
        jl.d dVar = new jl.d(this, 2, getString(2131887031));
        SharedPreferences sharedPreferences2 = getSharedPreferences("app_diary", 0);
        dVar.setValue(sharedPreferences2 != null ? sharedPreferences2.getString("daily_report_time", "20:00") : "20:00");
        dVar.setThinkItemClickListener(this.s);
        arrayList.add(dVar);
        findViewById(2131363202).setAdapter(new jl.b(arrayList));
    }

    @Override
    public final void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(2131558441);
        TitleBar.a configure = findViewById(2131363196).getConfigure();
        configure.e(2131887457);
        configure.g(new t4.a(this, 3));
        configure.a();
        X2();
    }
}