导航菜单

页面标题

页面副标题

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

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

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


package com.thinkyeah.common.runtimepermissionguide.ui;

import android.animation.AnimatorSet;
import android.os.Bundle;
import android.util.Pair;
import android.view.MotionEvent;
import android.widget.TextView;
import com.thinkyeah.common.runtimepermissionguide.ui.view.RuntimePermissionGuideView;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import pk.a;
import vj.h;
import wj.c;

public class RuntimePermissionGuideActivity extends c {
    public static final h k = h.f(RuntimePermissionGuideActivity.class);
    public List<a> i;
    public RuntimePermissionGuideView j;

    public final boolean dispatchTouchEvent(MotionEvent motionEvent) {
        if (motionEvent.getAction() == 0) {
            finish();
        }
        return super/*android.app.Activity*/.dispatchTouchEvent(motionEvent);
    }

    @Override
    public final void onCreate(Bundle bundle) {
        Pair create;
        super.onCreate(bundle);
        setContentView(2131558514);
        List<a> list = (List) getIntent().getSerializableExtra("permission_groups");
        this.i = list;
        if (list == null || list.isEmpty()) {
            k.d("Permission Group is Empty!! Do Not show Guide", null);
            finish();
            return;
        }
        this.j = (RuntimePermissionGuideView) findViewById(2131363788);
        StringBuilder sb = new StringBuilder();
        HashSet hashSet = new HashSet();
        for (int i = 0; i < this.i.size(); i++) {
            hashSet.add(getString(this.i.get(i).c));
        }
        ArrayList arrayList = new ArrayList(hashSet);
        String str = (String) arrayList.get(0);
        String string = getString(2131886582, str);
        sb.append(getString(2131886600, str));
        if (arrayList.size() == 1) {
            create = Pair.create(sb.toString(), string);
        } else {
            for (int i2 = 1; i2 < arrayList.size(); i2++) {
                sb.append(getString(2131886582, arrayList.get(i2)));
            }
            create = Pair.create(sb.toString(), string);
        }
        RuntimePermissionGuideView runtimePermissionGuideView = this.j;
        String str2 = (String) create.first;
        String str3 = (String) create.second;
        TextView textView = (TextView) runtimePermissionGuideView.findViewById(2131363556);
        TextView textView2 = (TextView) runtimePermissionGuideView.findViewById(2131363634);
        textView.setText(str2);
        textView2.setText(str3);
        RuntimePermissionGuideView runtimePermissionGuideView2 = this.j;
        runtimePermissionGuideView2.getClass();
        runtimePermissionGuideView2.post(new rk.a(runtimePermissionGuideView2));
    }

    @Override
    public final void onDestroy() {
        RuntimePermissionGuideView runtimePermissionGuideView = this.j;
        runtimePermissionGuideView.i = false;
        AnimatorSet animatorSet = runtimePermissionGuideView.j;
        if (animatorSet != null) {
            animatorSet.removeAllListeners();
            runtimePermissionGuideView.j.cancel();
            runtimePermissionGuideView.j = null;
        }
        super.onDestroy();
    }
}