Merge "Fix DataSaverBackend objects created on background threads" into oc-dr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
3161375f78
@@ -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