package dl;

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import java.util.EnumMap;
import java.util.Map;
import java.util.regex.Pattern;

/* loaded from: classes3.dex */
public abstract class g {

    /* renamed from: a, reason: collision with root package name */
    private static final String f16323a = "g";

    /* renamed from: b, reason: collision with root package name */
    private static final Pattern f16324b = Pattern.compile(",");

    public static Map a(Intent intent) {
        Bundle extras = intent.getExtras();
        if (extras == null || extras.isEmpty()) {
            return null;
        }
        EnumMap enumMap = new EnumMap(yk.e.class);
        for (yk.e eVar : yk.e.values()) {
            if (eVar != yk.e.CHARACTER_SET && eVar != yk.e.NEED_RESULT_POINT_CALLBACK && eVar != yk.e.POSSIBLE_FORMATS) {
                String name = eVar.name();
                if (extras.containsKey(name)) {
                    if (eVar.getValueType().equals(Void.class)) {
                        enumMap.put((EnumMap) eVar, (yk.e) Boolean.TRUE);
                    } else {
                        Object obj = extras.get(name);
                        if (eVar.getValueType().isInstance(obj)) {
                            enumMap.put((EnumMap) eVar, (yk.e) obj);
                        } else {
                            Log.w(f16323a, "Ignoring hint " + eVar + " because it is not assignable from " + obj);
                        }
                    }
                }
            }
        }
        Log.i(f16323a, "Hints from the Intent: " + enumMap);
        return enumMap;
    }
}
