diff --git a/app/src/main/kotlin/rasel/lunar/launcher/LauncherActivity.kt b/app/src/main/kotlin/rasel/lunar/launcher/LauncherActivity.kt index f1f4c79..3e648c3 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/LauncherActivity.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/LauncherActivity.kt @@ -19,6 +19,7 @@ package rasel.lunar.launcher //import rasel.lunar.launcher.home.LauncherHome.Companion.rssSet + import android.Manifest import android.annotation.SuppressLint import android.app.NotificationManager @@ -46,7 +47,6 @@ import android.telephony.TelephonyManager import android.view.View import android.view.WindowInsets import android.view.WindowManager - import android.webkit.JavascriptInterface import android.webkit.SslErrorHandler import android.webkit.WebResourceError @@ -67,8 +67,6 @@ import androidx.core.view.ViewCompat import androidx.core.view.WindowCompat import androidx.core.view.WindowInsetsCompat import androidx.core.view.updatePadding -import androidx.lifecycle.LiveData -import androidx.lifecycle.Observer import androidx.recyclerview.widget.RecyclerView import androidx.viewpager2.widget.ViewPager2 import androidx.work.ExistingPeriodicWorkPolicy @@ -94,15 +92,13 @@ import rasel.lunar.launcher.helpers.ViewPagerAdapter import rasel.lunar.launcher.home.LauncherHome import rasel.lunar.launcher.home.LauncherHome.Companion.lastedFinishedPageUrl import rasel.lunar.launcher.home.LauncherHome.Companion.listTags +import rasel.lunar.launcher.model.MissD import rasel.lunar.launcher.model.RssData -import rasel.lunar.launcher.model.RssDataInterface -import rasel.lunar.launcher.model.RssDataType import rasel.lunar.launcher.model.RssItem import rasel.lunar.launcher.model.RssTagItem import rasel.lunar.launcher.model.getRssData import rasel.lunar.launcher.model.getT import rasel.lunar.launcher.utils.BLog -import rasel.lunar.launcher.utils.JamoUtils import rasel.lunar.launcher.utils.NLService import rasel.lunar.launcher.utils.RssList.jGuruMain import rasel.lunar.launcher.utils.beforeDay @@ -1043,43 +1039,7 @@ internal class LauncherActivity : AppCompatActivity() { -class MissD : RssDataInterface { - var link : String? = null - var title : String? = null - - var thumb : String? = null - - var desc : String? = null - - override fun title(): String { - return title ?: "" - } - - override fun thumbnailUrl(): String { - return thumb ?: "" - } - - override fun originPage(): String { - return link ?: "" - } - - override fun description(): String { - return desc ?: "" - } - - override fun pubDate(): Long { - return beforeDay(Date()) - } - - override fun category(): RssDataType { - return RssDataType.GURU - } - - override fun getCho(): String? { - return JamoUtils.split(title!!).joinToString("") - } -} fun beforeDay(date: Date): Long { val cal: Calendar = Calendar.getInstance() cal.setTime(date) diff --git a/app/src/main/kotlin/rasel/lunar/launcher/LunarLauncher.kt b/app/src/main/kotlin/rasel/lunar/launcher/LunarLauncher.kt index 8916544..8906b59 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/LunarLauncher.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/LunarLauncher.kt @@ -21,7 +21,6 @@ package rasel.lunar.launcher import android.app.Application import android.content.ComponentCallbacks2 import android.database.sqlite.SQLiteDatabase -import com.squareup.picasso.Picasso internal class LunarLauncher : Application() { diff --git a/app/src/main/kotlin/rasel/lunar/launcher/apps/AppDrawer.kt b/app/src/main/kotlin/rasel/lunar/launcher/apps/AppDrawer.kt index 7600813..2c2f375 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/apps/AppDrawer.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/apps/AppDrawer.kt @@ -26,12 +26,9 @@ import android.content.pm.ApplicationInfo import android.content.pm.PackageManager import android.content.pm.ResolveInfo import android.net.Uri -import android.os.Build import android.os.Bundle import android.os.Handler import android.os.Looper -import android.provider.ContactsContract -import android.util.Log import android.view.KeyEvent import android.view.LayoutInflater import android.view.View @@ -39,21 +36,12 @@ import android.view.View.GONE import android.view.View.VISIBLE import android.view.ViewGroup import android.view.inputmethod.InputMethodManager -import androidx.appcompat.app.AlertDialog import androidx.core.widget.doOnTextChanged import androidx.fragment.app.Fragment import androidx.recyclerview.widget.GridLayoutManager import io.realm.kotlin.ext.query -import io.realm.kotlin.notifications.InitialResults -import io.realm.kotlin.notifications.ResultsChange -import io.realm.kotlin.notifications.UpdatedResults import io.realm.kotlin.query.RealmResults import io.realm.kotlin.query.Sort -import kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.Job -import kotlinx.coroutines.launch -import org.jsoup.Jsoup import rasel.lunar.launcher.BuildConfig import rasel.lunar.launcher.CommadCallabck import rasel.lunar.launcher.LauncherActivity @@ -64,8 +52,6 @@ import rasel.lunar.launcher.helpers.Constants.Companion.KEY_APPS_LAYOUT import rasel.lunar.launcher.helpers.Constants.Companion.PREFS_APP_NAMES import rasel.lunar.launcher.helpers.Constants.Companion.PREFS_SETTINGS import rasel.lunar.launcher.model.AppInfo -import rasel.lunar.launcher.model.RssData -import rasel.lunar.launcher.utils.AlphabetToChosungMap import rasel.lunar.launcher.utils.BLog import rasel.lunar.launcher.utils.JamoUtils import rasel.lunar.launcher.workers.WorkersDb diff --git a/app/src/main/kotlin/rasel/lunar/launcher/apps/AppMenu.kt b/app/src/main/kotlin/rasel/lunar/launcher/apps/AppMenu.kt index f201005..9f8cc60 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/apps/AppMenu.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/apps/AppMenu.kt @@ -67,7 +67,7 @@ import java.io.File import java.io.FileInputStream import java.io.FileOutputStream import java.io.IOException -import java.util.* +import java.util.Date internal class AppMenu : BottomSheetDialogFragment() { diff --git a/app/src/main/kotlin/rasel/lunar/launcher/apps/AppsAdapter.kt b/app/src/main/kotlin/rasel/lunar/launcher/apps/AppsAdapter.kt index cc57b4c..971df30 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/apps/AppsAdapter.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/apps/AppsAdapter.kt @@ -36,12 +36,7 @@ import rasel.lunar.launcher.R import rasel.lunar.launcher.apps.IconPackManager.Companion.getDrawableIconForPackage import rasel.lunar.launcher.databinding.AppsChildBinding import rasel.lunar.launcher.model.AppInfo -import rasel.lunar.launcher.utils.BLog -import rasel.lunar.launcher.utils.EnToKo.engToKor import rasel.lunar.launcher.workers.WorkersDb -import java.util.regex.Matcher -import java.util.regex.Pattern - internal class AppsAdapter( diff --git a/app/src/main/kotlin/rasel/lunar/launcher/apps/ContactAdapter.kt b/app/src/main/kotlin/rasel/lunar/launcher/apps/ContactAdapter.kt index cce9e51..eba17d9 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/apps/ContactAdapter.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/apps/ContactAdapter.kt @@ -19,30 +19,16 @@ package rasel.lunar.launcher.apps import android.annotation.SuppressLint -import android.content.Intent import android.content.pm.PackageManager -import android.net.Uri -import android.util.TypedValue import android.view.Gravity import android.view.LayoutInflater -import android.view.View import android.view.ViewGroup -import android.widget.TextView -import androidx.core.view.updatePadding import androidx.fragment.app.FragmentManager import androidx.recyclerview.widget.DiffUtil import androidx.recyclerview.widget.RecyclerView -import com.google.android.material.textview.MaterialTextView import io.realm.kotlin.types.RealmObject import io.realm.kotlin.types.annotations.PrimaryKey -import kotlinx.coroutines.MainScope -import kotlinx.coroutines.async -import rasel.lunar.launcher.LauncherActivity.Companion.lActivity -import rasel.lunar.launcher.R -import rasel.lunar.launcher.apps.IconPackManager.Companion.getDrawableIconForPackage -import rasel.lunar.launcher.databinding.AppsChildBinding import rasel.lunar.launcher.databinding.ContactItemBinding -import rasel.lunar.launcher.helpers.UniUtils.Companion.dpToPx import rasel.lunar.launcher.utils.BLog import rasel.lunar.launcher.utils.JamoUtils import rasel.lunar.launcher.workers.RecentCallGetter diff --git a/app/src/main/kotlin/rasel/lunar/launcher/apps/ContactMenu.kt b/app/src/main/kotlin/rasel/lunar/launcher/apps/ContactMenu.kt index 4375cf0..4aaf144 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/apps/ContactMenu.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/apps/ContactMenu.kt @@ -22,8 +22,6 @@ import android.annotation.SuppressLint import android.app.ActivityOptions import android.content.ActivityNotFoundException import android.content.ComponentName -import android.content.ContentUris -import android.content.Context import android.content.Intent import android.content.pm.ApplicationInfo import android.content.pm.PackageManager @@ -35,18 +33,14 @@ import android.os.Build import android.os.Bundle import android.provider.ContactsContract import android.provider.Settings -import android.util.Log -import android.view.KeyEvent import android.view.LayoutInflater import android.view.View import android.view.ViewGroup -import android.view.inputmethod.InputMethodManager import android.widget.AdapterView import android.widget.ArrayAdapter import android.widget.Toast import androidx.appcompat.widget.LinearLayoutCompat import androidx.core.content.FileProvider -import androidx.core.content.pm.PackageInfoCompat import com.google.android.material.bottomsheet.BottomSheetDialog import com.google.android.material.bottomsheet.BottomSheetDialogFragment import com.google.android.material.button.MaterialButton @@ -54,15 +48,11 @@ import com.google.android.material.button.MaterialButtonToggleGroup import com.google.android.material.dialog.MaterialAlertDialogBuilder import rasel.lunar.launcher.LauncherActivity.Companion.lActivity import rasel.lunar.launcher.R -import rasel.lunar.launcher.apps.AppDrawer.Companion.appNamesPrefs import rasel.lunar.launcher.databinding.ActivityBrowserDialogBinding -import rasel.lunar.launcher.databinding.AppInfoDialogBinding -import rasel.lunar.launcher.databinding.AppMenuBinding import rasel.lunar.launcher.databinding.ContactMenuBinding import rasel.lunar.launcher.helpers.Constants.Companion.KEY_APP_NO_ import rasel.lunar.launcher.helpers.Constants.Companion.MAX_FAVORITE_APPS import rasel.lunar.launcher.helpers.Constants.Companion.PREFS_FAVORITE_APPS -import rasel.lunar.launcher.helpers.UniUtils.Companion.copyToClipboard import rasel.lunar.launcher.helpers.UniUtils.Companion.screenHeight import rasel.lunar.launcher.helpers.UniUtils.Companion.screenWidth import rasel.lunar.launcher.utils.BLog @@ -70,7 +60,7 @@ import java.io.File import java.io.FileInputStream import java.io.FileOutputStream import java.io.IOException -import java.util.* +import java.util.Date internal class ContactMenu : BottomSheetDialogFragment() { diff --git a/app/src/main/kotlin/rasel/lunar/launcher/apps/IconPackManager.kt b/app/src/main/kotlin/rasel/lunar/launcher/apps/IconPackManager.kt index e66c00a..23e1303 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/apps/IconPackManager.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/apps/IconPackManager.kt @@ -24,14 +24,10 @@ import android.content.res.Resources import android.graphics.Bitmap import android.graphics.drawable.BitmapDrawable import android.graphics.drawable.Drawable -import android.util.Log import androidx.collection.LruCache import androidx.core.content.res.ResourcesCompat -import com.squareup.picasso.Picasso import kotlinx.coroutines.GlobalScope -import kotlinx.coroutines.MainScope import kotlinx.coroutines.async -import kotlinx.coroutines.launch import org.xmlpull.v1.XmlPullParser import org.xmlpull.v1.XmlPullParserException import org.xmlpull.v1.XmlPullParserFactory diff --git a/app/src/main/kotlin/rasel/lunar/launcher/apps/SearchMenu.kt b/app/src/main/kotlin/rasel/lunar/launcher/apps/SearchMenu.kt index 4f85a98..f32a46c 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/apps/SearchMenu.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/apps/SearchMenu.kt @@ -18,54 +18,21 @@ package rasel.lunar.launcher.apps -import android.annotation.SuppressLint -import android.app.ActivityOptions -import android.content.ActivityNotFoundException -import android.content.ComponentName import android.content.DialogInterface import android.content.Intent import android.content.pm.ApplicationInfo import android.content.pm.PackageManager -import android.content.res.ColorStateList -import android.graphics.Rect -import android.icu.text.SimpleDateFormat import android.net.Uri -import android.os.Build import android.os.Bundle -import android.provider.ContactsContract -import android.provider.Settings import android.view.LayoutInflater import android.view.View import android.view.ViewGroup -import android.widget.AdapterView -import android.widget.ArrayAdapter -import android.widget.Toast -import androidx.appcompat.widget.LinearLayoutCompat -import androidx.core.content.FileProvider import androidx.fragment.app.FragmentManager -import androidx.fragment.app.FragmentTransaction import com.google.android.material.bottomsheet.BottomSheetDialog import com.google.android.material.bottomsheet.BottomSheetDialogFragment -import com.google.android.material.button.MaterialButton -import com.google.android.material.button.MaterialButtonToggleGroup -import com.google.android.material.dialog.MaterialAlertDialogBuilder import rasel.lunar.launcher.BuildConfig -import rasel.lunar.launcher.LauncherActivity.Companion.lActivity -import rasel.lunar.launcher.R -import rasel.lunar.launcher.databinding.ActivityBrowserDialogBinding -import rasel.lunar.launcher.databinding.ContactMenuBinding import rasel.lunar.launcher.databinding.SearchMenuBinding -import rasel.lunar.launcher.helpers.Constants.Companion.KEY_APP_NO_ -import rasel.lunar.launcher.helpers.Constants.Companion.MAX_FAVORITE_APPS -import rasel.lunar.launcher.helpers.Constants.Companion.PREFS_FAVORITE_APPS -import rasel.lunar.launcher.helpers.UniUtils.Companion.screenHeight -import rasel.lunar.launcher.helpers.UniUtils.Companion.screenWidth import rasel.lunar.launcher.utils.BLog -import java.io.File -import java.io.FileInputStream -import java.io.FileOutputStream -import java.io.IOException -import java.util.* internal class SearchMenu : BottomSheetDialogFragment() { diff --git a/app/src/main/kotlin/rasel/lunar/launcher/feeds/SystemStats.kt b/app/src/main/kotlin/rasel/lunar/launcher/feeds/SystemStats.kt index e954a5c..9040417 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/feeds/SystemStats.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/feeds/SystemStats.kt @@ -23,7 +23,10 @@ import android.app.ActivityManager import android.content.Context import android.content.Intent import android.content.IntentFilter -import android.os.* +import android.os.BatteryManager +import android.os.Environment +import android.os.StatFs +import android.os.SystemClock import android.text.Html import android.view.LayoutInflater import android.view.View @@ -42,7 +45,7 @@ import java.io.File import java.io.InputStreamReader import java.io.RandomAccessFile import java.net.NetworkInterface -import java.util.* +import java.util.Collections import java.util.concurrent.TimeUnit import kotlin.math.roundToInt diff --git a/app/src/main/kotlin/rasel/lunar/launcher/feeds/rss/RssAdapter.kt b/app/src/main/kotlin/rasel/lunar/launcher/feeds/rss/RssAdapter.kt index df4d406..ec1790b 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/feeds/rss/RssAdapter.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/feeds/rss/RssAdapter.kt @@ -18,22 +18,22 @@ package rasel.lunar.launcher.feeds.rss -import androidx.recyclerview.widget.RecyclerView -import android.view.ViewGroup -import android.view.LayoutInflater import android.annotation.SuppressLint import android.content.Context import android.content.Intent -import android.view.Gravity import android.net.Uri +import android.view.Gravity +import android.view.LayoutInflater import android.view.View +import android.view.ViewGroup import androidx.recyclerview.widget.DiffUtil +import androidx.recyclerview.widget.RecyclerView import com.squareup.picasso.Picasso import rasel.lunar.launcher.LauncherActivity.Companion.lActivity import rasel.lunar.launcher.databinding.ListItemWithBinding -import rasel.lunar.launcher.model.RssItem import rasel.lunar.launcher.model.RssDataInterface import rasel.lunar.launcher.model.RssDataType +import rasel.lunar.launcher.model.RssItem import rasel.lunar.launcher.todos.RssItemDiffUtil import java.net.URLEncoder import java.nio.charset.Charset diff --git a/app/src/main/kotlin/rasel/lunar/launcher/feeds/rss/RssParser.kt b/app/src/main/kotlin/rasel/lunar/launcher/feeds/rss/RssParser.kt index da1e656..7bec73c 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/feeds/rss/RssParser.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/feeds/rss/RssParser.kt @@ -18,13 +18,11 @@ package rasel.lunar.launcher.feeds.rss -import kotlin.Throws -import org.xmlpull.v1.XmlPullParserException -import org.xmlpull.v1.XmlPullParser import android.util.Xml +import org.xmlpull.v1.XmlPullParser +import org.xmlpull.v1.XmlPullParserException import java.io.IOException import java.io.InputStream -import java.util.ArrayList internal class RssParser { diff --git a/app/src/main/kotlin/rasel/lunar/launcher/helpers/UniUtils.kt b/app/src/main/kotlin/rasel/lunar/launcher/helpers/UniUtils.kt index 5340420..b8d370e 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/helpers/UniUtils.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/helpers/UniUtils.kt @@ -20,35 +20,27 @@ package rasel.lunar.launcher.helpers import android.annotation.SuppressLint import android.app.admin.DevicePolicyManager -import android.content.* -import android.content.pm.PackageManager +import android.content.ClipData +import android.content.ClipboardManager +import android.content.ComponentName +import android.content.Context +import android.content.Intent import android.net.ConnectivityManager import android.os.Build import android.os.PowerManager import android.provider.Settings import android.util.DisplayMetrics import android.util.TypedValue -import android.view.View import android.view.WindowInsets import android.widget.Toast import androidx.appcompat.widget.LinearLayoutCompat import androidx.biometric.BiometricManager import androidx.biometric.BiometricManager.BIOMETRIC_SUCCESS import androidx.biometric.BiometricPrompt -import androidx.core.view.isVisible -import com.google.android.material.imageview.ShapeableImageView import rasel.lunar.launcher.LauncherActivity.Companion.lActivity import rasel.lunar.launcher.R -import rasel.lunar.launcher.apps.IconPackManager.Companion.getDrawableIconForPackage import rasel.lunar.launcher.helpers.Constants.Companion.ACCESSIBILITY_SERVICE_LOCK_SCREEN import rasel.lunar.launcher.helpers.Constants.Companion.AUTHENTICATOR_TYPE -import rasel.lunar.launcher.helpers.Constants.Companion.DEFAULT_ICON_SIZE -import rasel.lunar.launcher.helpers.Constants.Companion.KEY_APPS_LAYOUT -import rasel.lunar.launcher.helpers.Constants.Companion.KEY_APP_NO_ -import rasel.lunar.launcher.helpers.Constants.Companion.KEY_ICON_SIZE -import rasel.lunar.launcher.helpers.Constants.Companion.MAX_FAVORITE_APPS -import rasel.lunar.launcher.helpers.Constants.Companion.PREFS_FAVORITE_APPS -import rasel.lunar.launcher.helpers.Constants.Companion.PREFS_SETTINGS import java.io.DataOutputStream diff --git a/app/src/main/kotlin/rasel/lunar/launcher/home/BatteryReceiver.kt b/app/src/main/kotlin/rasel/lunar/launcher/home/BatteryReceiver.kt index 1011794..1882487 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/home/BatteryReceiver.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/home/BatteryReceiver.kt @@ -23,11 +23,7 @@ import android.content.Context import android.content.Intent import android.os.BatteryManager import android.provider.Settings -import android.view.animation.AnimationUtils import android.widget.TextView -import com.google.android.material.progressindicator.CircularProgressIndicator -import rasel.lunar.launcher.R -import rasel.lunar.launcher.utils.BLog internal class BatteryReceiver(private val progressBar: TextView) : BroadcastReceiver() { diff --git a/app/src/main/kotlin/rasel/lunar/launcher/home/weather/WeatherClient.kt b/app/src/main/kotlin/rasel/lunar/launcher/home/weather/WeatherClient.kt index 5869de1..3c249d3 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/home/weather/WeatherClient.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/home/weather/WeatherClient.kt @@ -20,8 +20,6 @@ package rasel.lunar.launcher.home.weather import java.io.BufferedReader import java.io.InputStreamReader -import java.lang.Exception -import java.lang.StringBuilder import java.net.HttpURLConnection import java.net.URL diff --git a/app/src/main/kotlin/rasel/lunar/launcher/home/weather/WeatherExecutor.kt b/app/src/main/kotlin/rasel/lunar/launcher/home/weather/WeatherExecutor.kt index f2097af..daa0438 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/home/weather/WeatherExecutor.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/home/weather/WeatherExecutor.kt @@ -29,7 +29,6 @@ import rasel.lunar.launcher.helpers.Constants.Companion.KEY_OWM_API import rasel.lunar.launcher.helpers.Constants.Companion.KEY_SHOW_CITY import rasel.lunar.launcher.helpers.Constants.Companion.KEY_TEMP_UNIT import rasel.lunar.launcher.helpers.UniUtils.Companion.isNetworkAvailable -import java.net.URLEncoder import java.util.concurrent.Executors diff --git a/app/src/main/kotlin/rasel/lunar/launcher/model/RssItem.kt b/app/src/main/kotlin/rasel/lunar/launcher/model/Adults.kt similarity index 53% rename from app/src/main/kotlin/rasel/lunar/launcher/model/RssItem.kt rename to app/src/main/kotlin/rasel/lunar/launcher/model/Adults.kt index 4497ce5..adb3d20 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/model/RssItem.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/model/Adults.kt @@ -1,7 +1,79 @@ package rasel.lunar.launcher.model +import rasel.lunar.launcher.beforeDay import rasel.lunar.launcher.utils.JamoUtils +import java.util.Date +class MissD : RssDataInterface { + var link : String? = null + + var title : String? = null + + var thumb : String? = null + + var desc : String? = null + + override fun title(): String { + return title ?: "" + } + + override fun thumbnailUrl(): String { + return thumb ?: "" + } + + override fun originPage(): String { + return link ?: "" + } + + override fun description(): String { + return desc ?: "" + } + + override fun pubDate(): Long { + return beforeDay(Date()) + } + + override fun category(): RssDataType { + return RssDataType.GURU + } + + override fun getCho(): String? { + return JamoUtils.split(title!!).joinToString("") + } +} + +class MostItem : RssItem , RssDataInterface { + + constructor() : super() + + override fun title(): String { + return title + } + + override fun thumbnailUrl(): String { + return image + } + + override fun originPage(): String { + return pageLink + } + + override fun description(): String { + return tags.plus(", ").plus(model).plus(", ").plus(category()) + } + + override fun pubDate(): Long { + return date + } + + override fun category(): RssDataType { + return RssDataType.Most + } + + override fun getCho(): String? { + return JamoUtils.split(title!!).joinToString("") + } +} open class RssItem : RssDataInterface { var model : String = "" var title : String = "" @@ -59,35 +131,45 @@ open class RssItem : RssDataInterface { } } -class MostItem : RssItem , RssDataInterface { - - constructor() : super() +class RssTagItem : RssDataInterface { + var link : String = "" + var tagTitle = "" + var count = 0 override fun title(): String { - return title + return tagTitle } override fun thumbnailUrl(): String { - return image + return "" } override fun originPage(): String { - return pageLink + return link } override fun description(): String { - return tags.plus(", ").plus(model).plus(", ").plus(category()) + return " " } override fun pubDate(): Long { - return date + return count.toLong() } override fun category(): RssDataType { - return RssDataType.Most + return RssDataType.TAGS } + constructor(link: String, tagTitle: String) { + this.link = link + this.tagTitle = tagTitle + if (tagTitle.contains("(") && tagTitle.contains(")")) { + try { + count = tagTitle.split("(")[1].split(")")[0].toInt() + }catch (e : Exception) {} + } + } override fun getCho(): String? { - return JamoUtils.split(title!!).joinToString("") + return JamoUtils.split(tagTitle!!).joinToString("") } } diff --git a/app/src/main/kotlin/rasel/lunar/launcher/model/Clien.kt b/app/src/main/kotlin/rasel/lunar/launcher/model/Clien.kt deleted file mode 100644 index dfd659a..0000000 --- a/app/src/main/kotlin/rasel/lunar/launcher/model/Clien.kt +++ /dev/null @@ -1,27 +0,0 @@ -package rasel.lunar.launcher.model - -import java.text.SimpleDateFormat -import java.util.Calendar -import java.util.Date - -class Clien : DcInside() { - companion object{ - val dateFormat = SimpleDateFormat("yyyy-MM-dd HH:mm:ss") - } - override fun category(): RssDataType { - return RssDataType.Clien - } - - - override fun pubDate(): Long { - if (dateTiemL < 1L) { - if (dateTiem?.length ?: 0 < 1) return 0L - return dateFormat.parse(dateTiem!!).time.apply { - dateTiemL = this - } - } else { - return dateTiemL - } - } - -} \ No newline at end of file diff --git a/app/src/main/kotlin/rasel/lunar/launcher/model/CommunityData.kt b/app/src/main/kotlin/rasel/lunar/launcher/model/CommunityData.kt index 59f3b28..6cd9737 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/model/CommunityData.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/model/CommunityData.kt @@ -4,7 +4,6 @@ import io.realm.kotlin.types.RealmObject import io.realm.kotlin.types.annotations.Ignore import io.realm.kotlin.types.annotations.PrimaryKey import org.jsoup.select.Elements -import rasel.lunar.launcher.utils.BLog import rasel.lunar.launcher.utils.JamoUtils import rasel.lunar.launcher.utils.afterDay import rasel.lunar.launcher.utils.beforeDay @@ -14,11 +13,30 @@ import java.util.Date import java.util.TimeZone - - fun Elements.getT() = if (size > 0) get(0).text() else "" fun Elements.getHref() = if (size > 0) get(0).attr("href") else "" val dateFormat = SimpleDateFormat("hh:mm / yy - MM - dd") +class Clien : DcInside() { + companion object{ + val dateFormat = SimpleDateFormat("yyyy-MM-dd HH:mm:ss") + } + override fun category(): RssDataType { + return RssDataType.Clien + } + + + override fun pubDate(): Long { + if (dateTiemL < 1L) { + if (dateTiem?.length ?: 0 < 1) return 0L + return dateFormat.parse(dateTiem!!).time.apply { + dateTiemL = this + } + } else { + return dateTiemL + } + } + +} class Arca : RssDataInterface { var link : String? = null var title : String? = null diff --git a/app/src/main/kotlin/rasel/lunar/launcher/model/RssTagItem.kt b/app/src/main/kotlin/rasel/lunar/launcher/model/RssTagItem.kt deleted file mode 100644 index b279f7d..0000000 --- a/app/src/main/kotlin/rasel/lunar/launcher/model/RssTagItem.kt +++ /dev/null @@ -1,46 +0,0 @@ -package rasel.lunar.launcher.model - -import rasel.lunar.launcher.utils.JamoUtils - -class RssTagItem : RssDataInterface { - var link : String = "" - var tagTitle = "" - var count = 0 - - override fun title(): String { - return tagTitle - } - - override fun thumbnailUrl(): String { - return "" - } - - override fun originPage(): String { - return link - } - - override fun description(): String { - return " " - } - - override fun pubDate(): Long { - return count.toLong() - } - - override fun category(): RssDataType { - return RssDataType.TAGS - } - - constructor(link: String, tagTitle: String) { - this.link = link - this.tagTitle = tagTitle - if (tagTitle.contains("(") && tagTitle.contains(")")) { - try { - count = tagTitle.split("(")[1].split(")")[0].toInt() - }catch (e : Exception) {} - } - } - override fun getCho(): String? { - return JamoUtils.split(tagTitle!!).joinToString("") - } -} \ No newline at end of file diff --git a/app/src/main/kotlin/rasel/lunar/launcher/model/Reddit.kt b/app/src/main/kotlin/rasel/lunar/launcher/model/others/Reddit.kt similarity index 98% rename from app/src/main/kotlin/rasel/lunar/launcher/model/Reddit.kt rename to app/src/main/kotlin/rasel/lunar/launcher/model/others/Reddit.kt index 87085c8..ee25f23 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/model/Reddit.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/model/others/Reddit.kt @@ -1,5 +1,7 @@ -package rasel.lunar.launcher.model +package rasel.lunar.launcher.model.others +import rasel.lunar.launcher.model.RssDataInterface +import rasel.lunar.launcher.model.RssDataType import rasel.lunar.launcher.todos.Image import rasel.lunar.launcher.todos.Source import rasel.lunar.launcher.utils.JamoUtils diff --git a/app/src/main/kotlin/rasel/lunar/launcher/model/YoutubeData.kt b/app/src/main/kotlin/rasel/lunar/launcher/model/others/YoutubeData.kt similarity index 99% rename from app/src/main/kotlin/rasel/lunar/launcher/model/YoutubeData.kt rename to app/src/main/kotlin/rasel/lunar/launcher/model/others/YoutubeData.kt index b075877..2fb99f5 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/model/YoutubeData.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/model/others/YoutubeData.kt @@ -1,6 +1,8 @@ -package rasel.lunar.launcher.model +package rasel.lunar.launcher.model.others import org.json.JSONObject +import rasel.lunar.launcher.model.RssDataInterface +import rasel.lunar.launcher.model.RssDataType import rasel.lunar.launcher.utils.JamoUtils import rasel.lunar.launcher.utils.afterDay import rasel.lunar.launcher.utils.beforeDay diff --git a/app/src/main/kotlin/rasel/lunar/launcher/qaccess/QuickAccess.kt b/app/src/main/kotlin/rasel/lunar/launcher/qaccess/QuickAccess.kt index c77bf03..3e8f584 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/qaccess/QuickAccess.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/qaccess/QuickAccess.kt @@ -24,7 +24,11 @@ import android.content.Context import android.content.Intent import android.content.SharedPreferences import android.content.pm.PackageManager -import android.graphics.* +import android.graphics.BlendMode +import android.graphics.BlendModeColorFilter +import android.graphics.Color +import android.graphics.PorterDuff +import android.graphics.Typeface import android.media.AudioManager import android.net.Uri import android.os.Build @@ -60,7 +64,7 @@ import rasel.lunar.launcher.helpers.Constants.Companion.PREFS_SHORTCUTS import rasel.lunar.launcher.helpers.Constants.Companion.SEPARATOR import rasel.lunar.launcher.helpers.Constants.Companion.SHORTCUT_TYPE_PHONE import rasel.lunar.launcher.helpers.Constants.Companion.SHORTCUT_TYPE_URL -import java.util.* +import java.util.Objects import kotlin.properties.Delegates diff --git a/app/src/main/kotlin/rasel/lunar/launcher/settings/SettingsActivity.kt b/app/src/main/kotlin/rasel/lunar/launcher/settings/SettingsActivity.kt index ac73576..5dc8867 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/settings/SettingsActivity.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/settings/SettingsActivity.kt @@ -34,7 +34,13 @@ import rasel.lunar.launcher.databinding.AboutBinding import rasel.lunar.launcher.databinding.SettingsActivityBinding import rasel.lunar.launcher.helpers.Constants.Companion.BOTTOM_SHEET_TAG import rasel.lunar.launcher.helpers.Constants.Companion.PREFS_SETTINGS -import rasel.lunar.launcher.settings.childs.* +import rasel.lunar.launcher.settings.childs.Advance +import rasel.lunar.launcher.settings.childs.Appearances +import rasel.lunar.launcher.settings.childs.Apps +import rasel.lunar.launcher.settings.childs.Misc +import rasel.lunar.launcher.settings.childs.TimeDate +import rasel.lunar.launcher.settings.childs.TodoSettings +import rasel.lunar.launcher.settings.childs.WeatherSettings internal class SettingsActivity : AppCompatActivity() { diff --git a/app/src/main/kotlin/rasel/lunar/launcher/settings/childs/Appearances.kt b/app/src/main/kotlin/rasel/lunar/launcher/settings/childs/Appearances.kt index 74f185c..a9e5757 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/settings/childs/Appearances.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/settings/childs/Appearances.kt @@ -55,7 +55,7 @@ import rasel.lunar.launcher.helpers.Constants.Companion.KEY_WINDOW_BACKGROUND import rasel.lunar.launcher.helpers.UniUtils.Companion.getColorResId import rasel.lunar.launcher.settings.SettingsActivity.Companion.settingsPrefs import java.io.IOException -import java.util.* +import java.util.Objects internal class Appearances : BottomSheetDialogFragment() { diff --git a/app/src/main/kotlin/rasel/lunar/launcher/settings/childs/Misc.kt b/app/src/main/kotlin/rasel/lunar/launcher/settings/childs/Misc.kt index 27d693a..a7e7767 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/settings/childs/Misc.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/settings/childs/Misc.kt @@ -39,7 +39,7 @@ import rasel.lunar.launcher.helpers.Constants.Companion.KEY_SHORTCUT_COUNT import rasel.lunar.launcher.helpers.Constants.Companion.MAX_SHORTCUTS import rasel.lunar.launcher.helpers.UniUtils.Companion.isRooted import rasel.lunar.launcher.settings.SettingsActivity.Companion.settingsPrefs -import java.util.* +import java.util.Objects internal class Misc : BottomSheetDialogFragment() { diff --git a/app/src/main/kotlin/rasel/lunar/launcher/settings/childs/TimeDate.kt b/app/src/main/kotlin/rasel/lunar/launcher/settings/childs/TimeDate.kt index 1d35c56..0b03e92 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/settings/childs/TimeDate.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/settings/childs/TimeDate.kt @@ -30,7 +30,7 @@ import rasel.lunar.launcher.helpers.Constants.Companion.DEFAULT_DATE_FORMAT import rasel.lunar.launcher.helpers.Constants.Companion.KEY_DATE_FORMAT import rasel.lunar.launcher.helpers.Constants.Companion.KEY_TIME_FORMAT import rasel.lunar.launcher.settings.SettingsActivity.Companion.settingsPrefs -import java.util.* +import java.util.Objects internal class TimeDate : BottomSheetDialogFragment() { diff --git a/app/src/main/kotlin/rasel/lunar/launcher/settings/childs/WeatherSettings.kt b/app/src/main/kotlin/rasel/lunar/launcher/settings/childs/WeatherSettings.kt index 576a381..0465ae1 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/settings/childs/WeatherSettings.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/settings/childs/WeatherSettings.kt @@ -31,7 +31,7 @@ import rasel.lunar.launcher.helpers.Constants.Companion.KEY_OWM_API import rasel.lunar.launcher.helpers.Constants.Companion.KEY_SHOW_CITY import rasel.lunar.launcher.helpers.Constants.Companion.KEY_TEMP_UNIT import rasel.lunar.launcher.settings.SettingsActivity.Companion.settingsPrefs -import java.util.* +import java.util.Objects internal class WeatherSettings : BottomSheetDialogFragment() { diff --git a/app/src/main/kotlin/rasel/lunar/launcher/todos/MissedCallsAdapter.kt b/app/src/main/kotlin/rasel/lunar/launcher/todos/MissedCallsAdapter.kt index 3c57a21..c215d3b 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/todos/MissedCallsAdapter.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/todos/MissedCallsAdapter.kt @@ -25,23 +25,14 @@ import android.net.Uri import android.provider.CallLog import android.provider.ContactsContract import android.view.LayoutInflater -import android.view.View import android.view.ViewGroup -import androidx.core.content.ContextCompat import androidx.recyclerview.widget.DiffUtil import androidx.recyclerview.widget.RecyclerView -import com.google.android.material.bottomsheet.BottomSheetDialog import rasel.lunar.launcher.LauncherActivity.Companion.lActivity import rasel.lunar.launcher.R import rasel.lunar.launcher.databinding.CalllogItemBinding -import rasel.lunar.launcher.databinding.ListItemBinding -import rasel.lunar.launcher.databinding.TodoDialogBinding -import rasel.lunar.launcher.helpers.UniUtils.Companion.copyToClipboard -import rasel.lunar.launcher.utils.BLog import rasel.lunar.launcher.utils.getContactId import rasel.lunar.launcher.workers.RecentCall -import java.util.* -import kotlin.collections.ArrayList internal class MissedCallsAdapter( diff --git a/app/src/main/kotlin/rasel/lunar/launcher/todos/RssFeedsParser.kt b/app/src/main/kotlin/rasel/lunar/launcher/todos/RssFeedsParser.kt index aa86ed2..5858113 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/todos/RssFeedsParser.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/todos/RssFeedsParser.kt @@ -6,14 +6,13 @@ import org.xmlpull.v1.XmlPullParser import org.xmlpull.v1.XmlPullParserException import rasel.lunar.launcher.model.RssDataInterface import rasel.lunar.launcher.model.RssDataType -import rasel.lunar.launcher.utils.BLog +import rasel.lunar.launcher.model.others.Reddit import rasel.lunar.launcher.utils.JamoUtils import rasel.lunar.launcher.utils.beforeDay import java.io.IOException import java.io.InputStream import java.io.InputStreamReader import java.net.URL -import java.net.URLDecoder import java.text.SimpleDateFormat import java.util.Date import java.util.Locale @@ -36,7 +35,7 @@ object RssFeedsParser { var returnList = mutableListOf() var dateTime = beforeDay(Date(),3) try { - var mReddit = Gson().fromJson(InputStreamReader(getInputStream(url)!!),rasel.lunar.launcher.model.Reddit::class.java) + var mReddit = Gson().fromJson(InputStreamReader(getInputStream(url)!!), Reddit::class.java) mReddit.data?.children?.forEach { if(((it.data?.created_utc ?: 0).toLong() * 1000L > dateTime)) { (it.data as? RssDataInterface)?.let { rss -> diff --git a/app/src/main/kotlin/rasel/lunar/launcher/todos/RssItemAdapter.kt b/app/src/main/kotlin/rasel/lunar/launcher/todos/RssItemAdapter.kt index d012c37..3c2611f 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/todos/RssItemAdapter.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/todos/RssItemAdapter.kt @@ -34,7 +34,6 @@ import com.squareup.picasso.Picasso import rasel.lunar.launcher.LauncherActivity.Companion.lActivity import rasel.lunar.launcher.R import rasel.lunar.launcher.databinding.ListItemWithBinding -import rasel.lunar.launcher.model.RssData import rasel.lunar.launcher.model.RssDataInterface import rasel.lunar.launcher.model.RssDataType import rasel.lunar.launcher.utils.BLog diff --git a/app/src/main/kotlin/rasel/lunar/launcher/todos/SmsLogsAdapter.kt b/app/src/main/kotlin/rasel/lunar/launcher/todos/SmsLogsAdapter.kt index 65d002c..6d12c58 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/todos/SmsLogsAdapter.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/todos/SmsLogsAdapter.kt @@ -24,14 +24,11 @@ import android.content.Intent import android.net.Uri import android.view.LayoutInflater import android.view.ViewGroup -import androidx.core.content.ContextCompat.startActivity import androidx.recyclerview.widget.DiffUtil import androidx.recyclerview.widget.RecyclerView import rasel.lunar.launcher.LauncherActivity.Companion.lActivity import rasel.lunar.launcher.R -import rasel.lunar.launcher.databinding.ListItemBinding import rasel.lunar.launcher.databinding.SmsItemBinding -import rasel.lunar.launcher.utils.BLog import rasel.lunar.launcher.utils.getContactName import rasel.lunar.launcher.workers.RecentSms import java.text.SimpleDateFormat diff --git a/app/src/main/kotlin/rasel/lunar/launcher/todos/YoutubeData.kt b/app/src/main/kotlin/rasel/lunar/launcher/todos/YoutubeData.kt index 962b0ff..f8f4fb6 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/todos/YoutubeData.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/todos/YoutubeData.kt @@ -3,8 +3,8 @@ package rasel.lunar.launcher.todos import org.json.JSONObject import rasel.lunar.launcher.model.RssDataInterface import rasel.lunar.launcher.model.RssDataType -import rasel.lunar.launcher.model.YTBImage -import rasel.lunar.launcher.model.YTBSource +import rasel.lunar.launcher.model.others.YTBImage +import rasel.lunar.launcher.model.others.YTBSource import rasel.lunar.launcher.utils.JamoUtils import rasel.lunar.launcher.utils.afterDay import rasel.lunar.launcher.utils.beforeDay diff --git a/app/src/main/kotlin/rasel/lunar/launcher/utils/BLog.kt b/app/src/main/kotlin/rasel/lunar/launcher/utils/BLog.kt index 0e247e2..1641dc9 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/utils/BLog.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/utils/BLog.kt @@ -2,7 +2,6 @@ package rasel.lunar.launcher.utils import android.util.Log import rasel.lunar.launcher.BuildConfig -import java.lang.Exception object BLog { val DEFAULT_TAG = "Lunatic" diff --git a/app/src/main/kotlin/rasel/lunar/launcher/utils/EnToKo.kt b/app/src/main/kotlin/rasel/lunar/launcher/utils/EnToKo.kt index 623dd61..de59f2c 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/utils/EnToKo.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/utils/EnToKo.kt @@ -1,8 +1,5 @@ package rasel.lunar.launcher.utils -import java.util.Scanner -import java.util.regex.Matcher - object EnToKo { var ignoreChars: String = "`1234567890-=[]\\;',./~!@#$%^&*()_+{}|:\"<>? " diff --git a/app/src/main/kotlin/rasel/lunar/launcher/utils/ImageUtils.kt b/app/src/main/kotlin/rasel/lunar/launcher/utils/ImageUtils.kt index 4722ff0..32953e8 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/utils/ImageUtils.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/utils/ImageUtils.kt @@ -2,10 +2,7 @@ package rasel.lunar.launcher.utils import android.graphics.Bitmap import android.graphics.BitmapFactory -import android.graphics.drawable.Icon import android.util.Base64 -import androidx.core.content.pm.ShortcutInfoCompat -import androidx.core.graphics.drawable.IconCompat import java.io.ByteArrayOutputStream object ImageUtils { diff --git a/app/src/main/kotlin/rasel/lunar/launcher/utils/NLService.kt b/app/src/main/kotlin/rasel/lunar/launcher/utils/NLService.kt index 6793dcc..b5b3eba 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/utils/NLService.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/utils/NLService.kt @@ -5,8 +5,6 @@ import android.content.ComponentName import android.content.Context import android.content.Intent import android.content.IntentFilter -import android.content.pm.PackageManager -import android.graphics.drawable.Drawable import android.media.MediaMetadata import android.media.session.MediaSessionManager import android.os.Build @@ -19,7 +17,6 @@ import io.realm.kotlin.ext.query import rasel.lunar.launcher.model.CurrentPlayItem import rasel.lunar.launcher.model.NotificationItem import rasel.lunar.launcher.workers.WorkersDb -import java.security.AccessController.getContext class NLService : NotificationListenerService() { diff --git a/app/src/main/kotlin/rasel/lunar/launcher/utils/SimpleGesture.kt b/app/src/main/kotlin/rasel/lunar/launcher/utils/SimpleGesture.kt index c42501f..5b56ad0 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/utils/SimpleGesture.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/utils/SimpleGesture.kt @@ -2,7 +2,6 @@ package rasel.lunar.launcher.utils import android.content.Context import android.os.SystemClock -import android.util.DisplayMetrics import android.util.Log import android.view.MotionEvent import android.view.View diff --git a/app/src/main/kotlin/rasel/lunar/launcher/view/DateTimeView.kt b/app/src/main/kotlin/rasel/lunar/launcher/view/DateTimeView.kt index 9f01bd5..b042c1b 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/view/DateTimeView.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/view/DateTimeView.kt @@ -1,22 +1,13 @@ package rasel.lunar.launcher.view -import android.R import android.content.Context -import android.content.res.TypedArray -import android.graphics.Color -import android.os.Build import android.os.Handler import android.os.Looper import android.text.SpannableString import android.text.SpannableStringBuilder import android.text.Spanned import android.text.style.AbsoluteSizeSpan -import android.text.style.ForegroundColorSpan import android.util.AttributeSet -import android.view.LayoutInflater -import android.view.View -import android.widget.LinearLayout -import android.widget.TextView import androidx.appcompat.widget.AppCompatTextView import java.text.SimpleDateFormat import java.util.Date diff --git a/app/src/main/kotlin/rasel/lunar/launcher/workers/ArcaGetter.kt b/app/src/main/kotlin/rasel/lunar/launcher/workers/ArcaGetter.kt index 30b2d00..b827b1d 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/workers/ArcaGetter.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/workers/ArcaGetter.kt @@ -5,10 +5,9 @@ import androidx.work.WorkerParameters import org.jsoup.Jsoup import org.jsoup.nodes.Element import rasel.lunar.launcher.model.Arca -import rasel.lunar.launcher.model.RssData +import rasel.lunar.launcher.model.RssDataInterface import rasel.lunar.launcher.model.getRssData import rasel.lunar.launcher.model.getT -import rasel.lunar.launcher.model.RssDataInterface import rasel.lunar.launcher.utils.beforeDay import java.util.Date diff --git a/app/src/main/kotlin/rasel/lunar/launcher/workers/BaseGetter.kt b/app/src/main/kotlin/rasel/lunar/launcher/workers/BaseGetter.kt index 8f1ddaa..376112d 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/workers/BaseGetter.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/workers/BaseGetter.kt @@ -5,7 +5,6 @@ import androidx.annotation.CallSuper import androidx.work.Worker import androidx.work.WorkerParameters import rasel.lunar.launcher.model.RssData -import rasel.lunar.launcher.utils.before30Min import rasel.lunar.launcher.utils.beforeDay import java.util.Calendar import java.util.Date diff --git a/app/src/main/kotlin/rasel/lunar/launcher/workers/ClienGetter.kt b/app/src/main/kotlin/rasel/lunar/launcher/workers/ClienGetter.kt index 1ad6c87..cfe59e9 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/workers/ClienGetter.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/workers/ClienGetter.kt @@ -5,7 +5,6 @@ import android.content.Context import androidx.work.WorkerParameters import org.jsoup.Jsoup import rasel.lunar.launcher.model.Clien -import rasel.lunar.launcher.model.TheQoo import rasel.lunar.launcher.model.getHref import rasel.lunar.launcher.model.getRssData import rasel.lunar.launcher.model.getT diff --git a/app/src/main/kotlin/rasel/lunar/launcher/workers/ContactInfoGetter.kt b/app/src/main/kotlin/rasel/lunar/launcher/workers/ContactInfoGetter.kt index 8797732..ba6e462 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/workers/ContactInfoGetter.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/workers/ContactInfoGetter.kt @@ -1,22 +1,11 @@ package rasel.lunar.launcher.workers import android.content.Context -import android.content.Intent -import android.content.pm.PackageManager -import android.content.pm.ResolveInfo -import android.os.Build import android.provider.ContactsContract -import android.util.Log import androidx.work.WorkerParameters import io.realm.kotlin.ext.query -import rasel.lunar.launcher.BuildConfig import rasel.lunar.launcher.LauncherActivity.Companion.lActivity -import rasel.lunar.launcher.apps.AppDrawer.Companion.appName -import rasel.lunar.launcher.apps.AppDrawer.Companion.getCategory import rasel.lunar.launcher.apps.SimpleContact -import rasel.lunar.launcher.apps.normalize -import rasel.lunar.launcher.model.AppInfo -import rasel.lunar.launcher.utils.AlphabetToChosungMap class ContactInfoGetter : BaseGetter { companion object { diff --git a/app/src/main/kotlin/rasel/lunar/launcher/workers/DCGetter.kt b/app/src/main/kotlin/rasel/lunar/launcher/workers/DCGetter.kt index 0583c6a..ecc23eb 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/workers/DCGetter.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/workers/DCGetter.kt @@ -6,9 +6,8 @@ import androidx.work.WorkerParameters import org.jsoup.Jsoup import rasel.lunar.launcher.model.DcInside import rasel.lunar.launcher.model.RssData -import rasel.lunar.launcher.model.getRssData import rasel.lunar.launcher.model.RssDataInterface -import rasel.lunar.launcher.utils.BLog +import rasel.lunar.launcher.model.getRssData class DCGetter : BaseGetter { companion object { diff --git a/app/src/main/kotlin/rasel/lunar/launcher/workers/DotaxGetter.kt b/app/src/main/kotlin/rasel/lunar/launcher/workers/DotaxGetter.kt index c85b81c..7f964aa 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/workers/DotaxGetter.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/workers/DotaxGetter.kt @@ -5,12 +5,7 @@ import android.content.Context import androidx.work.WorkerParameters import org.jsoup.Jsoup import rasel.lunar.launcher.model.Dotax -import rasel.lunar.launcher.model.RssData import rasel.lunar.launcher.model.getRssData -import rasel.lunar.launcher.utils.BLog -import rasel.lunar.launcher.utils.before30Min -import rasel.lunar.launcher.utils.beforeDay -import java.util.Date class DotaxGetter : BaseGetter { constructor(context: Context, workerParams: WorkerParameters) : super(context, workerParams) { diff --git a/app/src/main/kotlin/rasel/lunar/launcher/workers/FmKoreaGetter.kt b/app/src/main/kotlin/rasel/lunar/launcher/workers/FmKoreaGetter.kt index 7bba89c..056005d 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/workers/FmKoreaGetter.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/workers/FmKoreaGetter.kt @@ -5,10 +5,7 @@ import android.content.Context import androidx.work.WorkerParameters import org.jsoup.Jsoup import rasel.lunar.launcher.model.FmKorea -import rasel.lunar.launcher.model.RssData import rasel.lunar.launcher.model.getRssData -import rasel.lunar.launcher.utils.before30Min -import rasel.lunar.launcher.utils.beforeDay import java.util.Date class FmKoreaGetter : BaseGetter { diff --git a/app/src/main/kotlin/rasel/lunar/launcher/workers/NewsFeedsGetter.kt b/app/src/main/kotlin/rasel/lunar/launcher/workers/NewsFeedsGetter.kt index 494ddec..2dd0442 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/workers/NewsFeedsGetter.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/workers/NewsFeedsGetter.kt @@ -3,12 +3,9 @@ package rasel.lunar.launcher.workers import android.annotation.SuppressLint import android.content.Context import androidx.work.WorkerParameters -import rasel.lunar.launcher.model.RssData import rasel.lunar.launcher.model.getRssData import rasel.lunar.launcher.todos.RssFeedsParser import rasel.lunar.launcher.utils.RssList -import rasel.lunar.launcher.utils.beforeDay -import java.util.Date class NewsFeedsGetter : BaseGetter { var feddsUrls = arrayListOf() diff --git a/app/src/main/kotlin/rasel/lunar/launcher/workers/OpenWeatherGetter.kt b/app/src/main/kotlin/rasel/lunar/launcher/workers/OpenWeatherGetter.kt index dc68d16..2b57091 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/workers/OpenWeatherGetter.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/workers/OpenWeatherGetter.kt @@ -1,11 +1,8 @@ package rasel.lunar.launcher.workers -import android.Manifest import android.annotation.SuppressLint import android.content.Context -import android.content.pm.PackageManager import android.location.Location -import androidx.core.app.ActivityCompat import androidx.work.WorkerParameters import com.google.android.gms.location.LocationServices import com.google.android.gms.location.Priority diff --git a/app/src/main/kotlin/rasel/lunar/launcher/workers/RedditGetter.kt b/app/src/main/kotlin/rasel/lunar/launcher/workers/RedditGetter.kt index 4997725..ecca317 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/workers/RedditGetter.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/workers/RedditGetter.kt @@ -7,8 +7,6 @@ import rasel.lunar.launcher.model.RssData import rasel.lunar.launcher.model.getRssData import rasel.lunar.launcher.todos.RssFeedsParser import rasel.lunar.launcher.utils.RssList.feedJsons -import rasel.lunar.launcher.utils.beforeDay -import java.util.Date class RedditGetter : BaseGetter { constructor(context: Context, workerParams: WorkerParameters) : super(context, workerParams) { diff --git a/app/src/main/kotlin/rasel/lunar/launcher/workers/RuliWebGetter.kt b/app/src/main/kotlin/rasel/lunar/launcher/workers/RuliWebGetter.kt index d05fd88..a9d1d12 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/workers/RuliWebGetter.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/workers/RuliWebGetter.kt @@ -5,11 +5,8 @@ import android.content.Context import androidx.core.net.toUri import androidx.work.WorkerParameters import org.jsoup.Jsoup -import rasel.lunar.launcher.model.DcInside -import rasel.lunar.launcher.model.RssData -import rasel.lunar.launcher.model.getRssData -import rasel.lunar.launcher.model.RssDataInterface import rasel.lunar.launcher.model.RuliWeb +import rasel.lunar.launcher.model.getRssData import rasel.lunar.launcher.utils.BLog class RuliWebGetter : BaseGetter { diff --git a/app/src/main/kotlin/rasel/lunar/launcher/workers/WorkersDb.kt b/app/src/main/kotlin/rasel/lunar/launcher/workers/WorkersDb.kt index 407edf7..564465f 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/workers/WorkersDb.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/workers/WorkersDb.kt @@ -1,6 +1,5 @@ package rasel.lunar.launcher.workers -import com.google.gson.Gson import io.realm.kotlin.Realm import io.realm.kotlin.RealmConfiguration import io.realm.kotlin.UpdatePolicy @@ -13,8 +12,6 @@ import rasel.lunar.launcher.model.CurrentPlayItem import rasel.lunar.launcher.model.NotificationItem import rasel.lunar.launcher.model.RssData import rasel.lunar.launcher.model.RssDataInterface -import rasel.lunar.launcher.model.getRssData -import rasel.lunar.launcher.utils.BLog import kotlin.reflect.KClass object WorkersDb { diff --git a/app/src/main/kotlin/rasel/lunar/launcher/workers/YoutubeGetter.kt b/app/src/main/kotlin/rasel/lunar/launcher/workers/YoutubeGetter.kt index 5e66608..cc9bc81 100644 --- a/app/src/main/kotlin/rasel/lunar/launcher/workers/YoutubeGetter.kt +++ b/app/src/main/kotlin/rasel/lunar/launcher/workers/YoutubeGetter.kt @@ -8,13 +8,10 @@ import org.json.JSONObject import org.jsoup.Jsoup import org.jsoup.nodes.Document import rasel.lunar.launcher.model.RssData +import rasel.lunar.launcher.model.RssDataInterface import rasel.lunar.launcher.model.getRssData import rasel.lunar.launcher.todos.Root -import rasel.lunar.launcher.model.RssDataInterface -import rasel.lunar.launcher.utils.BLog import rasel.lunar.launcher.utils.RssList -import rasel.lunar.launcher.utils.beforeDay -import java.util.Date class YoutubeGetter : BaseGetter { var rssUrls = arrayListOf() diff --git a/app/src/main/res/layout/launcher_activity.xml b/app/src/main/res/layout/launcher_activity.xml index 7b2d69c..434f9d5 100644 --- a/app/src/main/res/layout/launcher_activity.xml +++ b/app/src/main/res/layout/launcher_activity.xml @@ -2,7 +2,6 @@ - +