Merge "Fix DataSaverBackend objects created on background threads" into oc-mr1-dev am: e0c0616d6f

am: f9831dc7be

Change-Id: Ic310159af3c87a4d91445806c65976457c6ae2c0
This commit is contained in:
Matthew Fritze
2017-08-09 18:57:08 +00:00
committed by android-build-merger
2 changed files with 25 additions and 13 deletions

View File

@@ -0,0 +1,21 @@
package com.android.settings.testutils.shadow;
import com.android.settings.datausage.DataSaverBackend;
import org.robolectric.annotation.Implementation;
import org.robolectric.annotation.Implements;
@Implements(DataSaverBackend.class)
public class ShadowDataSaverBackend {
private static boolean isEnabled = true;
@Implementation
public boolean isDataSaverEnabled() {
return isEnabled;
}
@Implementation
public void setDataSaverEnabled(boolean enabled) {
isEnabled = enabled;
}
}