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

Commit 56cb6eb5 authored by William Luh's avatar William Luh Committed by android-build-merger
Browse files

Merge "Prevent settings from crashing when ContentProvider crashes" into oc-dev

am: a875bf3e

Change-Id: I50874232f14e40b142061aa113568cb7bfe7f176
parents 1777b3f5 a875bf3e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -513,7 +513,7 @@ public class TileUtils {
            return null;
        }
        if (!providerMap.containsKey(authority)) {
            providerMap.put(authority, context.getContentResolver().acquireProvider(uri));
            providerMap.put(authority, context.getContentResolver().acquireUnstableProvider(uri));
        }
        return providerMap.get(authority);
    }
+4 −2
Original line number Diff line number Diff line
@@ -302,8 +302,10 @@ public class TileUtilsTest {
        when(mIContentProvider.call(anyString(),
                eq(TileUtils.getMethodFromUri(Uri.parse(URI_GET_SUMMARY))), eq(URI_GET_SUMMARY),
                any())).thenReturn(bundle);
        when(mContentResolver.acquireProvider(anyString())).thenReturn(mIContentProvider);
        when(mContentResolver.acquireProvider(any(Uri.class))).thenReturn(mIContentProvider);
        when(mContentResolver.acquireUnstableProvider(anyString()))
                .thenReturn(mIContentProvider);
        when(mContentResolver.acquireUnstableProvider(any(Uri.class)))
                .thenReturn(mIContentProvider);

        TileUtils.getTilesForIntent(mContext, UserHandle.CURRENT, intent, addedCache,
                null /* defaultCategory */, outTiles, false /* usePriority */,