diff --git a/android/src/io/anuke/mindustry/AndroidLauncher.java b/android/src/io/anuke/mindustry/AndroidLauncher.java index d7dd912ca8..a21e03ae62 100644 --- a/android/src/io/anuke/mindustry/AndroidLauncher.java +++ b/android/src/io/anuke/mindustry/AndroidLauncher.java @@ -1,12 +1,11 @@ package io.anuke.mindustry; -import android.*; import android.app.*; import android.content.*; import android.content.pm.*; import android.net.*; -import android.os.*; import android.os.Build.*; +import android.os.*; import android.provider.Settings.*; import android.telephony.*; import io.anuke.arc.*; @@ -24,7 +23,6 @@ import io.anuke.mindustry.ui.dialogs.*; import java.io.*; import java.lang.System; -import java.util.*; import static io.anuke.mindustry.Vars.*; @@ -38,13 +36,9 @@ public class AndroidLauncher extends AndroidApplication{ protected void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); AndroidApplicationConfiguration config = new AndroidApplicationConfiguration(); - config.useImmersiveMode = true; - config.depth = 0; if(doubleScaleTablets && isTablet(this.getContext())){ UnitScl.dp.addition = 0.5f; } - - config.hideStatusBar = true; Net.setClientProvider(new ArcNetClient()); Net.setServerProvider(new ArcNetServer()); initialize(new ClientLauncher(){ @@ -72,24 +66,6 @@ public class AndroidLauncher extends AndroidApplication{ } } - @Override - public void requestExternalPerms(Runnable callback){ - if(Build.VERSION.SDK_INT < Build.VERSION_CODES.M || (checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED && - checkSelfPermission(Manifest.permission.READ_EXTERNAL_STORAGE) == PackageManager.PERMISSION_GRANTED)){ - callback.run(); - }else{ - permCallback = callback; - ArrayList perms = new ArrayList<>(); - if(checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED){ - perms.add(Manifest.permission.WRITE_EXTERNAL_STORAGE); - } - if(checkSelfPermission(Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED){ - perms.add(Manifest.permission.READ_EXTERNAL_STORAGE); - } - requestPermissions(perms.toArray(new String[0]), PERMISSION_REQUEST_CODE); - } - } - @Override public void shareFile(FileHandle file){ } @@ -97,7 +73,6 @@ public class AndroidLauncher extends AndroidApplication{ @Override public void showFileChooser(boolean open, String extension, Consumer cons){ if(VERSION.SDK_INT >= 19){ - Intent intent = new Intent(open ? Intent.ACTION_OPEN_DOCUMENT : Intent.ACTION_CREATE_DOCUMENT); intent.addCategory(Intent.CATEGORY_OPENABLE); intent.setType("*/*"); @@ -145,7 +120,11 @@ public class AndroidLauncher extends AndroidApplication{ public boolean canDonate(){ return true; } - }, config); + }, new AndroidApplicationConfiguration(){{ + config.useImmersiveMode = true; + config.depth = 0; + config.hideStatusBar = true; + }}); checkFiles(getIntent()); } diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index c451cfd568..eb9410b09e 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -233,7 +233,7 @@ editor.removeunit = Remove Unit editor.teams = Teams editor.errorload = Error loading file:\n[accent]{0} editor.errorsave = Error saving file:\n[accent]{0} -editor.errorimage = That's an image, not a map.\n\nIf you want to import a 3.5/build 40 map, use the 'Import Legacy Map' button in the editor. +editor.errorimage = That's an image, not a map.\n\nIf you want to import a 3.5/build 40 map, use the 'Import Legacy MThereap' button in the editor. editor.errorlegacy = This map is too old, and uses a legacy map format that is no longer supported. editor.errornot = This is not a map file. editor.errorheader = This map file is either not valid or corrupt. diff --git a/core/src/io/anuke/mindustry/core/Platform.java b/core/src/io/anuke/mindustry/core/Platform.java index 7e008136a5..feb23335b6 100644 --- a/core/src/io/anuke/mindustry/core/Platform.java +++ b/core/src/io/anuke/mindustry/core/Platform.java @@ -36,11 +36,6 @@ public interface Platform{ }); } - /** Request external read/write perms. Run callback when complete.*/ - default void requestExternalPerms(Runnable callback){ - callback.run(); - } - /** Update discord RPC. */ default void updateRPC(){ }