code: public static void setServiceAvailability(String service, boolean available) {
      if (available) {
        unavailableServices.remove(service);
      } else {
        unavailableServices.add(service);
      }
    }
docs: Sets the availability of the given system service. If the service is set as unavailable,
  subsequent calls to {@link Context#getSystemService} for that service will return {@code null}.