Skip to content

Commit 9f9a42f

Browse files
authored
Merge pull request kivy#2182 from AndreMiras/feature/share_asset_extract
Reuse common AssetExtract.java
2 parents de7d06a + 4fbcefd commit 9f9a42f

File tree

4 files changed

+3
-126
lines changed

4 files changed

+3
-126
lines changed

pythonforandroid/bootstrap.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,6 @@ def get_build_dir(self):
132132
def get_dist_dir(self, name):
133133
return join(self.ctx.dist_dir, name)
134134

135-
def get_common_dir(self):
136-
return os.path.abspath(join(self.bootstrap_dir, "..", 'common'))
137-
138135
@property
139136
def name(self):
140137
modname = self.__class__.__module__

pythonforandroid/bootstraps/common/build/src/main/java/org/renpy/android/AssetExtract.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import java.io.*;
66

7-
import android.app.Activity;
7+
import android.content.Context;
88
import android.util.Log;
99

1010
import java.io.BufferedInputStream;
@@ -24,11 +24,9 @@
2424
public class AssetExtract {
2525

2626
private AssetManager mAssetManager = null;
27-
private Activity mActivity = null;
2827

29-
public AssetExtract(Activity act) {
30-
mActivity = act;
31-
mAssetManager = act.getAssets();
28+
public AssetExtract(Context context) {
29+
mAssetManager = context.getAssets();
3230
}
3331

3432
public boolean extractTar(String asset, String target) {

pythonforandroid/bootstraps/service_library/build/src/main/java/org/renpy/android/AssetExtract.java

Lines changed: 0 additions & 115 deletions
This file was deleted.

tests/test_bootstrap.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,6 @@ def test_build_dist_dirs(self):
104104
bs.get_build_dir().endswith("build/bootstrap_builds/sdl2")
105105
)
106106
self.assertTrue(bs.get_dist_dir("test_prj").endswith("dists/test_prj"))
107-
self.assertTrue(
108-
bs.get_common_dir().endswith("pythonforandroid/bootstraps/common")
109-
)
110107

111108
def test__cmp_bootstraps_by_priority(self):
112109
# Test service_only has higher priority than sdl2:

0 commit comments

Comments
 (0)