From 57f721b6cf194cc448e75fccef65cab8dbc302d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Christian=20Gr=C3=BCnhage?= Date: Sat, 14 Jan 2017 17:00:23 +0100 Subject: [PATCH] Switched to Java 1.8, enabled JACK I made this change to be able to use lambdas, which saves a lot of code, since android development heavily relies on anonymous classes. --- playmusicexporter/build.gradle | 9 +++++++++ .../activities/MusicContainerListActivity.java | 8 +------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/playmusicexporter/build.gradle b/playmusicexporter/build.gradle index b1ad5a7..010efca 100644 --- a/playmusicexporter/build.gradle +++ b/playmusicexporter/build.gradle @@ -36,6 +36,10 @@ android { versionCode 103 versionName '0.9.1' vectorDrawables.useSupportLibrary = true + + jackOptions { + enabled true + } } buildTypes { release { @@ -43,6 +47,10 @@ android { proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } + compileOptions { + targetCompatibility 1.8 + sourceCompatibility 1.8 + } } dependencies { @@ -53,4 +61,5 @@ dependencies { compile 'com.android.support:support-v4:25.1.0' compile 'com.android.support:design:25.1.0' compile 'com.android.support:support-vector-drawable:25.1.0' + compile "com.github.paolorotolo:appintro:4.1.0" } diff --git a/playmusicexporter/src/main/java/re/jcg/playmusicexporter/activities/MusicContainerListActivity.java b/playmusicexporter/src/main/java/re/jcg/playmusicexporter/activities/MusicContainerListActivity.java index 33dcf65..bfc2e79 100644 --- a/playmusicexporter/src/main/java/re/jcg/playmusicexporter/activities/MusicContainerListActivity.java +++ b/playmusicexporter/src/main/java/re/jcg/playmusicexporter/activities/MusicContainerListActivity.java @@ -176,13 +176,7 @@ public class MusicContainerListActivity extends AppCompatActivity builder.setTitle(R.string.dialog_storage_access_denied_title); builder.setMessage(R.string.dialog_storage_access_denied); builder.setCancelable(false); - builder.setPositiveButton(R.string.text_okay, new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialog, int which) { - // Close the app - MusicContainerListActivity.this.finish(); - } - }); + builder.setPositiveButton(R.string.text_okay, (dialog, which) -> MusicContainerListActivity.this.finish()); builder.show(); }