package o;

import android.content.ContentResolver;
import android.content.Context;
import android.database.ContentObserver;
import android.net.Uri;
import android.os.Handler;
import android.os.Looper;
import android.provider.Settings;
import android.view.View;
import com.google.android.gms.common.R;
import java.util.LinkedHashMap;
import o.Oh0;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public abstract class Yl0 {
    public static final LinkedHashMap a = new LinkedHashMap();

    /* JADX WARN: Type inference failed for: r5v1, types: [androidx.compose.ui.platform.WindowRecomposer_androidKt$getAnimationScaleFlowFor$1$1$contentObserver$1] */
    public static final InterfaceC3102za0 a(Context context) {
        InterfaceC3102za0 interfaceC3102za0;
        LinkedHashMap linkedHashMap = a;
        synchronized (linkedHashMap) {
            try {
                Object objP = linkedHashMap.get(context);
                if (objP == null) {
                    ContentResolver contentResolver = context.getContentResolver();
                    Uri uriFor = Settings.Global.getUriFor("animator_duration_scale");
                    final C1210ff c1210ffA = AbstractC2841wm0.a(-1, 0, 6);
                    final Handler handlerO = AbstractC0940cn0.o(Looper.getMainLooper());
                    C2277qp c2277qp = new C2277qp(new C0573Wc(contentResolver, uriFor, new ContentObserver(handlerO) { // from class: androidx.compose.ui.platform.WindowRecomposer_androidKt$getAnimationScaleFlowFor$1$1$contentObserver$1
                        @Override // android.database.ContentObserver
                        public void onChange(boolean z, Uri uri) {
                            c1210ffA.p(Oh0.a);
                        }
                    }, c1210ffA, context, null));
                    C2724vb0 c2724vb0T = AbstractC2378rs0.t();
                    C2468sq c2468sq = AbstractC1903ms.a;
                    objP = Co0.P(c2277qp, new C0168Gm(AbstractC2798wI.t(c2724vb0T, AbstractC2139pN.a)), new C2817wa0(), Float.valueOf(Settings.Global.getFloat(context.getContentResolver(), "animator_duration_scale", 1.0f)));
                    linkedHashMap.put(context, objP);
                }
                interfaceC3102za0 = (InterfaceC3102za0) objP;
            } catch (Throwable th) {
                throw th;
            }
        }
        return interfaceC3102za0;
    }

    public static final AbstractC0425Qk b(View view) {
        Object tag = view.getTag(R.id.androidx_compose_ui_view_composition_context);
        if (tag instanceof AbstractC0425Qk) {
            return (AbstractC0425Qk) tag;
        }
        return null;
    }
}
