Merge "Fix DataSaverBackend objects created on background threads" into oc-mr1-dev am: e0c0616d6f
am: f9831dc7be
Change-Id: Ic310159af3c87a4d91445806c65976457c6ae2c0
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user