From 4f841c438eed4f84237eb319a886a1d46a8f5a59 Mon Sep 17 00:00:00 2001 From: rafal1137 Date: Mon, 15 Jun 2020 00:28:47 +0200 Subject: [PATCH] java: small reformating --- app/src/main/java/org/etlegacy/app/ETLMain.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/etlegacy/app/ETLMain.java b/app/src/main/java/org/etlegacy/app/ETLMain.java index 67bf950..2a6e5bf 100644 --- a/app/src/main/java/org/etlegacy/app/ETLMain.java +++ b/app/src/main/java/org/etlegacy/app/ETLMain.java @@ -116,6 +116,8 @@ public class ETLMain extends Activity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); + String etl_pak = "legacy_v2.76.pk3"; + getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); ImageView imageView = new ImageView(this); @@ -131,13 +133,13 @@ public class ETLMain extends Activity { etl_Layout.addView(imageView, etl_Params); setContentView(etl_Layout); - final File etl_etlegacy = new File(getExternalFilesDir(null), "etlegacy/legacy/legacy_v2.76.pk3"); + final File etl_etlegacy = new File(getExternalFilesDir(null), "etlegacy/legacy/".concat(etl_pak)); if (!etl_etlegacy.exists()) { AssetManager assManager = getApplicationContext().getAssets(); InputStream is = null; try { - is = assManager.open("legacy_v2.76.pk3"); + is = assManager.open(etl_pak); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace();