VUI fixes & improvements pt.2

Added GameService for the time the game runs
Added refcount to ProgressService  (renamed from LazyService)
Moved notification channel creation to Tools
Now the game behaves better in the background
Now the game fully exits on swipe-up
This commit is contained in:
artdeell 2022-11-10 17:22:16 +03:00 committed by ArtDev
parent 93396eff44
commit a824c5f4f5
8 changed files with 169 additions and 101 deletions

View file

@ -32,6 +32,7 @@ import net.kdt.pojavlaunch.customcontrols.keyboard.TouchCharInput;
import net.kdt.pojavlaunch.multirt.MultiRTUtils;
import net.kdt.pojavlaunch.prefs.*;
import net.kdt.pojavlaunch.services.GameService;
import net.kdt.pojavlaunch.utils.*;
import net.kdt.pojavlaunch.value.*;
import net.kdt.pojavlaunch.value.launcherprofiles.LauncherProfiles;
@ -77,7 +78,7 @@ public class MainActivity extends BaseActivity {
if(LauncherProfiles.mainProfileJson == null) LauncherProfiles.update();
minecraftProfile = LauncherProfiles.mainProfileJson.profiles.get(LauncherPreferences.DEFAULT_PREF.getString(LauncherPreferences.PREF_KEY_CURRENT_PROFILE,""));
MCOptionUtils.load(Tools.getGameDirPath(minecraftProfile));
GameService.startService(this);
initLayout(R.layout.activity_basemain);
getWindow().setBackgroundDrawable(null);