- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
34 lines
1.4 KiB
Java
34 lines
1.4 KiB
Java
package androidx.core.content;
|
|
|
|
import android.content.ContentResolver;
|
|
import android.database.Cursor;
|
|
import android.net.Uri;
|
|
import android.os.OperationCanceledException;
|
|
import androidx.annotation.NonNull;
|
|
import androidx.annotation.Nullable;
|
|
import androidx.core.os.CancellationSignal;
|
|
|
|
/* loaded from: classes.dex */
|
|
public final class ContentResolverCompat {
|
|
private ContentResolverCompat() {
|
|
}
|
|
|
|
@Nullable
|
|
@Deprecated
|
|
public static Cursor query(@NonNull ContentResolver contentResolver, @NonNull Uri uri, @Nullable String[] strArr, @Nullable String str, @Nullable String[] strArr2, @Nullable String str2, @Nullable CancellationSignal cancellationSignal) {
|
|
return query(contentResolver, uri, strArr, str, strArr2, str2, cancellationSignal != null ? (android.os.CancellationSignal) cancellationSignal.getCancellationSignalObject() : null);
|
|
}
|
|
|
|
@Nullable
|
|
public static Cursor query(@NonNull ContentResolver contentResolver, @NonNull Uri uri, @Nullable String[] strArr, @Nullable String str, @Nullable String[] strArr2, @Nullable String str2, @Nullable android.os.CancellationSignal cancellationSignal) {
|
|
try {
|
|
return contentResolver.query(uri, strArr, str, strArr2, str2, cancellationSignal);
|
|
} catch (Exception e) {
|
|
if (e instanceof OperationCanceledException) {
|
|
throw new androidx.core.os.OperationCanceledException();
|
|
}
|
|
throw e;
|
|
}
|
|
}
|
|
}
|