1 package com.android.settings.testutils;
2 
3 import android.content.Context;
4 import android.provider.Settings;
5 
6 import com.android.settings.core.BasePreferenceController;
7 
8 public class FakeUnavailablePreferenceController extends BasePreferenceController {
9 
10     public static final String AVAILABILITY_KEY = "fake_availability_key";
11 
FakeUnavailablePreferenceController(Context context)12     public FakeUnavailablePreferenceController(Context context) {
13         super(context, "key");
14     }
15 
16     @Override
getAvailabilityStatus()17     public int getAvailabilityStatus() {
18         return Settings.Global.getInt(mContext.getContentResolver(), AVAILABILITY_KEY, 0);
19     }
20 
21     @Override
isSliceable()22     public boolean isSliceable() {
23         return true;
24     }
25 }
26