Skip to content

Commit afb84ba

Browse files
committed
does not include min and target SDK in manifest file
1 parent 47c0050 commit afb84ba

File tree

7 files changed

+6
-34
lines changed

7 files changed

+6
-34
lines changed

mode/src/processing/mode/android/AndroidBuild.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,6 @@ protected File createProject(boolean external)
238238
}
239239

240240
manifest = new Manifest(sketch, appComponent, mode.getFolder(), false);
241-
manifest.setSdkTarget(TARGET_SDK);
242241

243242
// build the preproc and get to work
244243
AndroidPreprocessor preproc = new AndroidPreprocessor(sketch, getPackageName());

mode/src/processing/mode/android/Manifest.java

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -120,15 +120,6 @@ public void setPackageName(String packageName) {
120120
save();
121121
}
122122

123-
124-
public void setSdkTarget(String version) {
125-
XML usesSdk = xml.getChild("uses-sdk");
126-
if (usesSdk != null) {
127-
usesSdk.setString("android:targetSdkVersion", version);
128-
save();
129-
}
130-
}
131-
132123

133124
public String[] getPermissions() {
134125
XML[] elements = xml.getChildren("uses-permission");
@@ -270,22 +261,9 @@ private void fixPermissions(XML mf) {
270261

271262

272263
private void writeBlankManifest(final File xmlFile, final int appComp) {
273-
File xmlTemplate = new File(modeFolder, "templates/" + MANIFEST_TEMPLATE[appComp]);
274-
264+
File xmlTemplate = new File(modeFolder, "templates/" + MANIFEST_TEMPLATE[appComp]);
275265
HashMap<String, String> replaceMap = new HashMap<String, String>();
276-
if (appComp == AndroidBuild.APP) {
277-
replaceMap.put("@@min_sdk@@", AndroidBuild.MIN_SDK_APP);
278-
} else if (appComp == AndroidBuild.WALLPAPER) {
279-
replaceMap.put("@@min_sdk@@", AndroidBuild.MIN_SDK_WALLPAPER);
280-
} else if (appComp == AndroidBuild.WATCHFACE) {
281-
replaceMap.put("@@min_sdk@@", AndroidBuild.MIN_SDK_WATCHFACE);
282-
} else if (appComp == AndroidBuild.VR) {
283-
replaceMap.put("@@min_sdk@@", AndroidBuild.MIN_SDK_VR);
284-
} else if (appComp == AndroidBuild.AR) {
285-
replaceMap.put("@@min_sdk@@", AndroidBuild.MIN_SDK_AR);
286-
}
287-
288-
AndroidUtil.createFileFromTemplate(xmlTemplate, xmlFile, replaceMap);
266+
AndroidUtil.createFileFromTemplate(xmlTemplate, xmlFile, replaceMap);
289267
}
290268

291269

mode/templates/ARManifest.xml.tmpl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
package=""
66
android:versionCode="1"
77
android:versionName="1.0">
8-
<uses-sdk android:minSdkVersion="@@min_sdk@@" />
98
<uses-permission android:name="android.permission.CAMERA"/>
109
<uses-feature android:name="android.hardware.camera.ar" android:required="true"/>
1110
<uses-feature android:glEsVersion="0x00020000" android:required="true" />

mode/templates/AppManifest.xml.tmpl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
package=""
44
android:versionCode="1"
5-
android:versionName="1.0">
6-
<uses-sdk android:minSdkVersion="@@min_sdk@@" />
5+
android:versionName="1.0">
76
<application android:label=""
87
android:icon="@mipmap/ic_launcher">
98
<activity android:name=".MainActivity"

mode/templates/VRManifest.xml.tmpl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
package=""
44
android:versionCode="1"
5-
android:versionName="1.0">
6-
<uses-sdk android:minSdkVersion="@@min_sdk@@" />
5+
android:versionName="1.0">
76
<uses-permission android:name="android.permission.VIBRATE" />
87
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
98
<uses-feature android:name="android.hardware.sensor.accelerometer" android:required="true" />

mode/templates/WallpaperManifest.xml.tmpl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
package=""
44
android:versionCode="1"
5-
android:versionName="1.0">
6-
<uses-sdk android:minSdkVersion="@@min_sdk@@" />
5+
android:versionName="1.0">
76
<uses-feature android:name="android.software.live_wallpaper" />
87
<application android:label=""
98
android:icon="@mipmap/ic_launcher">

mode/templates/WatchFaceManifest.xml.tmpl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
package=""
44
android:versionCode="1"
5-
android:versionName="1.0">
6-
<uses-sdk android:minSdkVersion="@@min_sdk@@" />
5+
android:versionName="1.0">
76
<uses-feature android:name="android.hardware.type.watch" />
87
<uses-permission android:name="android.permission.WAKE_LOCK" />
98
<application android:label=""

0 commit comments

Comments
 (0)