diff --git a/2.1.03-Exercise-FileLoading/core/src/com/udacity/gamedev/fileloading/FileLoading.java b/2.1.03-Exercise-FileLoading/core/src/com/udacity/gamedev/fileloading/FileLoading.java index 58085c3..1309f1f 100644 --- a/2.1.03-Exercise-FileLoading/core/src/com/udacity/gamedev/fileloading/FileLoading.java +++ b/2.1.03-Exercise-FileLoading/core/src/com/udacity/gamedev/fileloading/FileLoading.java @@ -29,7 +29,7 @@ public static String encrypt(String message) { Cipher cipher = Cipher.getInstance("AES"); cipher.init(Cipher.ENCRYPT_MODE, key); byte[] encryptedBytes = cipher.doFinal(message.getBytes()); - if (Gdx.app.getType() == ApplicationType.Android){ + if (Gdx.app.getType() != ApplicationType.Desktop){ throw new Exception("This demo works only with the desktop backend"); } return Base64.encodeBase64String(encryptedBytes); @@ -43,7 +43,7 @@ public static String decrypt(String encrypted) { try { Cipher cipher = Cipher.getInstance("AES"); cipher.init(Cipher.DECRYPT_MODE, key); - if (Gdx.app.getType() == ApplicationType.Android){ + if (Gdx.app.getType() != ApplicationType.Desktop){ throw new Exception("This demo works only with the desktop backend"); } byte[] encryptedBytes = Base64.decodeBase64(encrypted);