From c6e29c056b45ec4ca933b52d68757547a5f25a0a Mon Sep 17 00:00:00 2001 From: Christian Basler Date: Wed, 13 Jun 2018 22:03:06 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20Drop=20support=20for=20API=2019?= =?UTF-8?q?=20(KitKat)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I'm fed up with all the extra effort for supporting an outdated Android version. Apologies for the few users that are now excluded, but I feel like it's just not worth the hassle. --- app/build.gradle | 2 +- app/src/main/AndroidManifest.xml | 15 +------- .../dissem/apps/abit/MessageDetailActivity.kt | 1 - .../ch/dissem/apps/abit/SettingsFragment.kt | 4 +- .../apps/abit/adapter/ConversationAdapter.kt | 2 +- .../dissem/apps/abit/adapter/LabelAdapter.kt | 8 +--- .../abit/dialog/FullNodeDialogActivity.kt | 5 +-- .../dissem/apps/abit/listener/WifiReceiver.kt | 36 ------------------ .../apps/abit/service/BitmessageService.kt | 1 - .../abit/service/StartupNodeOnWifiService.kt | 1 - .../apps/abit/synchronization/SyncAdapter.kt | 34 +++++++++-------- .../java/ch/dissem/apps/abit/util/Assets.kt | 2 - .../ch/dissem/apps/abit/util/NetworkUtils.kt | 37 ++++--------------- .../res/drawable-v21/bg_swipe_item_left.xml | 25 ------------- .../res/drawable-v21/bg_swipe_item_right.xml | 25 ------------- .../material_showcase_button_bg.xml | 9 ----- .../main/res/drawable/bg_swipe_item_left.xml | 9 ++--- .../main/res/drawable/bg_swipe_item_right.xml | 9 ++--- .../drawable/material_showcase_button_bg.xml | 21 ++++------- app/src/main/res/layout/showcase_button.xml | 11 ------ app/src/main/res/values-v21/attrs.xml | 5 --- app/src/main/res/values/attrs.xml | 5 --- app/src/main/res/xml/preferences.xml | 1 - 23 files changed, 48 insertions(+), 220 deletions(-) delete mode 100644 app/src/main/java/ch/dissem/apps/abit/listener/WifiReceiver.kt delete mode 100644 app/src/main/res/drawable-v21/bg_swipe_item_left.xml delete mode 100644 app/src/main/res/drawable-v21/bg_swipe_item_right.xml delete mode 100644 app/src/main/res/drawable-v21/material_showcase_button_bg.xml delete mode 100644 app/src/main/res/layout/showcase_button.xml delete mode 100644 app/src/main/res/values-v21/attrs.xml delete mode 100644 app/src/main/res/values/attrs.xml diff --git a/app/build.gradle b/app/build.gradle index c05f792..c1ffb75 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -21,7 +21,7 @@ android { } defaultConfig { applicationId "ch.dissem.apps.${appName.toLowerCase()}" - minSdkVersion 19 + minSdkVersion 21 targetSdkVersion 27 versionCode 23 versionName "1.0-rc1" diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index a9d4f55..81d0586 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -175,20 +175,7 @@ - - - - - - + android:name=".service.StartServiceReceiver"> diff --git a/app/src/main/java/ch/dissem/apps/abit/MessageDetailActivity.kt b/app/src/main/java/ch/dissem/apps/abit/MessageDetailActivity.kt index e1c449c..b34fc8b 100644 --- a/app/src/main/java/ch/dissem/apps/abit/MessageDetailActivity.kt +++ b/app/src/main/java/ch/dissem/apps/abit/MessageDetailActivity.kt @@ -4,7 +4,6 @@ import android.content.Intent import android.os.Bundle import android.support.v4.app.NavUtils import android.view.MenuItem -import ch.dissem.bitmessage.entity.Conversation import ch.dissem.bitmessage.entity.Plaintext diff --git a/app/src/main/java/ch/dissem/apps/abit/SettingsFragment.kt b/app/src/main/java/ch/dissem/apps/abit/SettingsFragment.kt index 3845f8f..7ec83f6 100644 --- a/app/src/main/java/ch/dissem/apps/abit/SettingsFragment.kt +++ b/app/src/main/java/ch/dissem/apps/abit/SettingsFragment.kt @@ -18,8 +18,6 @@ package ch.dissem.apps.abit import android.app.Activity import android.content.* -import android.os.Build -import android.os.Build.VERSION_CODES.LOLLIPOP import android.os.Bundle import android.os.IBinder import android.support.v4.app.Fragment @@ -264,7 +262,7 @@ class SettingsFragment : PreferenceFragmentCompat(), SharedPreferences.OnSharedP private fun connectivityChangeListener() = OnPreferenceChangeListener { _, _ -> context?.let { ctx -> - if (Build.VERSION.SDK_INT >= LOLLIPOP && Preferences.isFullNodeActive(ctx)) { + if (Preferences.isFullNodeActive(ctx)) { NetworkUtils.scheduleNodeStart(ctx) } } diff --git a/app/src/main/java/ch/dissem/apps/abit/adapter/ConversationAdapter.kt b/app/src/main/java/ch/dissem/apps/abit/adapter/ConversationAdapter.kt index 2523365..14d4ccc 100644 --- a/app/src/main/java/ch/dissem/apps/abit/adapter/ConversationAdapter.kt +++ b/app/src/main/java/ch/dissem/apps/abit/adapter/ConversationAdapter.kt @@ -149,7 +149,7 @@ class ConversationAdapter internal constructor( linksClickable = true setTextIsSelectable(true) } - val labelAdapter = LabelAdapter(itemView.context, emptySet