Merge branch 'master' of https://github.com/Anuken/Mindustry into 4.0

This commit is contained in:
Anuken
2018-04-28 16:28:58 -04:00
114 changed files with 509 additions and 129 deletions
+3 -2
View File
@@ -10,6 +10,7 @@ repositories {
dependencies {
implementation 'com.android.support:support-v4:22.1.1'
implementation 'org.sufficientlysecure:donations:2.5'
implementation 'com.google.android.gms:play-services-auth:11.8.0'
}
task deploy(type: Copy){
@@ -22,7 +23,7 @@ task deploy(type: Copy){
android {
buildToolsVersion '26.0.2'
compileSdkVersion 27
compileSdkVersion 26
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
@@ -58,7 +59,7 @@ android {
}
applicationId "io.anuke.mindustry"
minSdkVersion 9
minSdkVersion 14
targetSdkVersion 27
versionCode code
versionName versionNameResult
@@ -8,9 +8,14 @@ import android.os.Build;
import android.os.Bundle;
import android.provider.Settings.Secure;
import android.telephony.TelephonyManager;
import android.util.Log;
import com.badlogic.gdx.backends.android.AndroidApplication;
import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;
import com.badlogic.gdx.utils.Base64Coder;
import com.google.android.gms.common.GoogleApiAvailability;
import com.google.android.gms.common.GooglePlayServicesNotAvailableException;
import com.google.android.gms.common.GooglePlayServicesRepairableException;
import com.google.android.gms.security.ProviderInstaller;
import io.anuke.kryonet.DefaultThreadImpl;
import io.anuke.kryonet.KryoClient;
import io.anuke.kryonet.KryoServer;
@@ -119,9 +124,8 @@ public class AndroidLauncher extends AndroidApplication{
return data;
}catch (Exception e){
Settings.defaults("uuid", "");
String uuid = Settings.getString("uuid");
String uuid = Settings.getString("uuid", "");
if(uuid.isEmpty()){
byte[] result = new byte[8];
new Random().nextBytes(result);
@@ -135,6 +139,15 @@ public class AndroidLauncher extends AndroidApplication{
}
};
try {
ProviderInstaller.installIfNeeded(this);
} catch (GooglePlayServicesRepairableException e) {
GoogleApiAvailability apiAvailability = GoogleApiAvailability.getInstance();
apiAvailability.getErrorDialog(this, e.getConnectionStatusCode(), 0).show();
} catch (GooglePlayServicesNotAvailableException e) {
Log.e("SecurityException", "Google Play Services not available.");
}
if(doubleScaleTablets && isTablet(this.getContext())){
Unit.dp.addition = 0.5f;
}
@@ -26,7 +26,7 @@ public class TextFieldDialogListener extends ClickListener{
}
public static void add(TextField field){
add(field, 0, 15);
add(field, 0, 16);
}
//type - 0 is text, 1 is numbers, 2 is decimals