diff --git a/android/src/io/anuke/mindustry/AndroidLauncher.java b/android/src/io/anuke/mindustry/AndroidLauncher.java index a3a9a3fd4185..6b971c544795 100644 --- a/android/src/io/anuke/mindustry/AndroidLauncher.java +++ b/android/src/io/anuke/mindustry/AndroidLauncher.java @@ -108,21 +108,6 @@ public byte[] getUUID() { String s = Secure.getString(getContext().getContentResolver(), Secure.ANDROID_ID); - if(s == null){ - Settings.defaults("uuid", ""); - - String uuid = Settings.getString("uuid"); - if(uuid.isEmpty()){ - byte[] result = new byte[8]; - new Random().nextBytes(result); - uuid = new String(Base64Coder.encode(result)); - Settings.putString("uuid", uuid); - Settings.save(); - return result; - } - return Base64Coder.decode(uuid); - } - int len = s.length(); byte[] data = new byte[len / 2]; for (int i = 0; i < len; i += 2) { @@ -132,7 +117,18 @@ public byte[] getUUID() { return data; }catch (Exception e){ - return null; + Settings.defaults("uuid", ""); + + String uuid = Settings.getString("uuid"); + if(uuid.isEmpty()){ + byte[] result = new byte[8]; + new Random().nextBytes(result); + uuid = new String(Base64Coder.encode(result)); + Settings.putString("uuid", uuid); + Settings.save(); + return result; + } + return Base64Coder.decode(uuid); } } }; diff --git a/core/assets/version.properties b/core/assets/version.properties index 8cb2f67c88d0..ef6182b9ef0a 100644 --- a/core/assets/version.properties +++ b/core/assets/version.properties @@ -1,7 +1,7 @@ #Autogenerated file. Do not modify. -#Thu Mar 08 20:46:47 EST 2018 +#Thu Mar 08 22:36:02 EST 2018 version=release -androidBuildCode=357 +androidBuildCode=359 name=Mindustry code=3.4 -build=33 +build=custom build