This commit is contained in:
lunaticbum 2024-09-13 10:37:59 +09:00
parent f8cfa8e1b9
commit 68839e1e73
54 changed files with 166 additions and 335 deletions

View File

@ -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)

View File

@ -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() {

View File

@ -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

View File

@ -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() {

View File

@ -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(

View File

@ -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

View File

@ -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() {

View File

@ -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

View File

@ -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() {

View File

@ -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

View File

@ -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

View File

@ -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 {

View File

@ -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

View File

@ -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() {

View File

@ -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

View File

@ -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

View File

@ -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("")
}
}

View File

@ -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
}
}
}

View File

@ -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

View File

@ -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("")
}
}

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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() {

View File

@ -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() {

View File

@ -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() {

View File

@ -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() {

View File

@ -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() {

View File

@ -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(

View File

@ -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<RssDataInterface>()
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 ->

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -1,8 +1,5 @@
package rasel.lunar.launcher.utils
import java.util.Scanner
import java.util.regex.Matcher
object EnToKo {
var ignoreChars: String = "`1234567890-=[]\\;',./~!@#$%^&*()_+{}|:\"<>? "

View File

@ -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 {

View File

@ -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() {

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 {

View File

@ -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 {

View File

@ -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) {

View File

@ -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 {

View File

@ -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<String>()

View File

@ -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

View File

@ -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) {

View File

@ -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 {

View File

@ -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 {

View File

@ -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<String>()

View File

@ -2,7 +2,6 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@android:color/transparent"
android:orientation="vertical"
android:id="@+id/mainFragmentsContainer"

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:app="http://schemas.android.com/apk/res-auto">
<resources>
<style name="Theme.LunarLauncher.Starting" parent="Theme.SplashScreen">
<item name="windowSplashScreenBackground">@color/ic_launcher_primary</item>
<item name="windowSplashScreenAnimatedIcon">@drawable/splash_icon</item>