package q;

import android.os.Bundle;
import androidx.annotation.Nullable;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

/* JADX INFO: loaded from: classes.dex */
public final class c {

    @Nullable
    public final List<b> files;

    @Nullable
    public final String text;

    @Nullable
    public final String title;

    public c(@Nullable String str, @Nullable String str2, @Nullable List<b> list) {
        this.title = str;
        this.text = str2;
        this.files = list;
    }

    @Nullable
    public static c fromBundle(@Nullable Bundle bundle) {
        ArrayList arrayList = null;
        if (bundle == null) {
            return null;
        }
        ArrayList parcelableArrayList = bundle.getParcelableArrayList("androidx.browser.trusted.sharing.KEY_FILES");
        if (parcelableArrayList != null) {
            arrayList = new ArrayList();
            Iterator it = parcelableArrayList.iterator();
            while (it.hasNext()) {
                arrayList.add(b.fromBundle((Bundle) it.next()));
            }
        }
        return new c(bundle.getString("androidx.browser.trusted.sharing.KEY_TITLE"), bundle.getString("androidx.browser.trusted.sharing.KEY_TEXT"), arrayList);
    }
}
