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

Commit dec4353b authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Mock some methods of Context in CoreSettingsObserverTest"

parents 843cd7b1 387f32a2
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -97,6 +97,8 @@ public class CoreSettingsObserverTest {
        mContentResolver = new MockContentResolver(mContext);
        mContentResolver.addProvider(Settings.AUTHORITY, new FakeSettingsProvider());
        when(mContext.getContentResolver()).thenReturn(mContentResolver);
        when(mContext.getCacheDir()).thenReturn(originalContext.getCacheDir());
        when(mContext.getAttributionSource()).thenReturn(originalContext.getAttributionSource());
        when(mContext.getResources()).thenReturn(mResources);
        // To prevent NullPointerException at the constructor of ActivityManagerConstants.
        when(mResources.getStringArray(anyInt())).thenReturn(new String[0]);