Shinigami ID v1.1.3版本的 MD5 值为:c381e85feac697f048c400ae89b7b92d

以下内容为反编译后的 h.java 源代码,内容仅作参考


package t9;

import a0.f;
import android.accounts.Account;
import android.content.Intent;
import android.content.res.ColorStateList;
import android.content.res.Resources;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import android.util.SparseArray;
import android.util.TypedValue;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.fragment.app.m;
import androidx.fragment.app.n;
import androidx.fragment.app.o;
import androidx.lifecycle.e0;
import androidx.lifecycle.r;
import com.google.android.gms.auth.api.signin.GoogleSignInOptions;
import com.google.android.gms.common.api.Scope;
import com.google.android.material.button.MaterialButton;
import com.google.android.material.card.MaterialCardView;
import com.google.firebase.auth.FirebaseAuth;
import com.shinigami.id.R;
import com.shinigami.id.base.BaseApplication;
import com.shinigami.id.model.UserModel;
import com.shinigami.id.ui.history.HistoryActivity;
import com.shinigami.id.ui.login.LoginActivity;
import com.shinigami.id.ui.offline.OfflineActivity;
import com.shinigami.id.ui.premium.PremiumActivity;
import com.wonderpush.sdk.x;
import java.time.LocalDateTime;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.Executors;
import java.util.concurrent.atomic.AtomicReference;
import k.b;

public class h extends m {
    public static final int A0 = 0;

    public MaterialButton f12373i0;

    public FirebaseAuth f12374j0;

    public ImageView f12375k0;

    public TextView f12376l0;

    public TextView f12377m0;

    public TextView f12378n0;

    public TextView f12379o0;

    public TextView f12380p0;

    public TextView f12381q0;

    public TextView f12382r0;

    public TextView f12383s0;

    public TextView f12384t0;
    public TextView u0;

    public TextView f12385v0;

    public TextView f12386w0;

    public BaseApplication f12387x0;

    public MaterialCardView f12388y0;

    public FrameLayout f12389z0;

    public class a implements View.OnClickListener {
        public a() {
        }

        @Override
        public final void onClick(View view) {
            h.this.h0(new Intent(h.this.Z(), (Class<?>) HistoryActivity.class));
        }
    }

    public class b implements r<UserModel> {
        public b() {
        }

        @Override
        public final void a(UserModel userModel) {
            UserModel userModel2 = userModel;
            if (userModel2.getPhoto() != null && !userModel2.getPhoto().isEmpty()) {
                com.bumptech.glide.b.e(h.this.f12387x0).m(userModel2.getPhoto()).a(new h2.g().f().h(q1.b.PREFER_RGB_565).k(Integer.MIN_VALUE, Integer.MIN_VALUE)).E(h.this.f12375k0);
            }
            h.this.f12376l0.setText(userModel2.getDisplayName());
            h.this.f12377m0.setText(userModel2.getEmail());
            if (userModel2.isPremium()) {
                try {
                    h hVar = h.this;
                    TextView textView = hVar.f12381q0;
                    Resources w10 = hVar.w();
                    ThreadLocal<TypedValue> threadLocal = a0.f.f28a;
                    textView.setCompoundDrawableTintList(ColorStateList.valueOf(f.b.a(w10, R.color.color5, null)));
                    if (userModel2.getPremiumDate() != null) {
                        h.this.f12386w0.setVisibility(0);
                        h.this.f12386w0.setText("Remaining Days : " + Math.max(userModel2.getPremiumDay() - ChronoUnit.DAYS.between(userModel2.getPremiumDate(), LocalDateTime.now()), 0L));
                    }
                } catch (IllegalStateException e10) {
                    e10.printStackTrace();
                }
                h.this.f12382r0.setText("Selamat! Anda\nSudah Premium");
                h.this.f12379o0.setText("Sekarang Anda dapat\nmenikmati baca komik\ntanpa iklan!");
            }
        }
    }

    public class c implements View.OnClickListener {
        public c() {
        }

        @Override
        public final void onClick(View view) {
            Integer valueOf = Integer.valueOf(h.this.Z().getColor(R.color.second2) | (-16777216));
            b.a aVar = new b.a();
            aVar.c();
            aVar.d();
            aVar.b();
            if (aVar.c == null) {
                aVar.c = new SparseArray<>();
            }
            SparseArray<Bundle> sparseArray = aVar.c;
            Bundle bundle = new Bundle();
            if (valueOf != null) {
                bundle.putInt("android.support.customtabs.extra.TOOLBAR_COLOR", valueOf.intValue());
            }
            sparseArray.put(2, bundle);
            aVar.a().a(h.this.Z(), Uri.parse("https://shinigami.ae/terms-conditions/"));
        }
    }

    public class d implements View.OnClickListener {
        public d() {
        }

        @Override
        public final void onClick(View view) {
            Integer valueOf = Integer.valueOf(h.this.Z().getColor(R.color.second2) | (-16777216));
            b.a aVar = new b.a();
            aVar.c();
            aVar.d();
            aVar.b();
            if (aVar.c == null) {
                aVar.c = new SparseArray<>();
            }
            SparseArray<Bundle> sparseArray = aVar.c;
            Bundle bundle = new Bundle();
            if (valueOf != null) {
                bundle.putInt("android.support.customtabs.extra.TOOLBAR_COLOR", valueOf.intValue());
            }
            sparseArray.put(2, bundle);
            aVar.a().a(h.this.Z(), Uri.parse("https://shinigami.ae/privacy-policy/"));
        }
    }

    public class e implements View.OnClickListener {

        public class a implements n4.d<Void> {
            public a() {
            }

            @Override
            public final void e(n4.i<Void> iVar) {
                h.this.f12389z0.setVisibility(8);
                h.this.h0(new Intent(h.this.Z(), (Class<?>) LoginActivity.class));
                h.this.Z().finish();
            }
        }

        public e() {
        }

        @Override
        public final void onClick(View view) {
            h.this.f12389z0.setVisibility(0);
            h.this.f12374j0.e();
            androidx.fragment.app.r Z = h.this.Z();
            GoogleSignInOptions googleSignInOptions = GoogleSignInOptions.f3698y;
            new HashSet();
            new HashMap();
            Objects.requireNonNull(googleSignInOptions, "null reference");
            HashSet hashSet = new HashSet(googleSignInOptions.f3701p);
            boolean z10 = googleSignInOptions.f3704s;
            boolean z11 = googleSignInOptions.f3705t;
            boolean z12 = googleSignInOptions.f3703r;
            String str = googleSignInOptions.f3706u;
            Account account = googleSignInOptions.f3702q;
            String str2 = googleSignInOptions.v;
            Map<Integer, g3.a> G = GoogleSignInOptions.G(googleSignInOptions.f3707w);
            String str3 = googleSignInOptions.x;
            if (hashSet.contains(GoogleSignInOptions.C)) {
                Scope scope = GoogleSignInOptions.B;
                if (hashSet.contains(scope)) {
                    hashSet.remove(scope);
                }
            }
            if (z12 && (account == null || !hashSet.isEmpty())) {
                hashSet.add(GoogleSignInOptions.A);
            }
            com.google.android.gms.auth.api.signin.a.a(Z, new GoogleSignInOptions(3, new ArrayList(hashSet), account, z12, z10, z11, str, str2, G, str3)).b().c(new a());
        }
    }

    public class f implements View.OnClickListener {
        public f() {
        }

        @Override
        public final void onClick(View view) {
            h.this.h0(new Intent("android.intent.action.VIEW", Uri.parse("https://discord.gg/shinigamid")));
        }
    }

    public class g implements View.OnClickListener {

        public class a implements Runnable {
            public a() {
            }

            @Override
            public final void run() {
                Integer valueOf = Integer.valueOf(h.this.Z().getColor(R.color.second2) | (-16777216));
                b.a aVar = new b.a();
                aVar.c();
                aVar.d();
                aVar.b();
                if (aVar.c == null) {
                    aVar.c = new SparseArray<>();
                }
                SparseArray<Bundle> sparseArray = aVar.c;
                Bundle bundle = new Bundle();
                if (valueOf != null) {
                    bundle.putInt("android.support.customtabs.extra.TOOLBAR_COLOR", valueOf.intValue());
                }
                sparseArray.put(2, bundle);
                aVar.a().a(h.this.Z(), Uri.parse("https://shinigami.ae/kontak-kami/"));
            }
        }

        public g() {
        }

        @Override
        public final void onClick(View view) {
            Executors.newSingleThreadExecutor().execute(new a());
        }
    }

    public class ViewOnClickListenerC0214h implements View.OnClickListener {
        public ViewOnClickListenerC0214h() {
        }

        @Override
        public final void onClick(View view) {
            h.this.h0(new Intent(h.this.Z(), (Class<?>) PremiumActivity.class));
        }
    }

    public class i implements View.OnClickListener {
        public i() {
        }

        @Override
        public final void onClick(View view) {
            h.this.h0(new Intent(h.this.Z(), (Class<?>) PremiumActivity.class));
        }
    }

    public class j implements View.OnClickListener {
        public j() {
        }

        @Override
        public final void onClick(View view) {
            h.this.h0(new Intent(h.this.Z(), (Class<?>) OfflineActivity.class));
        }
    }

    public h() {
        b.c cVar = new b.c();
        l0.b bVar = new l0.b(this, 23);
        n nVar = new n(this);
        if (this.f1370o > 1) {
            throw new IllegalStateException("Fragment " + this + " is attempting to registerForActivityResult after being created. Fragments must call registerForActivityResult() before they are created (i.e. initialization, onAttach(), or onCreate()).");
        }
        o oVar = new o(this, nVar, new AtomicReference(), cVar, bVar);
        if (this.f1370o >= 0) {
            oVar.a();
        } else {
            this.f1369g0.add(oVar);
        }
    }

    @Override
    public final View F(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        return layoutInflater.inflate(R.layout.fragment_profile, viewGroup, false);
    }

    @Override
    public final void Q(View view, Bundle bundle) {
        this.f12375k0 = (ImageView) view.findViewById(R.id.profile_img_profile);
        this.f12377m0 = (TextView) view.findViewById(R.id.profile_tv_email);
        this.f12378n0 = (TextView) view.findViewById(R.id.profile_tv_email_app);
        this.f12376l0 = (TextView) view.findViewById(R.id.profile_tv_name);
        this.f12380p0 = (TextView) view.findViewById(R.id.profile_tv_downloaded);
        this.f12379o0 = (TextView) view.findViewById(R.id.profile_tv_premium_desc2);
        this.f12381q0 = (TextView) view.findViewById(R.id.profile_tv_premium_title);
        this.f12382r0 = (TextView) view.findViewById(R.id.profile_tv_premium_desc);
        this.f12383s0 = (TextView) view.findViewById(R.id.profile_tv_ts);
        this.f12384t0 = (TextView) view.findViewById(R.id.profile_tv_privacy_policy);
        this.u0 = (TextView) view.findViewById(R.id.profile_tv_discord);
        this.f12385v0 = (TextView) view.findViewById(R.id.profile_tv_history);
        this.f12386w0 = (TextView) view.findViewById(R.id.profile_tv_premium_left);
        this.f12388y0 = (MaterialCardView) view.findViewById(R.id.profile_card_premium);
        this.f12389z0 = (FrameLayout) view.findViewById(R.id.profile_loading);
        this.f12373i0 = (MaterialButton) view.findViewById(R.id.profile_btn_logout);
        this.f12374j0 = FirebaseAuth.getInstance();
        this.f12387x0 = (BaseApplication) Z().getApplication();
        ((x8.b) new e0(Z(), this.f12387x0.f4456p).a(x8.b.class)).f14007d.e(Z(), new b());
        Log.d("ProfileFragment", "askNotificationPermission: ask notif wonderpush borr");
        x.F();
        this.f12383s0.setOnClickListener(new c());
        this.f12384t0.setOnClickListener(new d());
        this.f12373i0.setOnClickListener(new e());
        this.u0.setOnClickListener(new f());
        this.f12378n0.setOnClickListener(new g());
        this.f12388y0.setOnClickListener(new ViewOnClickListenerC0214h());
        this.f12379o0.setOnClickListener(new i());
        this.f12380p0.setOnClickListener(new j());
        this.f12385v0.setOnClickListener(new a());
    }
}