package m5;

import android.app.slice.Slice;
import android.app.slice.SliceProvider;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ProviderInfo;
import android.net.Uri;
import android.util.Log;
import androidx.slice.c;
import java.util.Collection;
import java.util.Set;

/* loaded from: classes.dex */
public class b extends SliceProvider {

    /* renamed from: p, reason: collision with root package name */
    private c f28653p;

    public b(c cVar, String[] strArr) {
        super(strArr);
        this.f28653p = cVar;
    }

    @Override // android.app.slice.SliceProvider, android.content.ContentProvider
    public void attachInfo(Context context, ProviderInfo providerInfo) {
        this.f28653p.attachInfo(context, providerInfo);
        super.attachInfo(context, providerInfo);
    }

    @Override // android.app.slice.SliceProvider
    public Slice onBindSlice(Uri uri, Set set) {
        c.l(androidx.slice.b.d(set));
        try {
            return androidx.slice.b.a(this.f28653p.f(uri));
        } catch (Exception e10) {
            Log.wtf("SliceProviderWrapper", "Slice with URI " + uri.toString() + " is invalid.", e10);
            return null;
        } finally {
            c.l(null);
        }
    }

    @Override // android.content.ContentProvider
    public boolean onCreate() {
        return true;
    }

    @Override // android.app.slice.SliceProvider
    public Collection onGetSliceDescendants(Uri uri) {
        return this.f28653p.h(uri);
    }

    @Override // android.app.slice.SliceProvider
    public Uri onMapIntentToUri(Intent intent) {
        return this.f28653p.i(intent);
    }

    @Override // android.app.slice.SliceProvider
    public void onSlicePinned(Uri uri) {
        this.f28653p.j(uri);
        this.f28653p.d(uri);
    }

    @Override // android.app.slice.SliceProvider
    public void onSliceUnpinned(Uri uri) {
        this.f28653p.k(uri);
        this.f28653p.e(uri);
    }
}
