AvdWizardUtils { @VisibleForTesting static boolean emulatorSupportsWebp(@NotNull AndroidSdkHandler sdkHandler) { return emulatorVersionIsAtLeast(sdkHandler, MIN_WEBP_VERSION); }  @NotNull static Storage getDefaultRam(@NotNull Hardware hardware); @NotNull static Storage getMaxPossibleRam(); static int getMaxCpuCores(); @Nullable static String getHardwarePropertyDefaultValue(String name, @Nullable AndroidSdkHandler sdkHandler); static String cleanAvdName(@NotNull AvdManagerConnection connection, @NotNull String candidateBase, boolean uniquify); @Nullable static File pathToUpdatedSkins(@Nullable File deviceFile, @Nullable SystemImageDescription image, @NotNull FileOp fop); @VisibleForTesting @Nullable static File ensureSkinsAreCurrent(@Nullable File resourcePath,
                                           @Nullable File skinDestination,
                                           @Nullable File deviceName,
                                           boolean emulatorCanDecodeWebp,
                                           @NotNull FileOp fop); static ModelWizardDialog createAvdWizard(@Nullable Component parent,
                                                  @Nullable Project project); static ModelWizardDialog createAvdWizard(@Nullable Component parent,
                                                  @Nullable Project project,
                                                  @Nullable AvdInfo avdInfo); static ModelWizardDialog createAvdWizard(@Nullable Component parent,
                                                  @Nullable Project project,
                                                  @NotNull AvdOptionsModel model); static ModelWizardDialog createAvdWizardForDuplication(@Nullable Component parent,
                                                                @Nullable Project project,
                                                                @NotNull  AvdInfo avdInfo); static final String WIZARD_ONLY; static final String DEVICE_DEFINITION_KEY; static final String SYSTEM_IMAGE_KEY; static final String RAM_STORAGE_KEY; static final String VM_HEAP_STORAGE_KEY; static final String INTERNAL_STORAGE_KEY; static final String SD_CARD_STORAGE_KEY; static final String EXISTING_SD_LOCATION; static final String DISPLAY_SD_SIZE_KEY; static final String DISPLAY_SD_LOCATION_KEY; static final String DISPLAY_USE_EXTERNAL_SD_KEY; static final String DEFAULT_ORIENTATION_KEY; static final String AVD_INI_NETWORK_SPEED; static final String NETWORK_SPEED_KEY; static final String AVD_INI_NETWORK_LATENCY; static final String NETWORK_LATENCY_KEY; static final String FRONT_CAMERA_KEY; static final String BACK_CAMERA_KEY; static final String USE_HOST_GPU_KEY; static final String HOST_GPU_MODE_KEY; static final String USE_COLD_BOOT; static final String USE_FAST_BOOT; static final String USE_CHOSEN_SNAPSHOT_BOOT; static final String CHOSEN_SNAPSHOT_FILE; static final String COLD_BOOT_ONCE_VALUE; static final String IS_IN_EDIT_MODE_KEY; static final String CUSTOM_SKIN_FILE_KEY; static final String BACKUP_SKIN_FILE_KEY; static final String DEVICE_FRAME_KEY; static final String DISPLAY_NAME_KEY; static final String AVD_ID_KEY; static final String CPU_CORES_KEY; static final String HAS_HARDWARE_KEYBOARD_KEY; static final Font STANDARD_FONT; static final Font FIGURE_FONT; static final Font TITLE_FONT; static final List<IdDisplay> ALL_DEVICE_TAGS; static final List<IdDisplay> TAGS_WITH_GOOGLE_API; static final String CREATE_SKIN_HELP_LINK; static final File NO_SKIN; }
@Test public void testEmulatorSupportsWebp() { assertThat(emulatorSupportsWebp(createMockSdk("24.0.0", FD_EMULATOR))).isFalse(); assertThat(emulatorSupportsWebp(createMockSdk("25.0.0", FD_EMULATOR))).isFalse(); assertThat(emulatorSupportsWebp(createMockSdk("25.1.0", FD_EMULATOR))).isFalse(); assertThat(emulatorSupportsWebp(createMockSdk("25.1.9", FD_EMULATOR))).isFalse(); assertThat(emulatorSupportsWebp(createMockSdk("25.2.0", FD_EMULATOR))).isFalse(); assertThat(emulatorSupportsWebp(createMockSdk("25.2.2", FD_EMULATOR))).isFalse(); assertThat(emulatorSupportsWebp(createMockSdk("25.2.3", FD_EMULATOR))).isTrue(); assertThat(emulatorSupportsWebp(createMockSdk("25.3.0", FD_EMULATOR))).isTrue(); assertThat(emulatorSupportsWebp(createMockSdk("26.0.0", FD_EMULATOR))).isTrue(); assertThat(emulatorSupportsWebp(createMockSdk("25.2.3", "irrelevant"))).isFalse(); }