Establish permanently unavailable settings

Distinguish between settings which are permanently unavailable on
the device, and temporarily unavailable. This enables us to restrict
which setting slices are exposed in onSliceGetDescendants.

The primary changes in this CL are renaming:
"DISABLED_UNSUPPORTED" -> "UNSUPPORTED_ON_DEVICE"
to be more clear the the setting will cannot be accessed on the device, and,
adding a new enum to encapsulate settings which are currently unavailable, but
could be enabled in the future.

Also remove UNAVAILABLE_UNKNOWN. Devs should never need this enum.

Bug: 78910582
Bug: 79245656
Test: robotests
Change-Id: I58821a6cfd6134b3b351657b6edf5f74ead00643
This commit is contained in:
Matthew Fritze
2018-05-03 16:46:51 -07:00
parent 1220c364c4
commit f87a1f3f41
113 changed files with 185 additions and 207 deletions

View File

@@ -93,7 +93,7 @@ public class AirplaneModePreferenceController extends TogglePreferenceController
@Override
@AvailabilityStatus
public int getAvailabilityStatus() {
return isAvailable(mContext) ? AVAILABLE : DISABLED_UNSUPPORTED;
return isAvailable(mContext) ? AVAILABLE : UNSUPPORTED_ON_DEVICE;
}
@Override