/** * @return random name for APK file name (ends with .apk suffix) */ public static String getRandomAPKFileName() { return aig.getIdentifier(FileType.APK); }
/** * Creates empty file saved under {@code parent} * * @param parent parent directory of file to create * @return empty file saved in parent with random name */ public static File createRandomEmptyFile(File parent) { File temp; try { do { temp = new File(parent, aig.getIdentifier(FileType.FILE)); } while (!temp.createNewFile()); } catch (IOException ex) { throw new RuntimeException("Unable to create file in " + parent.getAbsolutePath()); } return temp; }
String sdCardLabel = idGenerator.get().getIdentifier(FileType.SD_CARD_LABEL); sdCard.setLabel(sdCardLabel); if (sdCard.getFileName() == null) { String sdCardName = new File(droidiumPlatformConfiguration.get().getTmpDir(), idGenerator.get().getIdentifier(FileType.SD_CARD)).getAbsolutePath();
String sdCardLabel = idGenerator.get().getIdentifier(IdentifierType.SD_CARD_LABEL.getClass()); sdCard.setLabel(sdCardLabel); if (sdCard.getFileName() == null) { String sdCardName = SD_CARD_DEFAULT_DIR_PATH + idGenerator.get().getIdentifier(IdentifierType.SD_CARD.getClass()); sdCard.setFileName(sdCardName); configuration.setSdCard(sdCardName);
String generatedAvdName = idGenerator.get().getIdentifier(FileType.AVD); configuration.setAvdName(generatedAvdName); configuration.setAvdGenerated(true);
String generatedAvdName = idGenerator.get().getIdentifier(IdentifierType.AVD.getClass()); configuration.get().setAvdName(generatedAvdName); configuration.get().setAvdGenerated(true);