package ඓ.ඓ.K.䁗.ᓆ;

import android.annotation.TargetApi;
import android.app.Fragment;
import android.os.Bundle;
import android.util.Log;
import io.reactivex.subjects.PublishSubject;
import java.util.HashMap;
import java.util.Map;
import ඓ.K.K.K.C1293;

/* renamed from: ඓ.ඓ.K.䁗.ᓆ.㸾  reason: contains not printable characters */
/* compiled from: RxPermissionsFragment */
public class FragmentC0721 extends Fragment {

    /* renamed from: ʬ  reason: contains not printable characters */
    public boolean f3739;

    /* renamed from: ῲ  reason: contains not printable characters */
    public Map<String, PublishSubject<C0720>> f3740 = new HashMap();

    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        setRetainInstance(true);
    }

    @TargetApi(23)
    public void onRequestPermissionsResult(int i, String[] strArr, int[] iArr) {
        super.onRequestPermissionsResult(i, strArr, iArr);
        if (i == 42) {
            boolean[] zArr = new boolean[strArr.length];
            for (int i2 = 0; i2 < strArr.length; i2++) {
                zArr[i2] = shouldShowRequestPermissionRationale(strArr[i2]);
            }
            int length = strArr.length;
            for (int i3 = 0; i3 < length; i3++) {
                StringBuilder r2 = C1293.m3416("onRequestPermissionsResult  ");
                r2.append(strArr[i3]);
                m2146(r2.toString());
                PublishSubject<C0720> publishSubject = this.f3740.get(strArr[i3]);
                if (publishSubject == null) {
                    Log.e("RxPermissions", "RxPermissions.onRequestPermissionsResult invoked but didn't find the corresponding permission request.");
                    return;
                }
                this.f3740.remove(strArr[i3]);
                publishSubject.onNext(new C0720(strArr[i3], iArr[i3] == 0, zArr[i3]));
                publishSubject.onComplete();
            }
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m2146(String str) {
        if (this.f3739) {
            Log.d("RxPermissions", str);
        }
    }
}
