aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBananeweizen <bananeweizen@gmx.de>2015-01-09 19:54:20 +0100
committerBananeweizen <bananeweizen@gmx.de>2015-01-10 11:27:58 +0100
commit7be9fe4c1f784113e0e03177e0efd2a19065c497 (patch)
treedaccd18cb9f8c4cf6be771132d898f2e1256c0fe
parentaa83dcd6ac060c967c83615fce3f64c65c388c98 (diff)
downloadcgeo-7be9fe4c1f784113e0e03177e0efd2a19065c497.zip
cgeo-7be9fe4c1f784113e0e03177e0efd2a19065c497.tar.gz
cgeo-7be9fe4c1f784113e0e03177e0efd2a19065c497.tar.bz2
use level21 for building and as target
* Set targetSdk of main application to 21. This disables compatibility modes as described in http://developer.android.com/reference/android/os/Build.VERSION_CODES.html#LOLLIPOP and http://developer.android.com/reference/android/os/Build.VERSION_CODES.html#KITKAT_WATCH * Set compile target to 21 for main app and play services. * Suppress deprecation warnings, as there is no replacement for the deprecated API on lower API levels. Tested with Eclipse and Ant, on a 4.4 and 5.0.2 device. IDEA probably needs further changes.
-rw-r--r--main/AndroidManifest.xml2
-rw-r--r--main/project.properties2
-rw-r--r--main/src/cgeo/geocaching/AboutActivity.java1
-rw-r--r--main/src/cgeo/geocaching/ImagesActivity.java14
-rw-r--r--main/src/cgeo/geocaching/UsefulAppsActivity.java1
-rw-r--r--play-services-base/project.properties2
-rw-r--r--play-services-location/project.properties2
7 files changed, 14 insertions, 10 deletions
diff --git a/main/AndroidManifest.xml b/main/AndroidManifest.xml
index ca3026a..28441fb 100644
--- a/main/AndroidManifest.xml
+++ b/main/AndroidManifest.xml
@@ -7,7 +7,7 @@
<uses-sdk
android:minSdkVersion="9"
- android:targetSdkVersion="19" />
+ android:targetSdkVersion="21" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
diff --git a/main/project.properties b/main/project.properties
index 4dc8ffb..4fed171 100644
--- a/main/project.properties
+++ b/main/project.properties
@@ -11,7 +11,7 @@
proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt:../play-services-base/proguard.txt:../play-services-location/proguard.txt
# Project target.
-target=Google Inc.:Google APIs:19
+target=Google Inc.:Google APIs:21
android.library.reference.1=../mapswithme-api
android.library.reference.2=../android-support-v7-appcompat
android.library.reference.3=../showcaseview
diff --git a/main/src/cgeo/geocaching/AboutActivity.java b/main/src/cgeo/geocaching/AboutActivity.java
index ceafc31..2f1c20a 100644
--- a/main/src/cgeo/geocaching/AboutActivity.java
+++ b/main/src/cgeo/geocaching/AboutActivity.java
@@ -190,6 +190,7 @@ public class AboutActivity extends AbstractViewPagerActivity<AboutActivity.Page>
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
}
+ @SuppressWarnings("deprecation")
final void market() {
final Intent marketIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + getPackageName()));
marketIntent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY | Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
diff --git a/main/src/cgeo/geocaching/ImagesActivity.java b/main/src/cgeo/geocaching/ImagesActivity.java
index b75e5eb..975a720 100644
--- a/main/src/cgeo/geocaching/ImagesActivity.java
+++ b/main/src/cgeo/geocaching/ImagesActivity.java
@@ -6,6 +6,7 @@ import cgeo.geocaching.ui.ImagesList;
import cgeo.geocaching.ui.ImagesList.ImageType;
import org.apache.commons.collections4.CollectionUtils;
+
import rx.Subscription;
import android.content.Context;
@@ -28,7 +29,7 @@ public class ImagesActivity extends AbstractActionBarActivity {
private Subscription subscription;
@Override
- public void onCreate(Bundle savedInstanceState) {
+ public void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// get parameters
@@ -78,11 +79,12 @@ public class ImagesActivity extends AbstractActionBarActivity {
super.onStop();
}
- public static void startActivityLogImages(final Context fromActivity, final String geocode, List<Image> logImages) {
+ public static void startActivityLogImages(final Context fromActivity, final String geocode, final List<Image> logImages) {
startActivity(fromActivity, geocode, logImages, ImageType.LogImages);
}
- private static void startActivity(final Context fromActivity, final String geocode, List<Image> logImages, ImageType imageType) {
+ @SuppressWarnings("deprecation")
+ private static void startActivity(final Context fromActivity, final String geocode, final List<Image> logImages, final ImageType imageType) {
final Intent logImgIntent = new Intent(fromActivity, ImagesActivity.class);
// if resuming our app within this activity, finish it and return to the cache activity
logImgIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET)
@@ -95,18 +97,18 @@ public class ImagesActivity extends AbstractActionBarActivity {
fromActivity.startActivity(logImgIntent);
}
- public static void startActivitySpoilerImages(final Context fromActivity, String geocode, List<Image> spoilers) {
+ public static void startActivitySpoilerImages(final Context fromActivity, final String geocode, final List<Image> spoilers) {
startActivity(fromActivity, geocode, spoilers, ImageType.SpoilerImages);
}
@Override
- public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
+ public void onCreateContextMenu(final ContextMenu menu, final View v, final ContextMenuInfo menuInfo) {
super.onCreateContextMenu(menu, v, menuInfo);
imagesList.onCreateContextMenu(menu, v);
}
@Override
- public boolean onContextItemSelected(MenuItem item) {
+ public boolean onContextItemSelected(final MenuItem item) {
if (imagesList.onContextItemSelected(item)) {
return true;
}
diff --git a/main/src/cgeo/geocaching/UsefulAppsActivity.java b/main/src/cgeo/geocaching/UsefulAppsActivity.java
index dd92350..b218c84 100644
--- a/main/src/cgeo/geocaching/UsefulAppsActivity.java
+++ b/main/src/cgeo/geocaching/UsefulAppsActivity.java
@@ -45,6 +45,7 @@ public class UsefulAppsActivity extends AbstractActionBarActivity {
this.packageName = packageName;
}
+ @SuppressWarnings("deprecation")
private void installFromMarket(final Activity activity) {
try {
// allow also opening pure http URLs in addition to market packages
diff --git a/play-services-base/project.properties b/play-services-base/project.properties
index ad36a32..664c438 100644
--- a/play-services-base/project.properties
+++ b/play-services-base/project.properties
@@ -11,5 +11,5 @@
proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard.txt
# Project target.
-target=Google Inc.:Google APIs:19
+target=Google Inc.:Google APIs:21
android.library=true
diff --git a/play-services-location/project.properties b/play-services-location/project.properties
index 8a32119..51a7632 100644
--- a/play-services-location/project.properties
+++ b/play-services-location/project.properties
@@ -11,6 +11,6 @@
proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard.txt
# Project target.
-target=Google Inc.:Google APIs:19
+target=Google Inc.:Google APIs:21
android.library=true
android.library.reference.1=../play-services-base