Modify test cases according to change in remove preference behavior.

Bug: 35365702
Test: make RunSettingsRoboTests
Change-Id: I541f4bd946116c766a90da955c11933a5499fa93
This commit is contained in:
Doris Ling
2017-02-16 16:35:26 -08:00
parent db59347c29
commit 8a7504eb12
14 changed files with 72 additions and 14 deletions

View File

@@ -50,6 +50,9 @@ public class AppLocationPermissionPreferenceControllerTest {
Settings.System.putInt(mContext.getContentResolver(),
android.provider.Settings.Global.LOCATION_SETTINGS_LINK_TO_PERMISSIONS_ENABLED,
0);
when(mScreen.getPreferenceCount()).thenReturn(1);
when(mScreen.getPreference(0)).thenReturn(mPreference);
when(mPreference.getKey()).thenReturn(mController.getPreferenceKey());
mController.displayPreference(mScreen);