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:
Matthew Fritze
2018-04-12 16:40:07 -07:00
parent d743f20618
commit 7acd13f3e4
6 changed files with 111 additions and 15 deletions

View File

@@ -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);
}
}