Update a Slice Uri when unavailable
When a slice becomes unavailable, it should not update the underlying data even if the view has not changed. When we receive a change from an unavailable slice, notifychange on the Uri and do not change the underlying data. Change-Id: I91851ab668e4aece669fd65c14e0dc4ec2edefdf Fixes: 77980406 Test: robotests
This commit is contained in:
@@ -26,6 +26,8 @@ public class FakeToggleController extends TogglePreferenceController {
|
||||
|
||||
private String settingKey = "toggle_key";
|
||||
|
||||
public static final String AVAILABILITY_KEY = "fake_toggle_availability_key";
|
||||
|
||||
private final int ON = 1;
|
||||
private final int OFF = 0;
|
||||
|
||||
@@ -47,6 +49,7 @@ public class FakeToggleController extends TogglePreferenceController {
|
||||
|
||||
@Override
|
||||
public int getAvailabilityStatus() {
|
||||
return AVAILABLE;
|
||||
return Settings.Global.getInt(mContext.getContentResolver(),
|
||||
AVAILABILITY_KEY, AVAILABLE);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user