导航菜单

页面标题

页面副标题

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

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

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


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

import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
import android.animation.ArgbEvaluator;
import android.animation.ValueAnimator;
import android.app.Activity;
import android.app.NotificationManager;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.os.Handler;
import android.view.animation.AccelerateDecelerateInterpolator;
import android.view.animation.LinearInterpolator;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.Nullable;
import androidx.core.content.ContextCompat;
import c7.g;
import com.applovin.exoplayer2.ui.m;
import com.facebook.stetho.server.http.HttpStatus;
import com.fancyclean.boost.common.ui.view.ColorfulBgView;
import com.fancyclean.boost.junkclean.ui.presenter.CleanJunkPresenter;
import com.fancyclean.boost.junkclean.ui.view.JunkCleaningView;
import com.mbridge.msdk.playercommon.exoplayer2.DefaultRenderersFactory;
import e9.e;
import gl.d;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import ma.c;
import ml.o;
import t4.j;
import t4.k;
import t4.r;
import vj.h;
import z8.f;

@d(CleanJunkPresenter.class)
public class CleanJunkActivity extends v7.d<d9.a> implements d9.b {
    public static final h E = new h("CleanJunkActivity");
    public ImageView C;
    public c D;
    public ColorfulBgView s;
    public JunkCleaningView t;
    public TextView u;
    public TextView v;
    public TextView w;

    public AnimatorSet f177x;

    public AnimatorSet f178y;
    public final i.b q = new i.b("N_TR_JunkClean");
    public long r = 0;

    public boolean f179z = false;
    public boolean A = false;
    public boolean B = false;

    public class a extends AnimatorListenerAdapter {
        public a() {
        }

        @Override
        public final void onAnimationEnd(Animator animator) {
            h hVar = CleanJunkActivity.E;
            CleanJunkActivity.this.c3(false);
        }
    }

    public class b extends AnimatorListenerAdapter {
        public b() {
        }

        @Override
        public final void onAnimationEnd(Animator animator) {
            new Handler().postDelayed(new androidx.appcompat.widget.b(this, 10), 500L);
        }

        @Override
        public final void onAnimationStart(Animator animator) {
            CleanJunkActivity.this.B = true;
        }
    }

    public static void e3(Activity activity) {
        Intent intent = new Intent(activity, (Class<?>) CleanJunkActivity.class);
        intent.putExtra("no_need_to_clean_junk", true);
        activity.startActivity(intent);
        activity.overridePendingTransition(0, 0);
    }

    public static void f3(Activity activity, f fVar, long j, long j10) {
        Intent intent = new Intent(activity, (Class<?>) CleanJunkActivity.class);
        ml.f.b().c(fVar, "junk_clean://selected_junk_items");
        intent.putExtra("app_cache_to_clean", j);
        intent.putExtra("app_cache_cleaned", j10);
        activity.startActivity(intent);
        activity.overridePendingTransition(0, 0);
    }

    @Override
    public final void A2() {
        JunkCleaningView junkCleaningView = this.t;
        junkCleaningView.getClass();
        junkCleaningView.post(new e9.a(junkCleaningView));
        ValueAnimator ofFloat = ValueAnimator.ofFloat(0.0f, 80.0f);
        ofFloat.setInterpolator(new LinearInterpolator());
        ofFloat.addUpdateListener(new m(this, 3));
        ValueAnimator ofObject = ValueAnimator.ofObject(new ArgbEvaluator(), Integer.valueOf(g.a(this).c.c), Integer.valueOf(g.a(this).b.c));
        ofObject.setInterpolator(new LinearInterpolator());
        ofObject.addUpdateListener(new r(this, 2));
        AnimatorSet animatorSet = this.f177x;
        if (animatorSet != null) {
            animatorSet.removeAllListeners();
            this.f177x.cancel();
        }
        AnimatorSet animatorSet2 = new AnimatorSet();
        this.f177x = animatorSet2;
        animatorSet2.playTogether(ofFloat, ofObject);
        this.f177x.setDuration(DefaultRenderersFactory.DEFAULT_ALLOWED_VIDEO_JOINING_TIME_MS);
        this.f177x.addListener(new b9.b(this));
        this.f177x.start();
    }

    @Override
    @Nullable
    public final String X2() {
        return "I_TR_JunkClean";
    }

    @Override
    public final void Y2() {
        Z2(1, this.D, this.q, this.C, HttpStatus.HTTP_INTERNAL_SERVER_ERROR);
    }

    public final void c3(boolean z10) {
        JunkCleaningView junkCleaningView = this.t;
        junkCleaningView.c.d = false;
        e eVar = junkCleaningView.d;
        AnimatorSet animatorSet = eVar.h;
        if (animatorSet != null) {
            animatorSet.cancel();
            eVar.h = null;
        }
        this.t.setVisibility(8);
        this.u.setVisibility(8);
        this.v.setVisibility(8);
        long currentTimeMillis = System.currentTimeMillis();
        SharedPreferences sharedPreferences = getSharedPreferences("junk_clean", 0);
        SharedPreferences.Editor edit = sharedPreferences != null ? sharedPreferences.edit() : null;
        if (edit != null) {
            edit.putLong("last_clean_junk_time", currentTimeMillis);
            edit.apply();
        }
        int i = 1;
        if (z10) {
            this.w.setText(2131887606);
            int color = ContextCompat.getColor(this, 2131100588);
            getWindow().setStatusBarColor(color);
            this.s.a(color, color);
            this.D = new c(0, getString(2131887911), getString(2131887606));
        } else {
            long j = this.r;
            if (j > 0) {
                String string = getString(2131887605, o.a(1, j));
                this.w.setText(string);
                this.D = new c(0, getString(2131887911), string);
            } else {
                this.w.setText(2131887606);
                this.D = new c(0, getString(2131887911), getString(2131887606));
            }
        }
        ImageView imageView = (ImageView) findViewById(2131362479);
        this.C = imageView;
        imageView.setVisibility(0);
        ValueAnimator ofFloat = ValueAnimator.ofFloat(0.0f, 1.0f);
        ofFloat.addUpdateListener(new j(this, i));
        ofFloat.setDuration(500L);
        ofFloat.setInterpolator(new AccelerateDecelerateInterpolator());
        ofFloat.addListener(new b());
        ofFloat.start();
    }

    public final void d3() {
        ValueAnimator ofFloat = ValueAnimator.ofFloat(80.0f, 100.0f);
        ofFloat.setInterpolator(new LinearInterpolator());
        ofFloat.addUpdateListener(new b9.a(this, 0));
        ValueAnimator ofObject = ValueAnimator.ofObject(new ArgbEvaluator(), Integer.valueOf(g.a(this).b.c), Integer.valueOf(g.a(this).a.c));
        ofObject.setInterpolator(new LinearInterpolator());
        ofObject.addUpdateListener(new k(this, 2));
        AnimatorSet animatorSet = this.f178y;
        if (animatorSet != null) {
            animatorSet.removeAllListeners();
            this.f178y.cancel();
        }
        AnimatorSet animatorSet2 = new AnimatorSet();
        this.f178y = animatorSet2;
        animatorSet2.playTogether(ofFloat, ofObject);
        this.f178y.setDuration(2000L);
        this.f178y.addListener(new a());
        this.f178y.start();
    }

    @Override
    public final void k0(long j) {
        this.f179z = true;
        E.c(android.support.v4.media.b.j("junk cleaned: ", j));
        this.r = j;
        if (this.A) {
            d3();
        }
        tk.b.a().b("clean_junk", (HashMap) null);
    }

    @Override
    public final void onBackPressed() {
        if (this.B) {
            return;
        }
        super.onBackPressed();
    }

    @Override
    public final void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setContentView(2131558468);
        this.s = (ColorfulBgView) findViewById(2131361967);
        g.a aVar = g.a(this).c;
        getWindow().setStatusBarColor(aVar.c);
        ColorfulBgView colorfulBgView = this.s;
        int i = aVar.c;
        colorfulBgView.a(i, i);
        this.t = (JunkCleaningView) findViewById(2131362533);
        this.u = (TextView) findViewById(2131363664);
        this.v = (TextView) findViewById(2131363665);
        this.w = (TextView) findViewById(2131363694);
        if (bundle == null) {
            if (getIntent().getBooleanExtra("no_need_to_clean_junk", false)) {
                c3(true);
            } else {
                ((d9.a) W2()).J((f) ml.f.b().a("junk_clean://selected_junk_items"), getIntent().getLongExtra("app_cache_to_clean", 0L), getIntent().getLongExtra("app_cache_cleaned", 0L));
            }
        }
        g9.f b10 = g9.f.b(this);
        LinkedList linkedList = b10.b;
        if (linkedList == null || linkedList.isEmpty()) {
            return;
        }
        Iterator it = linkedList.iterator();
        while (it.hasNext()) {
            int intValue = ((Integer) it.next()).intValue();
            if (intValue == 0) {
                h9.b a10 = b10.a(intValue);
                if (a10 != null) {
                    g9.f.c.c("==> dismissNotificationIfComplete");
                    NotificationManager notificationManager = (NotificationManager) a10.b.getApplicationContext().getSystemService("notification");
                    if (notificationManager != null) {
                        notificationManager.cancel(a10.g());
                    }
                }
                it.remove();
            }
        }
    }

    @Override
    public final void onDestroy() {
        JunkCleaningView junkCleaningView = this.t;
        if (junkCleaningView != null) {
            junkCleaningView.c.d = false;
            e eVar = junkCleaningView.d;
            AnimatorSet animatorSet = eVar.h;
            if (animatorSet != null) {
                animatorSet.cancel();
                eVar.h = null;
            }
        }
        AnimatorSet animatorSet2 = this.f177x;
        if (animatorSet2 != null) {
            animatorSet2.removeAllListeners();
            this.f177x.cancel();
            this.f177x = null;
        }
        AnimatorSet animatorSet3 = this.f178y;
        if (animatorSet3 != null) {
            animatorSet3.removeAllListeners();
            this.f178y.cancel();
            this.f178y = null;
        }
        super.onDestroy();
    }

    @Override
    public final Context getContext() {
        return this;
    }
}