Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reuse common AssetExtract.java #2182

Merged
merged 1 commit into from
May 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions pythonforandroid/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,6 @@ def get_build_dir(self):
def get_dist_dir(self, name):
return join(self.ctx.dist_dir, name)

def get_common_dir(self):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no longer needed since #2092

return os.path.abspath(join(self.bootstrap_dir, "..", 'common'))

@property
def name(self):
modname = self.__class__.__module__
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import java.io.*;

import android.app.Activity;
import android.content.Context;
import android.util.Log;

import java.io.BufferedInputStream;
Expand All @@ -24,11 +24,9 @@
public class AssetExtract {

private AssetManager mAssetManager = null;
private Activity mActivity = null;

public AssetExtract(Activity act) {
mActivity = act;
mAssetManager = act.getAssets();
public AssetExtract(Context context) {
mAssetManager = context.getAssets();
}

public boolean extractTar(String asset, String target) {
Expand Down

This file was deleted.

3 changes: 0 additions & 3 deletions tests/test_bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,6 @@ def test_build_dist_dirs(self):
bs.get_build_dir().endswith("build/bootstrap_builds/sdl2")
)
self.assertTrue(bs.get_dist_dir("test_prj").endswith("dists/test_prj"))
self.assertTrue(
bs.get_common_dir().endswith("pythonforandroid/bootstraps/common")
)

def test__cmp_bootstraps_by_priority(self):
# Test service_only has higher priority than sdl2:
Expand Down