Skip to content

Commit

Permalink
DLC: Remove Playstore code
Browse files Browse the repository at this point in the history
  • Loading branch information
ankushdutt committed Aug 9, 2023
1 parent cb12448 commit a794b0c
Show file tree
Hide file tree
Showing 11 changed files with 0 additions and 191 deletions.
55 changes: 0 additions & 55 deletions backends/dlc/android/playstore.cpp

This file was deleted.

60 changes: 0 additions & 60 deletions backends/dlc/android/playstore.h

This file was deleted.

12 changes: 0 additions & 12 deletions backends/dlc/scummvmcloud.h
Expand Up @@ -43,18 +43,6 @@ class ScummVMCloud : public DLC::Store {
ScummVMCloud() {}
virtual ~ScummVMCloud() {}

virtual void init() override {}

virtual void requestInfo() override {}

virtual void getDownloadState() override {}

virtual void requestDownload() override {}

virtual void getBytesDownloaded() override {}

virtual void cancelDownload() override {}

virtual void getAllDLCs() override;

virtual void startDownloadAsync(const Common::String &id, const Common::String &url) override;
Expand Down
12 changes: 0 additions & 12 deletions backends/dlc/store.h
Expand Up @@ -35,18 +35,6 @@ class Store {
Store() {}
virtual ~Store() {}

virtual void init() = 0;

virtual void requestInfo() = 0;

virtual void getDownloadState() = 0;

virtual void requestDownload() = 0;

virtual void getBytesDownloaded() = 0;

virtual void cancelDownload() = 0;

virtual void getAllDLCs() = 0;

virtual void startDownloadAsync(const Common::String &id, const Common::String &url) = 0;
Expand Down
4 changes: 0 additions & 4 deletions backends/module.mk
Expand Up @@ -77,10 +77,6 @@ endif
ifdef USE_DLC
MODULE_OBJS += \
dlc/dlcmanager.o
ifeq ($(BACKEND),android)
MODULE_OBJS += \
dlc/android/playstore.o
endif
endif

ifdef USE_LIBCURL
Expand Down
12 changes: 0 additions & 12 deletions backends/platform/android/android.cpp
Expand Up @@ -72,8 +72,6 @@
#include "backends/keymapper/keymapper-defaults.h"
#include "backends/keymapper/standard-actions.h"

#include "backends/dlc/android/playstore.h"

#include "common/util.h"
#include "common/textconsole.h"
#include "common/rect.h"
Expand Down Expand Up @@ -219,10 +217,6 @@ OSystem_Android::OSystem_Android(int audio_sample_rate, int audio_buffer_size) :
fsFactory.initSAF();
}
_fsFactory = &fsFactory;

#if defined(USE_DLC)
_dlcStore = new DLC::PlayStore::PlayStore();
#endif
}

OSystem_Android::~OSystem_Android() {
Expand Down Expand Up @@ -257,9 +251,6 @@ OSystem_Android::~OSystem_Android() {

delete _logger;
_logger = nullptr;

delete _dlcStore;
_dlcStore = nullptr;
}

void *OSystem_Android::timerThreadFunc(void *arg) {
Expand Down Expand Up @@ -641,9 +632,6 @@ bool OSystem_Android::hasFeature(Feature f) {
f == kFeatureJoystickDeadzone) {
return true;
}
#if defined(USE_DLC)
if (f == kFeatureDLC) return true;
#endif
/* Even if we are using the 2D graphics manager,
* we are at one initGraphics3d call of supporting GLES2 */
if (f == kFeatureOpenGLForGame) return true;
Expand Down
21 changes: 0 additions & 21 deletions backends/platform/android/jni-android.cpp
Expand Up @@ -107,8 +107,6 @@ jmethodID JNI::_MID_getNewSAFTree = 0;
jmethodID JNI::_MID_getSAFTrees = 0;
jmethodID JNI::_MID_findSAFTree = 0;

jmethodID JNI::_MID_getPlayStoreDLCManager = 0;

jmethodID JNI::_MID_EGL10_eglSwapBuffers = 0;

jmethodID JNI::_MID_AudioTrack_flush = 0;
Expand Down Expand Up @@ -802,8 +800,6 @@ void JNI::create(JNIEnv *env, jobject self, jobject asset_manager,
FIND_METHOD(, getSAFTrees, "()[Lorg/scummvm/scummvm/SAFFSTree;");
FIND_METHOD(, findSAFTree, "(Ljava/lang/String;)Lorg/scummvm/scummvm/SAFFSTree;");

FIND_METHOD(, getPlayStoreDLCManager, "()Lcom/google/android/play/core/assetpacks/AssetPackManager;");

_jobj_egl = env->NewGlobalRef(egl);
_jobj_egl_display = env->NewGlobalRef(egl_display);
_egl_version = 0;
Expand Down Expand Up @@ -1153,21 +1149,4 @@ jobject JNI::findSAFTree(const Common::String &name) {
return tree;
}

jobject JNI::getPlayStoreDLCManager() {
JNIEnv *env = JNI::getEnv();

jobject store = env->CallObjectMethod(_jobj, _MID_getPlayStoreDLCManager);

if (env->ExceptionCheck()) {
LOGE("getPlayStoreDLCManager: error");

env->ExceptionDescribe();
env->ExceptionClear();

return nullptr;
}

return store;
}

#endif
3 changes: 0 additions & 3 deletions backends/platform/android/jni-android.h
Expand Up @@ -119,7 +119,6 @@ class JNI {
static jobject getNewSAFTree(bool folder, bool writable, const Common::String &initURI, const Common::String &prompt);
static Common::Array<jobject> getSAFTrees();
static jobject findSAFTree(const Common::String &name);
static jobject getPlayStoreDLCManager();

private:
static pthread_key_t _env_tls;
Expand Down Expand Up @@ -165,8 +164,6 @@ class JNI {
static jmethodID _MID_getSAFTrees;
static jmethodID _MID_findSAFTree;

static jmethodID _MID_getPlayStoreDLCManager;

static jmethodID _MID_EGL10_eglSwapBuffers;

static jmethodID _MID_AudioTrack_flush;
Expand Down
3 changes: 0 additions & 3 deletions backends/platform/android/org/scummvm/scummvm/ScummVM.java
Expand Up @@ -12,8 +12,6 @@
import android.util.Log;
import android.view.SurfaceHolder;

import com.google.android.play.core.assetpacks.AssetPackManager;

import java.util.LinkedHashMap;
import java.util.Locale;
import java.util.Scanner;
Expand Down Expand Up @@ -92,7 +90,6 @@ final public native void pushEvent(int type, int arg1, int arg2, int arg3,
abstract protected SAFFSTree getNewSAFTree(boolean folder, boolean write, String initialURI, String prompt);
abstract protected SAFFSTree[] getSAFTrees();
abstract protected SAFFSTree findSAFTree(String name);
abstract protected AssetPackManager getPlayStoreDLCManager();

public ScummVM(AssetManager asset_manager, SurfaceHolder holder, final MyScummVMDestroyedCallback scummVMDestroyedCallback) {
_asset_manager = asset_manager;
Expand Down
Expand Up @@ -48,9 +48,6 @@
import androidx.annotation.NonNull;
import androidx.annotation.RequiresApi;

import com.google.android.play.core.assetpacks.AssetPackManager;
import com.google.android.play.core.assetpacks.AssetPackManagerFactory;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
Expand Down Expand Up @@ -880,11 +877,6 @@ protected SAFFSTree[] getSAFTrees() {
protected SAFFSTree findSAFTree(String name) {
return SAFFSTree.findTree(ScummVMActivity.this, name);
}

@Override
protected AssetPackManager getPlayStoreDLCManager() {
return AssetPackManagerFactory.getInstance(getApplicationContext());
}
}

private MyScummVM _scummvm;
Expand Down
1 change: 0 additions & 1 deletion dists/android/build.gradle
Expand Up @@ -108,5 +108,4 @@ android {
dependencies {
implementation "androidx.annotation:annotation:1.5.0"
implementation "androidx.appcompat:appcompat:1.6.1"
implementation "com.google.android.play:asset-delivery:2.1.0"
}

0 comments on commit a794b0c

Please sign in to comment.