From 4081792d4ffacf1b62a3d52b5f5116f0df046d61 Mon Sep 17 00:00:00 2001 From: Mikhael Danilov Date: Sat, 4 Jan 2025 23:44:17 +0300 Subject: [PATCH] Fix android build --- .../android/java/com/nyrds/platform/audio/MusicManager.java | 1 + .../src/android/java/com/nyrds/platform/audio/Sample.java | 3 +-- .../android/java/com/nyrds/platform/storage/Preferences.java | 4 ++++ .../src/fdroid/java/com/nyrds/platform/EventCollector.java | 3 ++- settings.gradle | 4 ++-- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/RemixedDungeon/src/android/java/com/nyrds/platform/audio/MusicManager.java b/RemixedDungeon/src/android/java/com/nyrds/platform/audio/MusicManager.java index c707b3857..aeab61f48 100644 --- a/RemixedDungeon/src/android/java/com/nyrds/platform/audio/MusicManager.java +++ b/RemixedDungeon/src/android/java/com/nyrds/platform/audio/MusicManager.java @@ -21,6 +21,7 @@ import android.media.AudioManager; import android.media.MediaPlayer; +import com.nyrds.pixeldungeon.game.GamePreferences; import com.nyrds.platform.EventCollector; import com.nyrds.platform.game.Game; import com.nyrds.util.ModdingMode; diff --git a/RemixedDungeon/src/android/java/com/nyrds/platform/audio/Sample.java b/RemixedDungeon/src/android/java/com/nyrds/platform/audio/Sample.java index 5c7844567..27b1cdff1 100644 --- a/RemixedDungeon/src/android/java/com/nyrds/platform/audio/Sample.java +++ b/RemixedDungeon/src/android/java/com/nyrds/platform/audio/Sample.java @@ -22,9 +22,8 @@ import android.media.AudioManager; import android.media.SoundPool; - - import com.nyrds.pixeldungeon.game.GameLoop; +import com.nyrds.pixeldungeon.game.GamePreferences; import com.nyrds.platform.EventCollector; import com.nyrds.platform.game.Game; import com.nyrds.util.ModdingMode; diff --git a/RemixedDungeon/src/android/java/com/nyrds/platform/storage/Preferences.java b/RemixedDungeon/src/android/java/com/nyrds/platform/storage/Preferences.java index b8fa0ca7b..0822da70c 100644 --- a/RemixedDungeon/src/android/java/com/nyrds/platform/storage/Preferences.java +++ b/RemixedDungeon/src/android/java/com/nyrds/platform/storage/Preferences.java @@ -17,6 +17,10 @@ public enum Preferences { INSTANCE; + public static final String KEY_LANDSCAPE = "landscape"; + public static final String KEY_USE_PLAY_GAMES = "use_play_games"; + public static final String KEY_EU_CONSENT_LEVEL = "eu_consent_level"; + private SharedPreferences prefs; private final Map intCache = new HashMap<>(); diff --git a/RemixedDungeon/src/fdroid/java/com/nyrds/platform/EventCollector.java b/RemixedDungeon/src/fdroid/java/com/nyrds/platform/EventCollector.java index 70f596d53..6cbca42db 100644 --- a/RemixedDungeon/src/fdroid/java/com/nyrds/platform/EventCollector.java +++ b/RemixedDungeon/src/fdroid/java/com/nyrds/platform/EventCollector.java @@ -1,5 +1,6 @@ package com.nyrds.platform; +import com.nyrds.platform.storage.CommonPrefs; import com.nyrds.platform.storage.Preferences; import com.nyrds.util.Util; import com.watabou.pixeldungeon.utils.GLog; @@ -13,7 +14,7 @@ public class EventCollector { private static boolean analyticsUsable() { - return Preferences.INSTANCE.getInt(Preferences.KEY_COLLECT_STATS, 1) > 0; + return Preferences.INSTANCE.getInt(CommonPrefs.KEY_COLLECT_STATS, 1) > 0; } static public void init() { diff --git a/settings.gradle b/settings.gradle index 1eeb76645..aa76d881a 100644 --- a/settings.gradle +++ b/settings.gradle @@ -13,5 +13,5 @@ dependencyResolutionManagement { maven { url 'https://developer.huawei.com/repo/' } } } -//include ':RemixedDungeon' -include ':RemixedDungeonDesktop' +include ':RemixedDungeon' +//include ':RemixedDungeonDesktop'