Exclude "Download" service/activity from embed flavor.

This commit is contained in:
Miku AuahDark
2020-01-31 21:34:21 +08:00
parent 5a80990790
commit 7999e17a76
4 changed files with 10 additions and 5 deletions
+5 -5
View File
@@ -27,7 +27,7 @@ android {
} }
buildTypes { buildTypes {
release { release {
minifyEnabled false minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
} }
} }
@@ -47,13 +47,13 @@ android {
sourceSets { sourceSets {
main { main {
java { java {
srcDirs('src/main/java', 'src/jni/SDL2/android-project/app/src/main/java') srcDir 'src/jni/SDL2/android-project/app/src/main/java'
srcDir 'src/main/java'
} }
} }
embed { playstore {
java { java {
exclude '**/DownloadActivity.java' srcDir 'src/normal/java'
exclude '**/DownloadService.java'
} }
} }
} }
@@ -259,6 +259,7 @@ public class GameActivity extends SDLActivity {
} }
} }
@Keep
public void setImmersiveMode(boolean immersive_mode) { public void setImmersiveMode(boolean immersive_mode) {
if (android.os.Build.VERSION.SDK_INT < 11) { if (android.os.Build.VERSION.SDK_INT < 11) {
// The API getWindow().getDecorView().setSystemUiVisibility() was // The API getWindow().getDecorView().setSystemUiVisibility() was
@@ -304,10 +305,12 @@ public class GameActivity extends SDLActivity {
; ;
} }
@Keep
public boolean getImmersiveMode() { public boolean getImmersiveMode() {
return immersiveActive; return immersiveActive;
} }
@Keep
public static String getGamePath() { public static String getGamePath() {
GameActivity self = (GameActivity) mSingleton; // use SDL provided one GameActivity self = (GameActivity) mSingleton; // use SDL provided one
Log.d("GameActivity", "called getGamePath(), game path = " + gamePath); Log.d("GameActivity", "called getGamePath(), game path = " + gamePath);
@@ -332,12 +335,14 @@ public class GameActivity extends SDLActivity {
return metrics; return metrics;
} }
@Keep
public static void vibrate(double seconds) { public static void vibrate(double seconds) {
if (vibrator != null) { if (vibrator != null) {
vibrator.vibrate((long) (seconds * 1000.)); vibrator.vibrate((long) (seconds * 1000.));
} }
} }
@Keep
public static boolean openURL(String url) { public static boolean openURL(String url) {
Log.d("GameActivity", "opening url = " + url); Log.d("GameActivity", "opening url = " + url);
try { try {