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:
@@ -0,0 +1,21 @@
|
||||
package com.android.settings.testutils;
|
||||
|
||||
import android.content.Context;
|
||||
import android.provider.Settings;
|
||||
|
||||
import com.android.settings.core.BasePreferenceController;
|
||||
|
||||
public class FakeUnavailablePreferenceController extends BasePreferenceController {
|
||||
|
||||
public static final String AVAILABILITY_KEY = "fake_availability_key";
|
||||
|
||||
public FakeUnavailablePreferenceController(Context context) {
|
||||
super(context, "key");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAvailabilityStatus() {
|
||||
return Settings.Global.getInt(mContext.getContentResolver(),
|
||||
AVAILABILITY_KEY, 0);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user