|
1 | 1 | package processing.mode.android; |
2 | 2 |
|
3 | 3 | import processing.app.Base; |
4 | | -//import processing.app.Preferences; |
5 | 4 | import processing.app.exec.ProcessHelper; |
6 | 5 | import processing.app.exec.ProcessResult; |
7 | 6 | import processing.core.PApplet; |
@@ -44,26 +43,21 @@ public class AVD { |
44 | 43 |
|
45 | 44 | /** "android-7" or "Google Inc.:Google APIs:7" */ |
46 | 45 | protected String target; |
47 | | - |
48 | | - /** x86, x86_64 or armeabi **/ |
49 | | - protected String abi; |
50 | | - |
51 | | - public static final String PREF_KEY_ABI = "android.sdk.abi"; |
52 | | - public static final String[] ABI = {"armeabi", "x86", "x86_64"}; |
53 | 46 |
|
54 | 47 | /** Default virtual device used by Processing. */ |
55 | | - static public AVD defaultAVD; |
| 48 | + static public final AVD defaultAVD = |
| 49 | + new AVD("Processing-0" + Base.getRevision(), |
| 50 | + "android-" + AndroidBuild.sdkVersion); |
56 | 51 | // "Google Inc.:Google APIs:" + AndroidBuild.sdkVersion); |
57 | 52 |
|
58 | 53 | static ArrayList<String> avdList; |
59 | 54 | static ArrayList<String> badList; |
60 | 55 | // static ArrayList<String> skinList; |
61 | 56 |
|
62 | 57 |
|
63 | | - public AVD(String name, String target, String abi) { |
| 58 | + public AVD(final String name, final String target) { |
64 | 59 | this.name = name; |
65 | 60 | this.target = target; |
66 | | - this.abi = abi; |
67 | 61 | } |
68 | 62 |
|
69 | 63 |
|
@@ -144,11 +138,12 @@ protected boolean create(final AndroidSDK sdk) throws IOException { |
144 | 138 | "-t", target, |
145 | 139 | "-c", DEFAULT_SDCARD_SIZE, |
146 | 140 | "-s", DEFAULT_SKIN, |
147 | | - "--abi", abi |
| 141 | + "--abi", "armeabi" |
148 | 142 | }; |
149 | 143 |
|
150 | 144 | // Set the list to null so that exists() will check again |
151 | 145 | avdList = null; |
| 146 | + |
152 | 147 | final ProcessHelper p = new ProcessHelper(params); |
153 | 148 | try { |
154 | 149 | // Passes 'no' to "Do you wish to create a custom hardware profile [no]" |
@@ -176,10 +171,8 @@ protected boolean create(final AndroidSDK sdk) throws IOException { |
176 | 171 | } |
177 | 172 |
|
178 | 173 |
|
179 | | - static public boolean ensureProperAVD(final AndroidSDK sdk, final String abi) { |
| 174 | + static public boolean ensureProperAVD(final AndroidSDK sdk) { |
180 | 175 | try { |
181 | | - defaultAVD = new AVD("Processing-0" + Base.getRevision(), |
182 | | - "android-" + AndroidBuild.sdkVersion, abi); |
183 | 176 | if (defaultAVD.exists(sdk)) { |
184 | 177 | // System.out.println("the avd exists"); |
185 | 178 | return true; |
|
0 commit comments