Use binary resource support in robolectric
The resources available to tests are now exactly the merged resources located in the APK under test. Bug: 74359828 Test: make -j56 RunSettingsRoboTests Change-Id: I050db81a92decefea23314b5ec7a62f77ff4bb2b
This commit is contained in:
@@ -26,15 +26,15 @@ import com.android.settings.core.TogglePreferenceController;
|
||||
|
||||
public class FakeToggleController extends TogglePreferenceController {
|
||||
|
||||
private String settingKey = "toggle_key";
|
||||
|
||||
public static final String AVAILABILITY_KEY = "fake_toggle_availability_key";
|
||||
|
||||
public static final IntentFilter INTENT_FILTER = new IntentFilter(
|
||||
WifiManager.WIFI_AP_STATE_CHANGED_ACTION);
|
||||
|
||||
private final int ON = 1;
|
||||
private final int OFF = 0;
|
||||
private static final String SETTING_KEY = "toggle_key";
|
||||
|
||||
private static final int ON = 1;
|
||||
private static final int OFF = 0;
|
||||
|
||||
private boolean mIsAsyncUpdate = false;
|
||||
|
||||
@@ -45,12 +45,12 @@ public class FakeToggleController extends TogglePreferenceController {
|
||||
@Override
|
||||
public boolean isChecked() {
|
||||
return Settings.System.getInt(mContext.getContentResolver(),
|
||||
settingKey, OFF) == ON;
|
||||
SETTING_KEY, OFF) == ON;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setChecked(boolean isChecked) {
|
||||
return Settings.System.putInt(mContext.getContentResolver(), settingKey,
|
||||
return Settings.System.putInt(mContext.getContentResolver(), SETTING_KEY,
|
||||
isChecked ? ON : OFF);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user