serviceTypeFromAndroidValues static method

ForegroundServiceType serviceTypeFromAndroidValues(
  1. int value
)

Implementation

static ForegroundServiceType serviceTypeFromAndroidValues(int value) {
  switch (value) {
    case -1:
      return ForegroundServiceType.manifest;
    case 1:
      return ForegroundServiceType.dataSync;
    case 2:
      return ForegroundServiceType.mediaPlayback;
    case 4:
      return ForegroundServiceType.phoneCall;
    case 8:
      return ForegroundServiceType.location;
    case 16:
      return ForegroundServiceType.connectedDevice;
    case 32:
      return ForegroundServiceType.mediaProjection;
    case 64:
      return ForegroundServiceType.camera;
    case 128:
      return ForegroundServiceType.microphone;
    case 0:
    default:
      return ForegroundServiceType.none;
  }
}