From 819356412cdafc8e239078ca35a74855d02a9182 Mon Sep 17 00:00:00 2001 From: Amine Date: Sat, 4 Nov 2017 11:43:09 +0100 Subject: [PATCH] Optimizing imports. --- .../bou/readerforselfoss/AddSourceActivity.kt | 17 +++-- .../bou/readerforselfoss/HomeActivity.kt | 64 ++++++++++--------- .../bou/readerforselfoss/IntroActivity.kt | 11 ++-- .../bou/readerforselfoss/LoginActivity.kt | 6 +- .../bou/readerforselfoss/SourcesActivity.kt | 10 ++- .../adapters/ItemCardAdapter.kt | 29 +++++---- .../adapters/ItemListAdapter.kt | 31 +++++---- .../adapters/SourcesListAdapter.kt | 12 ++-- .../api/selfoss/BooleanTypeAdapter.kt | 8 +-- .../api/selfoss/SelfossApi.kt | 12 ++-- .../api/selfoss/SelfossService.kt | 9 ++- .../settings/SettingsActivity.java | 8 +-- .../bou/readerforselfoss/utils/AppUtils.kt | 5 +- .../customtabs/CustomTabActivityHelper.java | 5 +- .../utils/customtabs/CustomTabsHelper.java | 8 ++- .../utils/customtabs/ServiceConnection.java | 5 +- .../drawer/CustomUrlPrimaryDrawerItem.kt | 5 +- .../utils/glide/SelfSignedGlideModule.kt | 2 +- 18 files changed, 132 insertions(+), 115 deletions(-) diff --git a/app/src/main/java/apps/amine/bou/readerforselfoss/AddSourceActivity.kt b/app/src/main/java/apps/amine/bou/readerforselfoss/AddSourceActivity.kt index 077a6fe..ff7e964 100644 --- a/app/src/main/java/apps/amine/bou/readerforselfoss/AddSourceActivity.kt +++ b/app/src/main/java/apps/amine/bou/readerforselfoss/AddSourceActivity.kt @@ -7,18 +7,23 @@ import android.support.constraint.ConstraintLayout import android.support.v7.app.AppCompatActivity import android.support.v7.widget.Toolbar import android.view.View -import android.widget.* - -import retrofit2.Call -import retrofit2.Callback -import retrofit2.Response - +import android.widget.AdapterView +import android.widget.ArrayAdapter +import android.widget.Button +import android.widget.EditText +import android.widget.ProgressBar +import android.widget.Spinner +import android.widget.TextView +import android.widget.Toast import apps.amine.bou.readerforselfoss.api.selfoss.SelfossApi import apps.amine.bou.readerforselfoss.api.selfoss.Spout import apps.amine.bou.readerforselfoss.api.selfoss.SuccessResponse import apps.amine.bou.readerforselfoss.utils.Config import apps.amine.bou.readerforselfoss.utils.isBaseUrlValid import com.ftinc.scoop.Scoop +import retrofit2.Call +import retrofit2.Callback +import retrofit2.Response class AddSourceActivity : AppCompatActivity() { diff --git a/app/src/main/java/apps/amine/bou/readerforselfoss/HomeActivity.kt b/app/src/main/java/apps/amine/bou/readerforselfoss/HomeActivity.kt index 8c29161..789586f 100644 --- a/app/src/main/java/apps/amine/bou/readerforselfoss/HomeActivity.kt +++ b/app/src/main/java/apps/amine/bou/readerforselfoss/HomeActivity.kt @@ -1,7 +1,5 @@ package apps.amine.bou.readerforselfoss -import java.lang.Exception - import android.app.Activity import android.content.Context import android.content.Intent @@ -15,41 +13,25 @@ import android.support.design.widget.CoordinatorLayout import android.support.v4.view.MenuItemCompat import android.support.v4.widget.SwipeRefreshLayout import android.support.v7.app.AppCompatActivity -import android.support.v7.widget.* +import android.support.v7.widget.GridLayoutManager +import android.support.v7.widget.RecyclerView +import android.support.v7.widget.SearchView +import android.support.v7.widget.StaggeredGridLayoutManager +import android.support.v7.widget.Toolbar import android.support.v7.widget.helper.ItemTouchHelper import android.view.Menu import android.view.MenuItem import android.view.View import android.widget.TextView import android.widget.Toast - -import com.anupcowkur.reservoir.Reservoir -import com.anupcowkur.reservoir.ReservoirGetCallback -import com.anupcowkur.reservoir.ReservoirPutCallback -import com.crashlytics.android.answers.Answers -import com.crashlytics.android.answers.InviteEvent -import com.github.stkent.amplify.prompt.DefaultLayoutPromptView -import com.github.stkent.amplify.tracking.Amplify -import com.google.android.gms.appinvite.AppInviteInvitation -import com.google.android.gms.common.ConnectionResult -import com.google.android.gms.common.GoogleApiAvailability -import com.google.firebase.remoteconfig.FirebaseRemoteConfig -import com.google.gson.reflect.TypeToken -import com.mikepenz.aboutlibraries.Libs -import com.mikepenz.aboutlibraries.LibsBuilder -import com.mikepenz.materialdrawer.Drawer -import com.mikepenz.materialdrawer.DrawerBuilder -import com.mikepenz.materialdrawer.holder.BadgeStyle -import com.mikepenz.materialdrawer.model.DividerDrawerItem -import com.mikepenz.materialdrawer.model.PrimaryDrawerItem -import com.mikepenz.materialdrawer.model.SecondaryDrawerItem -import retrofit2.Call -import retrofit2.Callback -import retrofit2.Response - import apps.amine.bou.readerforselfoss.adapters.ItemCardAdapter import apps.amine.bou.readerforselfoss.adapters.ItemListAdapter -import apps.amine.bou.readerforselfoss.api.selfoss.* +import apps.amine.bou.readerforselfoss.api.selfoss.Item +import apps.amine.bou.readerforselfoss.api.selfoss.SelfossApi +import apps.amine.bou.readerforselfoss.api.selfoss.Sources +import apps.amine.bou.readerforselfoss.api.selfoss.Stats +import apps.amine.bou.readerforselfoss.api.selfoss.SuccessResponse +import apps.amine.bou.readerforselfoss.api.selfoss.Tag import apps.amine.bou.readerforselfoss.settings.SettingsActivity import apps.amine.bou.readerforselfoss.themes.AppColors import apps.amine.bou.readerforselfoss.utils.Config @@ -59,15 +41,39 @@ import apps.amine.bou.readerforselfoss.utils.checkApkVersion import apps.amine.bou.readerforselfoss.utils.customtabs.CustomTabActivityHelper import apps.amine.bou.readerforselfoss.utils.drawer.CustomUrlPrimaryDrawerItem import apps.amine.bou.readerforselfoss.utils.longHash +import com.anupcowkur.reservoir.Reservoir +import com.anupcowkur.reservoir.ReservoirGetCallback +import com.anupcowkur.reservoir.ReservoirPutCallback import com.ashokvarma.bottomnavigation.BottomNavigationBar import com.ashokvarma.bottomnavigation.BottomNavigationItem import com.ashokvarma.bottomnavigation.TextBadgeItem import com.crashlytics.android.Crashlytics +import com.crashlytics.android.answers.Answers +import com.crashlytics.android.answers.InviteEvent import com.ftinc.scoop.Scoop +import com.github.stkent.amplify.prompt.DefaultLayoutPromptView +import com.github.stkent.amplify.tracking.Amplify +import com.google.android.gms.appinvite.AppInviteInvitation +import com.google.android.gms.common.ConnectionResult +import com.google.android.gms.common.GoogleApiAvailability +import com.google.firebase.remoteconfig.FirebaseRemoteConfig +import com.google.gson.reflect.TypeToken import com.heinrichreimersoftware.androidissuereporter.IssueReporterLauncher +import com.mikepenz.aboutlibraries.Libs +import com.mikepenz.aboutlibraries.LibsBuilder import com.mikepenz.materialdrawer.AccountHeader import com.mikepenz.materialdrawer.AccountHeaderBuilder +import com.mikepenz.materialdrawer.Drawer +import com.mikepenz.materialdrawer.DrawerBuilder +import com.mikepenz.materialdrawer.holder.BadgeStyle +import com.mikepenz.materialdrawer.model.DividerDrawerItem +import com.mikepenz.materialdrawer.model.PrimaryDrawerItem import com.mikepenz.materialdrawer.model.ProfileDrawerItem +import com.mikepenz.materialdrawer.model.SecondaryDrawerItem +import retrofit2.Call +import retrofit2.Callback +import retrofit2.Response +import java.lang.Exception class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener { diff --git a/app/src/main/java/apps/amine/bou/readerforselfoss/IntroActivity.kt b/app/src/main/java/apps/amine/bou/readerforselfoss/IntroActivity.kt index 16aa015..5b96a5b 100644 --- a/app/src/main/java/apps/amine/bou/readerforselfoss/IntroActivity.kt +++ b/app/src/main/java/apps/amine/bou/readerforselfoss/IntroActivity.kt @@ -1,15 +1,14 @@ package apps.amine.bou.readerforselfoss -import android.content.Intent -import android.net.Uri -import android.os.Bundle -import android.preference.PreferenceManager -import android.view.View - import agency.tango.materialintroscreen.MaterialIntroActivity import agency.tango.materialintroscreen.MessageButtonBehaviour import agency.tango.materialintroscreen.SlideFragmentBuilder +import android.content.Intent +import android.net.Uri +import android.os.Bundle +import android.preference.PreferenceManager import android.support.v7.app.AppCompatDelegate +import android.view.View class IntroActivity : MaterialIntroActivity() { diff --git a/app/src/main/java/apps/amine/bou/readerforselfoss/LoginActivity.kt b/app/src/main/java/apps/amine/bou/readerforselfoss/LoginActivity.kt index 94674bc..8fb4af3 100644 --- a/app/src/main/java/apps/amine/bou/readerforselfoss/LoginActivity.kt +++ b/app/src/main/java/apps/amine/bou/readerforselfoss/LoginActivity.kt @@ -15,7 +15,11 @@ import android.view.Menu import android.view.MenuItem import android.view.View import android.view.inputmethod.EditorInfo -import android.widget.* +import android.widget.Button +import android.widget.EditText +import android.widget.Switch +import android.widget.TextView +import android.widget.Toast import apps.amine.bou.readerforselfoss.api.selfoss.SelfossApi import apps.amine.bou.readerforselfoss.api.selfoss.SuccessResponse import apps.amine.bou.readerforselfoss.utils.Config diff --git a/app/src/main/java/apps/amine/bou/readerforselfoss/SourcesActivity.kt b/app/src/main/java/apps/amine/bou/readerforselfoss/SourcesActivity.kt index 392b66b..f265cf9 100644 --- a/app/src/main/java/apps/amine/bou/readerforselfoss/SourcesActivity.kt +++ b/app/src/main/java/apps/amine/bou/readerforselfoss/SourcesActivity.kt @@ -8,16 +8,14 @@ import android.support.v7.widget.LinearLayoutManager import android.support.v7.widget.RecyclerView import android.support.v7.widget.Toolbar import android.widget.Toast - -import com.melnykov.fab.FloatingActionButton -import retrofit2.Call -import retrofit2.Callback -import retrofit2.Response - import apps.amine.bou.readerforselfoss.adapters.SourcesListAdapter import apps.amine.bou.readerforselfoss.api.selfoss.SelfossApi import apps.amine.bou.readerforselfoss.api.selfoss.Sources import com.ftinc.scoop.Scoop +import com.melnykov.fab.FloatingActionButton +import retrofit2.Call +import retrofit2.Callback +import retrofit2.Response class SourcesActivity : AppCompatActivity() { diff --git a/app/src/main/java/apps/amine/bou/readerforselfoss/adapters/ItemCardAdapter.kt b/app/src/main/java/apps/amine/bou/readerforselfoss/adapters/ItemCardAdapter.kt index e8a69b8..6296893 100644 --- a/app/src/main/java/apps/amine/bou/readerforselfoss/adapters/ItemCardAdapter.kt +++ b/app/src/main/java/apps/amine/bou/readerforselfoss/adapters/ItemCardAdapter.kt @@ -3,7 +3,6 @@ package apps.amine.bou.readerforselfoss.adapters import android.app.Activity import android.content.Context import android.graphics.Color -import android.support.constraint.ConstraintLayout import android.support.design.widget.Snackbar import android.support.v7.widget.CardView import android.support.v7.widget.RecyclerView @@ -15,28 +14,30 @@ import android.widget.ImageView import android.widget.ImageView.ScaleType import android.widget.TextView import android.widget.Toast - -import com.amulyakhare.textdrawable.TextDrawable -import com.amulyakhare.textdrawable.util.ColorGenerator -import com.bumptech.glide.Glide -import com.like.LikeButton -import com.like.OnLikeListener -import retrofit2.Call -import retrofit2.Callback -import retrofit2.Response - import apps.amine.bou.readerforselfoss.R import apps.amine.bou.readerforselfoss.api.selfoss.Item import apps.amine.bou.readerforselfoss.api.selfoss.SelfossApi import apps.amine.bou.readerforselfoss.api.selfoss.SuccessResponse import apps.amine.bou.readerforselfoss.themes.AppColors -import apps.amine.bou.readerforselfoss.utils.* +import apps.amine.bou.readerforselfoss.utils.buildCustomTabsIntent import apps.amine.bou.readerforselfoss.utils.customtabs.CustomTabActivityHelper import apps.amine.bou.readerforselfoss.utils.glide.bitmapCenterCrop -import apps.amine.bou.readerforselfoss.utils.glide.bitmapFitCenter import apps.amine.bou.readerforselfoss.utils.glide.circularBitmapDrawable +import apps.amine.bou.readerforselfoss.utils.openInBrowserAsNewTask +import apps.amine.bou.readerforselfoss.utils.openItemUrl +import apps.amine.bou.readerforselfoss.utils.shareLink +import apps.amine.bou.readerforselfoss.utils.sourceAndDateText +import apps.amine.bou.readerforselfoss.utils.succeeded +import apps.amine.bou.readerforselfoss.utils.toTextDrawableString +import com.amulyakhare.textdrawable.TextDrawable +import com.amulyakhare.textdrawable.util.ColorGenerator +import com.bumptech.glide.Glide import com.crashlytics.android.Crashlytics -import kotlin.collections.ArrayList +import com.like.LikeButton +import com.like.OnLikeListener +import retrofit2.Call +import retrofit2.Callback +import retrofit2.Response class ItemCardAdapter(private val app: Activity, private val items: ArrayList, diff --git a/app/src/main/java/apps/amine/bou/readerforselfoss/adapters/ItemListAdapter.kt b/app/src/main/java/apps/amine/bou/readerforselfoss/adapters/ItemListAdapter.kt index cfe63d9..beb26e4 100644 --- a/app/src/main/java/apps/amine/bou/readerforselfoss/adapters/ItemListAdapter.kt +++ b/app/src/main/java/apps/amine/bou/readerforselfoss/adapters/ItemListAdapter.kt @@ -12,26 +12,33 @@ import android.util.TypedValue import android.view.LayoutInflater import android.view.View import android.view.ViewGroup -import android.widget.* - +import android.widget.ImageButton +import android.widget.ImageView +import android.widget.RelativeLayout +import android.widget.TextView +import android.widget.Toast +import apps.amine.bou.readerforselfoss.R +import apps.amine.bou.readerforselfoss.api.selfoss.Item +import apps.amine.bou.readerforselfoss.api.selfoss.SelfossApi +import apps.amine.bou.readerforselfoss.api.selfoss.SuccessResponse +import apps.amine.bou.readerforselfoss.utils.buildCustomTabsIntent +import apps.amine.bou.readerforselfoss.utils.customtabs.CustomTabActivityHelper +import apps.amine.bou.readerforselfoss.utils.glide.bitmapCenterCrop +import apps.amine.bou.readerforselfoss.utils.glide.circularBitmapDrawable +import apps.amine.bou.readerforselfoss.utils.openInBrowserAsNewTask +import apps.amine.bou.readerforselfoss.utils.openItemUrl +import apps.amine.bou.readerforselfoss.utils.shareLink +import apps.amine.bou.readerforselfoss.utils.sourceAndDateText +import apps.amine.bou.readerforselfoss.utils.succeeded import com.amulyakhare.textdrawable.TextDrawable import com.amulyakhare.textdrawable.util.ColorGenerator +import com.crashlytics.android.Crashlytics import com.like.LikeButton import com.like.OnLikeListener import retrofit2.Call import retrofit2.Callback import retrofit2.Response import java.util.* - -import apps.amine.bou.readerforselfoss.R -import apps.amine.bou.readerforselfoss.api.selfoss.Item -import apps.amine.bou.readerforselfoss.api.selfoss.SelfossApi -import apps.amine.bou.readerforselfoss.api.selfoss.SuccessResponse -import apps.amine.bou.readerforselfoss.utils.* -import apps.amine.bou.readerforselfoss.utils.customtabs.CustomTabActivityHelper -import apps.amine.bou.readerforselfoss.utils.glide.bitmapCenterCrop -import apps.amine.bou.readerforselfoss.utils.glide.circularBitmapDrawable -import com.crashlytics.android.Crashlytics import kotlin.collections.ArrayList diff --git a/app/src/main/java/apps/amine/bou/readerforselfoss/adapters/SourcesListAdapter.kt b/app/src/main/java/apps/amine/bou/readerforselfoss/adapters/SourcesListAdapter.kt index cfe6ac6..89de800 100644 --- a/app/src/main/java/apps/amine/bou/readerforselfoss/adapters/SourcesListAdapter.kt +++ b/app/src/main/java/apps/amine/bou/readerforselfoss/adapters/SourcesListAdapter.kt @@ -10,19 +10,17 @@ import android.widget.Button import android.widget.ImageView import android.widget.TextView import android.widget.Toast - -import com.amulyakhare.textdrawable.TextDrawable -import com.amulyakhare.textdrawable.util.ColorGenerator -import retrofit2.Call -import retrofit2.Callback -import retrofit2.Response - import apps.amine.bou.readerforselfoss.R import apps.amine.bou.readerforselfoss.api.selfoss.SelfossApi import apps.amine.bou.readerforselfoss.api.selfoss.Sources import apps.amine.bou.readerforselfoss.api.selfoss.SuccessResponse import apps.amine.bou.readerforselfoss.utils.glide.circularBitmapDrawable import apps.amine.bou.readerforselfoss.utils.toTextDrawableString +import com.amulyakhare.textdrawable.TextDrawable +import com.amulyakhare.textdrawable.util.ColorGenerator +import retrofit2.Call +import retrofit2.Callback +import retrofit2.Response class SourcesListAdapter(private val app: Activity, diff --git a/app/src/main/java/apps/amine/bou/readerforselfoss/api/selfoss/BooleanTypeAdapter.kt b/app/src/main/java/apps/amine/bou/readerforselfoss/api/selfoss/BooleanTypeAdapter.kt index edcdb2e..e18e87e 100644 --- a/app/src/main/java/apps/amine/bou/readerforselfoss/api/selfoss/BooleanTypeAdapter.kt +++ b/app/src/main/java/apps/amine/bou/readerforselfoss/api/selfoss/BooleanTypeAdapter.kt @@ -1,12 +1,10 @@ package apps.amine.bou.readerforselfoss.api.selfoss -import java.lang.reflect.Type - -import com.google.gson.JsonParseException import com.google.gson.JsonDeserializationContext -import com.google.gson.JsonElement import com.google.gson.JsonDeserializer - +import com.google.gson.JsonElement +import com.google.gson.JsonParseException +import java.lang.reflect.Type internal class BooleanTypeAdapter : JsonDeserializer { diff --git a/app/src/main/java/apps/amine/bou/readerforselfoss/api/selfoss/SelfossApi.kt b/app/src/main/java/apps/amine/bou/readerforselfoss/api/selfoss/SelfossApi.kt index 051f817..7fd9e74 100644 --- a/app/src/main/java/apps/amine/bou/readerforselfoss/api/selfoss/SelfossApi.kt +++ b/app/src/main/java/apps/amine/bou/readerforselfoss/api/selfoss/SelfossApi.kt @@ -2,8 +2,8 @@ package apps.amine.bou.readerforselfoss.api.selfoss import android.app.Activity import android.content.Context -import java.util.concurrent.ConcurrentHashMap - +import apps.amine.bou.readerforselfoss.utils.Config +import apps.amine.bou.readerforselfoss.utils.getUnsafeHttpClient import com.burgstaller.okhttp.AuthenticationCacheInterceptor import com.burgstaller.okhttp.CachingAuthenticatorDecorator import com.burgstaller.okhttp.DispatchingAuthenticator @@ -13,15 +13,11 @@ import com.burgstaller.okhttp.digest.Credentials import com.burgstaller.okhttp.digest.DigestAuthenticator import com.google.gson.GsonBuilder import okhttp3.OkHttpClient +import okhttp3.logging.HttpLoggingInterceptor import retrofit2.Call import retrofit2.Retrofit import retrofit2.converter.gson.GsonConverterFactory - -import apps.amine.bou.readerforselfoss.utils.Config -import apps.amine.bou.readerforselfoss.utils.getUnsafeHttpClient -import okhttp3.logging.HttpLoggingInterceptor - - +import java.util.concurrent.ConcurrentHashMap class SelfossApi(c: Context, callingActivity: Activity, isWithSelfSignedCert: Boolean, shouldLog: Boolean) { diff --git a/app/src/main/java/apps/amine/bou/readerforselfoss/api/selfoss/SelfossService.kt b/app/src/main/java/apps/amine/bou/readerforselfoss/api/selfoss/SelfossService.kt index 03c4b9c..3440264 100644 --- a/app/src/main/java/apps/amine/bou/readerforselfoss/api/selfoss/SelfossService.kt +++ b/app/src/main/java/apps/amine/bou/readerforselfoss/api/selfoss/SelfossService.kt @@ -1,7 +1,14 @@ package apps.amine.bou.readerforselfoss.api.selfoss import retrofit2.Call -import retrofit2.http.* +import retrofit2.http.DELETE +import retrofit2.http.Field +import retrofit2.http.FormUrlEncoded +import retrofit2.http.GET +import retrofit2.http.Headers +import retrofit2.http.POST +import retrofit2.http.Path +import retrofit2.http.Query internal interface SelfossService { diff --git a/app/src/main/java/apps/amine/bou/readerforselfoss/settings/SettingsActivity.java b/app/src/main/java/apps/amine/bou/readerforselfoss/settings/SettingsActivity.java index 61e900e..b454bd3 100644 --- a/app/src/main/java/apps/amine/bou/readerforselfoss/settings/SettingsActivity.java +++ b/app/src/main/java/apps/amine/bou/readerforselfoss/settings/SettingsActivity.java @@ -1,6 +1,8 @@ package apps.amine.bou.readerforselfoss.settings; +import java.util.List; + import android.annotation.TargetApi; import android.content.ClipData; import android.content.ClipboardManager; @@ -16,17 +18,15 @@ import android.preference.Preference; import android.preference.Preference.OnPreferenceChangeListener; import android.preference.Preference.OnPreferenceClickListener; import android.preference.PreferenceActivity; -import android.preference.SwitchPreference; -import android.support.v7.app.ActionBar; import android.preference.PreferenceFragment; import android.preference.PreferenceManager; +import android.preference.SwitchPreference; +import android.support.v7.app.ActionBar; import android.text.InputFilter; import android.text.Spanned; import android.view.MenuItem; import android.widget.Toast; -import java.util.List; - import apps.amine.bou.readerforselfoss.BuildConfig; import apps.amine.bou.readerforselfoss.R; import apps.amine.bou.readerforselfoss.utils.Config; diff --git a/app/src/main/java/apps/amine/bou/readerforselfoss/utils/AppUtils.kt b/app/src/main/java/apps/amine/bou/readerforselfoss/utils/AppUtils.kt index 39ac3aa..da92d3d 100644 --- a/app/src/main/java/apps/amine/bou/readerforselfoss/utils/AppUtils.kt +++ b/app/src/main/java/apps/amine/bou/readerforselfoss/utils/AppUtils.kt @@ -5,11 +5,8 @@ import android.content.Intent import android.content.SharedPreferences import android.net.Uri import android.support.v7.app.AlertDialog - -import com.google.firebase.remoteconfig.FirebaseRemoteConfig - import apps.amine.bou.readerforselfoss.R -import apps.amine.bou.readerforselfoss.api.selfoss.Item +import com.google.firebase.remoteconfig.FirebaseRemoteConfig fun String?.isEmptyOrNullOrNullString(): Boolean = diff --git a/app/src/main/java/apps/amine/bou/readerforselfoss/utils/customtabs/CustomTabActivityHelper.java b/app/src/main/java/apps/amine/bou/readerforselfoss/utils/customtabs/CustomTabActivityHelper.java index 461cae3..5d66a04 100644 --- a/app/src/main/java/apps/amine/bou/readerforselfoss/utils/customtabs/CustomTabActivityHelper.java +++ b/app/src/main/java/apps/amine/bou/readerforselfoss/utils/customtabs/CustomTabActivityHelper.java @@ -1,5 +1,8 @@ package apps.amine.bou.readerforselfoss.utils.customtabs; + +import java.util.List; + import android.app.Activity; import android.net.Uri; import android.os.Bundle; @@ -8,8 +11,6 @@ import android.support.customtabs.CustomTabsIntent; import android.support.customtabs.CustomTabsServiceConnection; import android.support.customtabs.CustomTabsSession; -import java.util.List; - /** * This is a helper class to manage the connection to the Custom Tabs Service. */ diff --git a/app/src/main/java/apps/amine/bou/readerforselfoss/utils/customtabs/CustomTabsHelper.java b/app/src/main/java/apps/amine/bou/readerforselfoss/utils/customtabs/CustomTabsHelper.java index 6aaa523..85ec382 100644 --- a/app/src/main/java/apps/amine/bou/readerforselfoss/utils/customtabs/CustomTabsHelper.java +++ b/app/src/main/java/apps/amine/bou/readerforselfoss/utils/customtabs/CustomTabsHelper.java @@ -1,5 +1,9 @@ package apps.amine.bou.readerforselfoss.utils.customtabs; + +import java.util.ArrayList; +import java.util.List; + import android.content.Context; import android.content.Intent; import android.content.IntentFilter; @@ -9,10 +13,8 @@ import android.net.Uri; import android.support.customtabs.CustomTabsService; import android.text.TextUtils; import android.util.Log; -import apps.amine.bou.readerforselfoss.utils.customtabs.helpers.KeepAliveService; -import java.util.ArrayList; -import java.util.List; +import apps.amine.bou.readerforselfoss.utils.customtabs.helpers.KeepAliveService; @SuppressWarnings("ALL") class CustomTabsHelper { diff --git a/app/src/main/java/apps/amine/bou/readerforselfoss/utils/customtabs/ServiceConnection.java b/app/src/main/java/apps/amine/bou/readerforselfoss/utils/customtabs/ServiceConnection.java index 02685e6..ff35de1 100644 --- a/app/src/main/java/apps/amine/bou/readerforselfoss/utils/customtabs/ServiceConnection.java +++ b/app/src/main/java/apps/amine/bou/readerforselfoss/utils/customtabs/ServiceConnection.java @@ -1,11 +1,12 @@ package apps.amine.bou.readerforselfoss.utils.customtabs; + +import java.lang.ref.WeakReference; + import android.content.ComponentName; import android.support.customtabs.CustomTabsClient; import android.support.customtabs.CustomTabsServiceConnection; -import java.lang.ref.WeakReference; - /** * Implementation for the CustomTabsServiceConnection that avoids leaking the * ServiceConnectionCallback diff --git a/app/src/main/java/apps/amine/bou/readerforselfoss/utils/drawer/CustomUrlPrimaryDrawerItem.kt b/app/src/main/java/apps/amine/bou/readerforselfoss/utils/drawer/CustomUrlPrimaryDrawerItem.kt index 0c615aa..5ade55d 100644 --- a/app/src/main/java/apps/amine/bou/readerforselfoss/utils/drawer/CustomUrlPrimaryDrawerItem.kt +++ b/app/src/main/java/apps/amine/bou/readerforselfoss/utils/drawer/CustomUrlPrimaryDrawerItem.kt @@ -5,14 +5,11 @@ import android.support.annotation.LayoutRes import android.support.annotation.StringRes import android.view.View import android.widget.TextView - +import apps.amine.bou.readerforselfoss.R import com.mikepenz.materialdrawer.holder.BadgeStyle import com.mikepenz.materialdrawer.holder.StringHolder import com.mikepenz.materialdrawer.model.interfaces.ColorfulBadgeable -import apps.amine.bou.readerforselfoss.R - - class CustomUrlPrimaryDrawerItem : CustomUrlBasePrimaryDrawerItem(), ColorfulBadgeable { protected var mBadge: StringHolder = StringHolder("") diff --git a/app/src/main/java/apps/amine/bou/readerforselfoss/utils/glide/SelfSignedGlideModule.kt b/app/src/main/java/apps/amine/bou/readerforselfoss/utils/glide/SelfSignedGlideModule.kt index 137207d..fc70a7b 100644 --- a/app/src/main/java/apps/amine/bou/readerforselfoss/utils/glide/SelfSignedGlideModule.kt +++ b/app/src/main/java/apps/amine/bou/readerforselfoss/utils/glide/SelfSignedGlideModule.kt @@ -6,8 +6,8 @@ import apps.amine.bou.readerforselfoss.utils.getUnsafeHttpClient import com.bumptech.glide.Glide import com.bumptech.glide.GlideBuilder import com.bumptech.glide.Registry -import com.bumptech.glide.module.GlideModule import com.bumptech.glide.load.model.GlideUrl +import com.bumptech.glide.module.GlideModule import java.io.InputStream