The resources available to tests are now exactly the merged resources located in the APK under test. Bug: 74359828 Test: make -j56 RunSettingsRoboTests Change-Id: I050db81a92decefea23314b5ec7a62f77ff4bb2b
26 lines
664 B
Java
26 lines
664 B
Java
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);
|
|
}
|
|
|
|
@Override
|
|
public boolean isSliceable() {
|
|
return true;
|
|
}
|
|
}
|