Merge "Fix settings page flicker in two ways: 1. On create use UiBlocker as recommended by settings team 2. On resume only update the preferences list if the system setting has changed." into tm-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
798a0fab9c
@@ -20,6 +20,7 @@ import static org.mockito.Mockito.spy;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
import android.content.ContentResolver;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
|
||||
@@ -41,6 +42,8 @@ public class LocationSettingsTest {
|
||||
private SettingsActivity mActivity;
|
||||
@Mock
|
||||
private SettingsMainSwitchBar mSwitchBar;
|
||||
@Mock
|
||||
private ContentResolver mContentResolver;
|
||||
|
||||
private Context mContext;
|
||||
private LocationSettings mLocationSettings;
|
||||
@@ -52,6 +55,7 @@ public class LocationSettingsTest {
|
||||
mLocationSettings = spy(new LocationSettings());
|
||||
doReturn(mActivity).when(mLocationSettings).getActivity();
|
||||
doReturn(mContext).when(mLocationSettings).getContext();
|
||||
doReturn(mContentResolver).when(mActivity).getContentResolver();
|
||||
when(mActivity.getSwitchBar()).thenReturn(mSwitchBar);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user