Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a14c6b9c authored by Steven Wu's avatar Steven Wu
Browse files

Do not throw IllegalArgumentException in slice manager.

Test: manual
Bug: 80087497
Change-Id: Ic05c812f41d0153c8745b08718513d4e095ab27b
parent 051664eb
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -245,7 +245,8 @@ public class SliceManager {
        ContentResolver resolver = mContext.getContentResolver();
        try (ContentProviderClient provider = resolver.acquireContentProviderClient(uri)) {
            if (provider == null) {
                throw new IllegalArgumentException("Unknown URI " + uri);
                Log.w(TAG, String.format("Unknown URI: %s", uri));
                return null;
            }
            Bundle extras = new Bundle();
            extras.putParcelable(SliceProvider.EXTRA_BIND_URI, uri);
@@ -306,7 +307,8 @@ public class SliceManager {
                .authority(authority).build();
        try (ContentProviderClient provider = resolver.acquireContentProviderClient(uri)) {
            if (provider == null) {
                throw new IllegalArgumentException("Unknown URI " + uri);
                Log.w(TAG, String.format("Unknown URI: %s", uri));
                return null;
            }
            Bundle extras = new Bundle();
            extras.putParcelable(SliceProvider.EXTRA_INTENT, intent);
@@ -383,7 +385,8 @@ public class SliceManager {
                .authority(authority).build();
        try (ContentProviderClient provider = resolver.acquireContentProviderClient(uri)) {
            if (provider == null) {
                throw new IllegalArgumentException("Unknown URI " + uri);
                Log.w(TAG, String.format("Unknown URI: %s", uri));
                return null;
            }
            Bundle extras = new Bundle();
            extras.putParcelable(SliceProvider.EXTRA_INTENT, intent);