dd
This commit is contained in:
parent
d00c97e7d7
commit
eb51ed944a
@ -89,7 +89,7 @@ dependencies {
|
||||
implementation ("androidx.core:core-splashscreen:1.0.1")
|
||||
implementation ("androidx.lifecycle:lifecycle-runtime-ktx:2.8.7")
|
||||
implementation ("com.google.android.material:material:1.12.0")
|
||||
|
||||
implementation ("com.ibm.icu:icu4j:68.1")
|
||||
implementation (kotlin("stdlib", version = kotlinVersion))
|
||||
implementation ("com.github.cachapa:ExpandableLayout:2.9.2")
|
||||
implementation ("com.squareup.picasso:picasso:2.71828")
|
||||
|
||||
@ -45,6 +45,7 @@ import android.telephony.TelephonyManager
|
||||
import android.view.KeyEvent
|
||||
import android.view.KeyEvent.ACTION_UP
|
||||
import android.view.KeyEvent.KEYCODE_BUTTON_A
|
||||
import android.view.KeyEvent.KEYCODE_BUTTON_B
|
||||
import android.view.KeyEvent.KEYCODE_BUTTON_SELECT
|
||||
import android.view.KeyEvent.KEYCODE_BUTTON_START
|
||||
import android.view.KeyEvent.KEYCODE_BUTTON_X
|
||||
@ -143,7 +144,6 @@ internal class LauncherActivity : CommonActivity() {
|
||||
|
||||
companion object {
|
||||
private var mWorkManager: WorkManager? = null
|
||||
|
||||
var isOpendFold = false
|
||||
val qDayPeriod = 60L * 8L
|
||||
|
||||
@ -152,37 +152,30 @@ internal class LauncherActivity : CommonActivity() {
|
||||
@JvmStatic var appWidgetHost: WidgetHost? = null
|
||||
fun refreshDeviceData()
|
||||
{
|
||||
Executors.newSingleThreadScheduledExecutor().schedule({
|
||||
mWorkManager?.cancelAllWorkByTag(SMS_WORK_TAG)
|
||||
mWorkManager?.enqueueUniquePeriodicWork(
|
||||
SMS_WORK_TAG,
|
||||
ExistingPeriodicWorkPolicy.CANCEL_AND_REENQUEUE,
|
||||
PeriodicWorkRequestBuilder<RecentSmsGetter>(PrefLong.longTimePeriod.get(), TimeUnit.MINUTES)
|
||||
.addTag(SMS_WORK_TAG)
|
||||
.build())
|
||||
}, 500, TimeUnit.MILLISECONDS)
|
||||
Executors.newSingleThreadScheduledExecutor().schedule({
|
||||
mWorkManager?.cancelAllWorkByTag(RecentCallGetter.TAG)
|
||||
mWorkManager?.enqueueUniquePeriodicWork(
|
||||
RecentCallGetter.TAG,
|
||||
ExistingPeriodicWorkPolicy.CANCEL_AND_REENQUEUE,
|
||||
PeriodicWorkRequestBuilder<RecentCallGetter>(PrefLong.longTimePeriod.get(), TimeUnit.MINUTES)
|
||||
.addTag(RecentCallGetter.TAG)
|
||||
.build())
|
||||
}, 500, TimeUnit.MILLISECONDS)
|
||||
|
||||
var delay = 3L
|
||||
Executors.newSingleThreadScheduledExecutor().schedule({
|
||||
mWorkManager?.cancelAllWorkByTag(ContactInfoGetter.TAG)
|
||||
mWorkManager?.enqueueUniquePeriodicWork(
|
||||
ContactInfoGetter.TAG, ExistingPeriodicWorkPolicy.CANCEL_AND_REENQUEUE,
|
||||
PeriodicWorkRequestBuilder<ContactInfoGetter>(12, TimeUnit.HOURS)
|
||||
.addTag(ContactInfoGetter.TAG)
|
||||
.build())
|
||||
}, delay, TimeUnit.SECONDS)
|
||||
Executors.newSingleThreadScheduledExecutor().schedule({
|
||||
mWorkManager?.enqueue(OneTimeWorkRequest.from(AppInfoGetter::class.java))
|
||||
}, 5, TimeUnit.SECONDS)
|
||||
mWorkManager?.cancelAllWorkByTag(SMS_WORK_TAG)
|
||||
mWorkManager?.enqueueUniquePeriodicWork(
|
||||
SMS_WORK_TAG,
|
||||
ExistingPeriodicWorkPolicy.CANCEL_AND_REENQUEUE,
|
||||
PeriodicWorkRequestBuilder<RecentSmsGetter>(PrefLong.longTimePeriod.get(), TimeUnit.MINUTES)
|
||||
.addTag(SMS_WORK_TAG)
|
||||
.build())
|
||||
mWorkManager?.cancelAllWorkByTag(RecentCallGetter.TAG)
|
||||
mWorkManager?.enqueueUniquePeriodicWork(
|
||||
RecentCallGetter.TAG,
|
||||
ExistingPeriodicWorkPolicy.CANCEL_AND_REENQUEUE,
|
||||
PeriodicWorkRequestBuilder<RecentCallGetter>(PrefLong.longTimePeriod.get(), TimeUnit.MINUTES)
|
||||
.addTag(RecentCallGetter.TAG)
|
||||
.build())
|
||||
|
||||
mWorkManager?.cancelAllWorkByTag(ContactInfoGetter.TAG)
|
||||
mWorkManager?.enqueueUniquePeriodicWork(
|
||||
ContactInfoGetter.TAG, ExistingPeriodicWorkPolicy.CANCEL_AND_REENQUEUE,
|
||||
PeriodicWorkRequestBuilder<ContactInfoGetter>(12, TimeUnit.HOURS)
|
||||
.addTag(ContactInfoGetter.TAG)
|
||||
.build())
|
||||
|
||||
mWorkManager?.enqueue(OneTimeWorkRequest.from(AppInfoGetter::class.java))
|
||||
|
||||
}
|
||||
|
||||
@ -201,109 +194,75 @@ internal class LauncherActivity : CommonActivity() {
|
||||
val defaultDelay = 10L
|
||||
|
||||
fun refreshFeeds() {
|
||||
var delay = defaultDelay
|
||||
Executors.newSingleThreadScheduledExecutor().schedule({
|
||||
mWorkManager?.cancelAllWorkByTag(FEDDS_WORK_TAG)
|
||||
mWorkManager?.enqueueUniquePeriodicWork(
|
||||
FEDDS_WORK_TAG, ExistingPeriodicWorkPolicy.CANCEL_AND_REENQUEUE,
|
||||
PeriodicWorkRequestBuilder<NewsFeedsGetter>(PrefLong.shortTimePeriod.get(), TimeUnit.MINUTES)
|
||||
.addTag(FEDDS_WORK_TAG)
|
||||
.build())
|
||||
}, delay, TimeUnit.SECONDS)
|
||||
delay += defaultDelay
|
||||
Executors.newSingleThreadScheduledExecutor().schedule({
|
||||
mWorkManager?.cancelAllWorkByTag(YT_WORK_TAG)
|
||||
mWorkManager?.enqueueUniquePeriodicWork(
|
||||
YT_WORK_TAG, ExistingPeriodicWorkPolicy.CANCEL_AND_REENQUEUE,
|
||||
PeriodicWorkRequestBuilder<YoutubeGetter>(PrefLong.longTimePeriod.get(), TimeUnit.MINUTES)
|
||||
.addTag(YT_WORK_TAG)
|
||||
.build())
|
||||
}, delay, TimeUnit.SECONDS)
|
||||
delay += defaultDelay
|
||||
Executors.newSingleThreadScheduledExecutor().schedule({
|
||||
mWorkManager?.cancelAllWorkByTag(REDDIT_WORK_TAG)
|
||||
mWorkManager?.enqueueUniquePeriodicWork(
|
||||
REDDIT_WORK_TAG, ExistingPeriodicWorkPolicy.CANCEL_AND_REENQUEUE,
|
||||
PeriodicWorkRequestBuilder<RedditGetter>(PrefLong.midTimePeriod.get(), TimeUnit.MINUTES)
|
||||
.addTag(REDDIT_WORK_TAG)
|
||||
.build())
|
||||
}, delay, TimeUnit.SECONDS)
|
||||
delay += defaultDelay
|
||||
Executors.newSingleThreadScheduledExecutor().schedule({
|
||||
mWorkManager?.cancelAllWorkByTag(COMIC_WORK_TAG)
|
||||
mWorkManager?.enqueueUniquePeriodicWork(
|
||||
COMIC_WORK_TAG, ExistingPeriodicWorkPolicy.CANCEL_AND_REENQUEUE,
|
||||
PeriodicWorkRequestBuilder<FmKoreaGetter>(PrefLong.midTimePeriod.get(), TimeUnit.MINUTES)
|
||||
.addTag(COMIC_WORK_TAG)
|
||||
.build())
|
||||
}, delay, TimeUnit.SECONDS)
|
||||
delay += defaultDelay
|
||||
Executors.newSingleThreadScheduledExecutor().schedule({
|
||||
mWorkManager?.cancelAllWorkByTag(COMIC2_WORK_TAG)
|
||||
mWorkManager?.enqueueUniquePeriodicWork(
|
||||
COMIC2_WORK_TAG, ExistingPeriodicWorkPolicy.CANCEL_AND_REENQUEUE,
|
||||
PeriodicWorkRequestBuilder<DotaxGetter>(PrefLong.midTimePeriod.get(), TimeUnit.MINUTES)
|
||||
.addTag(COMIC2_WORK_TAG)
|
||||
.build())
|
||||
}, delay, TimeUnit.SECONDS)
|
||||
delay += defaultDelay
|
||||
Executors.newSingleThreadScheduledExecutor().schedule({
|
||||
mWorkManager?.cancelAllWorkByTag(ClienGetter.TAG)
|
||||
mWorkManager?.enqueueUniquePeriodicWork(
|
||||
ClienGetter.TAG, ExistingPeriodicWorkPolicy.CANCEL_AND_REENQUEUE,
|
||||
PeriodicWorkRequestBuilder<ClienGetter>(PrefLong.midTimePeriod.get(), TimeUnit.MINUTES)
|
||||
.addTag(ClienGetter.TAG)
|
||||
.build())
|
||||
}, delay, TimeUnit.SECONDS)
|
||||
delay += defaultDelay
|
||||
Executors.newSingleThreadScheduledExecutor().schedule({
|
||||
mWorkManager?.cancelAllWorkByTag(DCGetter.TAG)
|
||||
mWorkManager?.enqueueUniquePeriodicWork(
|
||||
DCGetter.TAG, ExistingPeriodicWorkPolicy.CANCEL_AND_REENQUEUE,
|
||||
PeriodicWorkRequestBuilder<DCGetter>(PrefLong.midTimePeriod.get(), TimeUnit.MINUTES)
|
||||
.addTag(DCGetter.TAG)
|
||||
.build())
|
||||
}, delay, TimeUnit.SECONDS)
|
||||
delay += defaultDelay
|
||||
Executors.newSingleThreadScheduledExecutor().schedule({
|
||||
mWorkManager?.cancelAllWorkByTag(RuliWebGetter.TAG)
|
||||
mWorkManager?.enqueueUniquePeriodicWork(
|
||||
RuliWebGetter.TAG, ExistingPeriodicWorkPolicy.CANCEL_AND_REENQUEUE,
|
||||
PeriodicWorkRequestBuilder<RuliWebGetter>(PrefLong.midTimePeriod.get(), TimeUnit.MINUTES)
|
||||
.addTag(RuliWebGetter.TAG)
|
||||
.build())
|
||||
}, delay, TimeUnit.SECONDS)
|
||||
delay += defaultDelay
|
||||
Executors.newSingleThreadScheduledExecutor().schedule({
|
||||
mWorkManager?.cancelAllWorkByTag(TheQooGetter.TAG)
|
||||
mWorkManager?.enqueueUniquePeriodicWork(
|
||||
TheQooGetter.TAG, ExistingPeriodicWorkPolicy.CANCEL_AND_REENQUEUE,
|
||||
PeriodicWorkRequestBuilder<TheQooGetter>(PrefLong.midTimePeriod.get(), TimeUnit.MINUTES)
|
||||
.addTag(TheQooGetter.TAG)
|
||||
.build())
|
||||
}, delay, TimeUnit.SECONDS)
|
||||
delay += defaultDelay
|
||||
Executors.newSingleThreadScheduledExecutor().schedule({
|
||||
mWorkManager?.cancelAllWorkByTag(ArcaGetter.TAG)
|
||||
mWorkManager?.enqueueUniquePeriodicWork(
|
||||
ArcaGetter.TAG, ExistingPeriodicWorkPolicy.CANCEL_AND_REENQUEUE,
|
||||
PeriodicWorkRequestBuilder<ArcaGetter>(PrefLong.midTimePeriod.get(), TimeUnit.MINUTES)
|
||||
.addTag(ArcaGetter.TAG)
|
||||
.build())
|
||||
mWorkManager?.cancelAllWork()
|
||||
mWorkManager?.cancelAllWorkByTag(RuliWebGetter.TAG)
|
||||
mWorkManager?.enqueueUniquePeriodicWork(
|
||||
RuliWebGetter.TAG, ExistingPeriodicWorkPolicy.CANCEL_AND_REENQUEUE,
|
||||
PeriodicWorkRequestBuilder<RuliWebGetter>(PrefLong.midTimePeriod.get(), TimeUnit.MINUTES)
|
||||
.addTag(RuliWebGetter.TAG)
|
||||
.build())
|
||||
|
||||
}, delay, TimeUnit.SECONDS)
|
||||
|
||||
delay += defaultDelay
|
||||
Executors.newSingleThreadScheduledExecutor().schedule({
|
||||
mWorkManager?.cancelAllWorkByTag(LocationGetter.TAG)
|
||||
mWorkManager?.enqueueUniquePeriodicWork(
|
||||
LocationGetter.TAG, ExistingPeriodicWorkPolicy.CANCEL_AND_REENQUEUE,
|
||||
PeriodicWorkRequestBuilder<LocationGetter>(PrefLong.locationTimePeriod.get(), TimeUnit.MINUTES)
|
||||
.addTag(LocationGetter.TAG)
|
||||
.build())
|
||||
|
||||
}, delay, TimeUnit.SECONDS)
|
||||
|
||||
mWorkManager?.cancelAllWorkByTag(FEDDS_WORK_TAG)
|
||||
mWorkManager?.enqueueUniquePeriodicWork(
|
||||
FEDDS_WORK_TAG, ExistingPeriodicWorkPolicy.CANCEL_AND_REENQUEUE,
|
||||
PeriodicWorkRequestBuilder<NewsFeedsGetter>(PrefLong.shortTimePeriod.get(), TimeUnit.MINUTES)
|
||||
.addTag(FEDDS_WORK_TAG)
|
||||
.build())
|
||||
mWorkManager?.cancelAllWorkByTag(YT_WORK_TAG)
|
||||
mWorkManager?.enqueueUniquePeriodicWork(
|
||||
YT_WORK_TAG, ExistingPeriodicWorkPolicy.CANCEL_AND_REENQUEUE,
|
||||
PeriodicWorkRequestBuilder<YoutubeGetter>(PrefLong.longTimePeriod.get(), TimeUnit.MINUTES)
|
||||
.addTag(YT_WORK_TAG)
|
||||
.build())
|
||||
mWorkManager?.cancelAllWorkByTag(REDDIT_WORK_TAG)
|
||||
mWorkManager?.enqueueUniquePeriodicWork(
|
||||
REDDIT_WORK_TAG, ExistingPeriodicWorkPolicy.CANCEL_AND_REENQUEUE,
|
||||
PeriodicWorkRequestBuilder<RedditGetter>(PrefLong.midTimePeriod.get(), TimeUnit.MINUTES)
|
||||
.addTag(REDDIT_WORK_TAG)
|
||||
.build())
|
||||
mWorkManager?.cancelAllWorkByTag(COMIC_WORK_TAG)
|
||||
mWorkManager?.enqueueUniquePeriodicWork(
|
||||
COMIC_WORK_TAG, ExistingPeriodicWorkPolicy.CANCEL_AND_REENQUEUE,
|
||||
PeriodicWorkRequestBuilder<FmKoreaGetter>(PrefLong.midTimePeriod.get(), TimeUnit.MINUTES)
|
||||
.addTag(COMIC_WORK_TAG)
|
||||
.build())
|
||||
mWorkManager?.cancelAllWorkByTag(COMIC2_WORK_TAG)
|
||||
mWorkManager?.enqueueUniquePeriodicWork(
|
||||
COMIC2_WORK_TAG, ExistingPeriodicWorkPolicy.CANCEL_AND_REENQUEUE,
|
||||
PeriodicWorkRequestBuilder<DotaxGetter>(PrefLong.midTimePeriod.get(), TimeUnit.MINUTES)
|
||||
.addTag(COMIC2_WORK_TAG)
|
||||
.build())
|
||||
mWorkManager?.cancelAllWorkByTag(ClienGetter.TAG)
|
||||
mWorkManager?.enqueueUniquePeriodicWork(
|
||||
ClienGetter.TAG, ExistingPeriodicWorkPolicy.CANCEL_AND_REENQUEUE,
|
||||
PeriodicWorkRequestBuilder<ClienGetter>(PrefLong.midTimePeriod.get(), TimeUnit.MINUTES)
|
||||
.addTag(ClienGetter.TAG)
|
||||
.build())
|
||||
mWorkManager?.cancelAllWorkByTag(DCGetter.TAG)
|
||||
mWorkManager?.enqueueUniquePeriodicWork(
|
||||
DCGetter.TAG, ExistingPeriodicWorkPolicy.CANCEL_AND_REENQUEUE,
|
||||
PeriodicWorkRequestBuilder<DCGetter>(PrefLong.midTimePeriod.get(), TimeUnit.MINUTES)
|
||||
.addTag(DCGetter.TAG)
|
||||
.build())
|
||||
mWorkManager?.cancelAllWorkByTag(TheQooGetter.TAG)
|
||||
mWorkManager?.enqueueUniquePeriodicWork(
|
||||
TheQooGetter.TAG, ExistingPeriodicWorkPolicy.CANCEL_AND_REENQUEUE,
|
||||
PeriodicWorkRequestBuilder<TheQooGetter>(PrefLong.midTimePeriod.get(), TimeUnit.MINUTES)
|
||||
.addTag(TheQooGetter.TAG)
|
||||
.build())
|
||||
mWorkManager?.cancelAllWorkByTag(ArcaGetter.TAG)
|
||||
mWorkManager?.enqueueUniquePeriodicWork(
|
||||
ArcaGetter.TAG, ExistingPeriodicWorkPolicy.CANCEL_AND_REENQUEUE,
|
||||
PeriodicWorkRequestBuilder<ArcaGetter>(PrefLong.midTimePeriod.get(), TimeUnit.MINUTES)
|
||||
.addTag(ArcaGetter.TAG)
|
||||
.build())
|
||||
mWorkManager?.cancelAllWorkByTag(LocationGetter.TAG)
|
||||
mWorkManager?.enqueueUniquePeriodicWork(
|
||||
LocationGetter.TAG, ExistingPeriodicWorkPolicy.CANCEL_AND_REENQUEUE,
|
||||
PeriodicWorkRequestBuilder<LocationGetter>(PrefLong.locationTimePeriod.get(), TimeUnit.MINUTES)
|
||||
.addTag(LocationGetter.TAG)
|
||||
.build())
|
||||
}
|
||||
|
||||
|
||||
@ -375,6 +334,13 @@ internal class LauncherActivity : CommonActivity() {
|
||||
}
|
||||
}
|
||||
}
|
||||
KEYCODE_BUTTON_B->{
|
||||
RssViewBuilder(lActivity!!)
|
||||
.setRssId("https://jav.guru")
|
||||
.webViewJavaScriptEnabled(true)
|
||||
.showIconClose(true).showIconBack(false).showProgressBar(true).backPressToClose(false).webViewMixedContentMode(1)
|
||||
.show("https://jav.guru")
|
||||
}
|
||||
KEYCODE_DPAD_DOWN->{
|
||||
|
||||
}
|
||||
@ -382,7 +348,7 @@ internal class LauncherActivity : CommonActivity() {
|
||||
|
||||
}
|
||||
KEYCODE_BUTTON_START->{
|
||||
onClickCenterButton()
|
||||
onClickCenterButton()
|
||||
}
|
||||
KEYCODE_BUTTON_SELECT->{
|
||||
WorkersDb.getRealm().apply {
|
||||
@ -417,12 +383,13 @@ internal class LauncherActivity : CommonActivity() {
|
||||
writeBlocking {
|
||||
var ddd = copyFromRealm(WorkersDb.getRssQuery("", RssDataType.getExcAdt(),false).limit(100).query("read == $0", 0).query("vote != $0", true).find()).map { it.originPage() }
|
||||
var origin = ddd.first()
|
||||
var jjjj = hashSetOf<String>()
|
||||
jjjj.addAll(ddd)
|
||||
RssViewBuilder(lActivity!!)
|
||||
.setRssList(arrayListOf<String>().apply {
|
||||
var jjjj = hashSetOf<String>()
|
||||
jjjj.addAll(ddd)
|
||||
this.addAll(jjjj) })
|
||||
this.addAll(jjjj)})
|
||||
.setRssId(origin)
|
||||
// .webViewDesktopMode(true)
|
||||
.showIconClose(true).showIconBack(false).showProgressBar(true).backPressToClose(false).webViewMixedContentMode(1)
|
||||
.show(origin)
|
||||
}
|
||||
@ -574,6 +541,7 @@ internal class LauncherActivity : CommonActivity() {
|
||||
@SuppressLint("NewApi", "MissingPermission")
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
installSplashScreen()
|
||||
|
||||
mWorkManager = WorkManager.getInstance(this)
|
||||
DynamicColors.applyToActivityIfAvailable(this)
|
||||
lActivity = this
|
||||
|
||||
@ -35,6 +35,7 @@ import android.view.inputmethod.InputMethodManager
|
||||
import androidx.core.widget.doOnTextChanged
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import bums.lunatic.launcher.BuildConfig
|
||||
import bums.lunatic.launcher.LauncherActivity
|
||||
import bums.lunatic.launcher.common.CommonActivity
|
||||
import bums.lunatic.launcher.common.letTrue
|
||||
import bums.lunatic.launcher.databinding.AppDrawerBinding
|
||||
@ -66,7 +67,7 @@ internal class AppDrawer : CommonActivity() {
|
||||
private var isKeyboardShowing: Boolean = false
|
||||
|
||||
companion object {
|
||||
lateinit var packageManager: PackageManager
|
||||
|
||||
private var appsAdapter: AppsAdapter? = null
|
||||
private var contactAdapter : ContactAdapter? = null
|
||||
private var packageList = mutableListOf<AppInfo>()
|
||||
@ -74,34 +75,14 @@ internal class AppDrawer : CommonActivity() {
|
||||
@JvmStatic var appNamesPrefs: SharedPreferences? = null
|
||||
|
||||
|
||||
fun appName(resolver: ResolveInfo): String {
|
||||
return resolver.loadLabel(packageManager).toString().apply {
|
||||
appNamesPrefs?.edit()?.putString(resolver.activityInfo.packageName, this)?.apply()
|
||||
}
|
||||
}
|
||||
|
||||
fun getCategory(category : Int) : String {
|
||||
return when(category) {
|
||||
ApplicationInfo.CATEGORY_UNDEFINED -> "UNDEFINED"
|
||||
ApplicationInfo.CATEGORY_GAME -> "GAME"
|
||||
ApplicationInfo.CATEGORY_AUDIO -> "AUDIO"
|
||||
ApplicationInfo.CATEGORY_VIDEO -> "VIDEO"
|
||||
ApplicationInfo.CATEGORY_IMAGE -> "IMAGE"
|
||||
ApplicationInfo.CATEGORY_SOCIAL -> "SOCIAL"
|
||||
ApplicationInfo.CATEGORY_NEWS -> "NEWS"
|
||||
ApplicationInfo.CATEGORY_MAPS -> "MAPS"
|
||||
ApplicationInfo.CATEGORY_PRODUCTIVITY -> "PRODUCTIVITY"
|
||||
ApplicationInfo.CATEGORY_ACCESSIBILITY -> "ACCESSIBILITY"
|
||||
else -> {"UNKNOWN"}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
fun getInputText() = binding.searchInput.text.toString()
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
// setStyle(STYLE_NO_TITLE, R.style.FilterFullScreenDialog)
|
||||
// packageManager = lActivity?.packageManager!!
|
||||
// packageManager
|
||||
// }
|
||||
|
||||
// override fun onAttach(context: Context) {
|
||||
@ -118,7 +99,7 @@ internal class AppDrawer : CommonActivity() {
|
||||
appNamesPrefs = this.getSharedPreferences(PREFS_APP_NAMES, 0)
|
||||
layoutType = settingsPrefs!!.getInt(KEY_APPS_LAYOUT, 0)
|
||||
|
||||
appsAdapter = AppsAdapter(layoutType, packageManager!!, supportFragmentManager, binding.appsCount)
|
||||
appsAdapter = AppsAdapter(packageManager!!, supportFragmentManager, binding.appsCount)
|
||||
contactAdapter = ContactAdapter(packageManager!!, supportFragmentManager)
|
||||
|
||||
binding.appsCount.visibility = if (settingsPrefs!!.getBoolean(KEY_APPS_COUNT, true)) VISIBLE else GONE
|
||||
@ -496,9 +477,3 @@ internal class AppDrawer : CommonActivity() {
|
||||
|
||||
}
|
||||
|
||||
fun normalize(str: String): String {
|
||||
val normalizedString =
|
||||
Normalizer.normalize(str.replace("\\W".toRegex(), ""), Normalizer.Form.NFC)
|
||||
val pattern = Pattern.compile("\\p{InCombiningDiacriticalMarks}+")
|
||||
return pattern.matcher(normalizedString).replaceAll("").toLowerCase()
|
||||
}
|
||||
@ -41,10 +41,9 @@ import kotlinx.coroutines.async
|
||||
|
||||
|
||||
internal class AppsAdapter(
|
||||
private val layoutType: Int,
|
||||
private val packageManager: PackageManager,
|
||||
private val fragmentManager: FragmentManager,
|
||||
private val appsCount: TextView) : RecyclerView.Adapter<AppsAdapter.AppsViewHolder>() {
|
||||
private val appsCount: TextView?) : RecyclerView.Adapter<AppsAdapter.AppsViewHolder>() {
|
||||
|
||||
private var oldList = mutableListOf<AppInfo>()
|
||||
// private var appGravity: Int = Gravity.CENTER
|
||||
@ -125,7 +124,7 @@ internal class AppsAdapter(
|
||||
oldList.clear()
|
||||
oldList.addAll(newList)
|
||||
newList.size.let {
|
||||
appsCount.text = it.toString()
|
||||
appsCount?.text = it.toString()
|
||||
appsSize = it
|
||||
}
|
||||
}
|
||||
|
||||
@ -134,7 +134,7 @@ class BluetoothManager {
|
||||
//블루투스 상태(켜짐 / 꺼짐 / 지원 불가 기기)
|
||||
fun blueToothState(): String {
|
||||
if (blueToothAdapter != null) {
|
||||
if (blueToothAdapter!!.isEnabled) {
|
||||
if (blueToothAdapter?.isEnabled == true) {
|
||||
return BLUETOOTH_STATE.ENABLED.statestr
|
||||
} else {
|
||||
return BLUETOOTH_STATE.DISABLED.statestr
|
||||
@ -167,7 +167,6 @@ class BluetoothManager {
|
||||
val action = intent!!.action
|
||||
if (context == null) return
|
||||
if (ActivityCompat.checkSelfPermission(context!!, Manifest.permission.BLUETOOTH_CONNECT) != PackageManager.PERMISSION_GRANTED) return
|
||||
val device: BluetoothDevice = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE)!!
|
||||
getPairedDevices()
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@ package bums.lunatic.launcher.helpers
|
||||
|
||||
import android.content.SharedPreferences
|
||||
import bums.lunatic.launcher.model.RssDataType
|
||||
import bums.lunatic.launcher.utils.Blog
|
||||
import kr.lunaticbum.utils.preferences.PrefJsonConvert
|
||||
import kr.lunaticbum.utils.preferences.PrefKey
|
||||
import kr.lunaticbum.utils.preferences.PreferencesHelper
|
||||
@ -30,7 +31,13 @@ enum class PrefLong(val def : Long) : PrefKey<Long> {
|
||||
midTimePeriod(30L),
|
||||
maxQueryCount(18L);
|
||||
override fun set(value : Long) { PrefHelper.putLong(this.name, value) }
|
||||
override fun get(def : Long?) : Long = PrefHelper.getLong(this.name, def as? Long ?: this.def) ?: 0L
|
||||
override fun get(def : Long?) : Long {
|
||||
val value = PrefHelper.getLong(this.name, def ?: this.def) ?: this.def
|
||||
|
||||
// Blog.LOGE("$name : $value")
|
||||
|
||||
return value
|
||||
}
|
||||
override fun getKey() = this.name
|
||||
}
|
||||
|
||||
@ -97,7 +104,7 @@ object PrefHelper : PreferencesHelper() {
|
||||
fun getBoolean(key: String, def: Boolean) = get(getBooleanPrefix().plus(key), def)
|
||||
fun putBoolean(key: String, value: Boolean) = put(getBooleanPrefix().plus(key), value)
|
||||
fun getLong(key: String, def: Long) = get(getLongPrefix().plus(key), def)
|
||||
fun putLong(key: String, value: Long) = put(getBooleanPrefix().plus(key), value)
|
||||
fun putLong(key: String, value: Long) = put(getLongPrefix().plus(key), value)
|
||||
fun getString(key: String, def: String) = get(getStringPrefix().plus(key), def)
|
||||
fun putString(key: String, value: String) = put(getStringPrefix().plus(key), value)
|
||||
|
||||
|
||||
@ -53,6 +53,7 @@ import androidx.recyclerview.widget.RecyclerView
|
||||
import androidx.viewpager2.widget.ViewPager2
|
||||
import bums.lunatic.launcher.LauncherActivity.Companion.lActivity
|
||||
import bums.lunatic.launcher.R
|
||||
import bums.lunatic.launcher.apps.AppsAdapter
|
||||
import bums.lunatic.launcher.behavior.Behavior
|
||||
import bums.lunatic.launcher.common.letTrue
|
||||
import bums.lunatic.launcher.databinding.LauncherHomeBinding
|
||||
@ -70,6 +71,7 @@ import bums.lunatic.launcher.home.adapters.SwipeToDeleteCallback
|
||||
import bums.lunatic.launcher.home.adapters.WeatherAdapter
|
||||
import bums.lunatic.launcher.home.adapters.WeatherDressAdatper
|
||||
import bums.lunatic.launcher.home.adapters.WeatherHourlyAdapter
|
||||
import bums.lunatic.launcher.model.AppInfo
|
||||
import bums.lunatic.launcher.model.CurrentPlayItem
|
||||
import bums.lunatic.launcher.model.Hour
|
||||
import bums.lunatic.launcher.model.NotificationItem
|
||||
@ -103,6 +105,8 @@ import io.realm.kotlin.query.Sort
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.Job
|
||||
import kotlinx.coroutines.flow.cancellable
|
||||
import kotlinx.coroutines.flow.collect
|
||||
import kotlinx.coroutines.launch
|
||||
import org.json.JSONArray
|
||||
import org.json.JSONObject
|
||||
@ -158,6 +162,7 @@ internal class LauncherHome : Fragment() {
|
||||
lateinit var mSmsLogsAdapter: SmsLogsAdapter
|
||||
lateinit var mRssAdapter: RssItemAdapter
|
||||
lateinit var mNotiAdapter: NotificationItemAdapter
|
||||
lateinit var mAppsAdapter: AppsAdapter
|
||||
var mWeatherAdapter: WeatherAdapter? = null
|
||||
var weatherDressAdapter: WeatherDressAdatper? = null
|
||||
var weatherHourlyAdapter: WeatherHourlyAdapter? = null
|
||||
@ -182,6 +187,7 @@ internal class LauncherHome : Fragment() {
|
||||
mRecentCallsAdapter = RecentCallsAdapter(arrayListOf(), requireContext())
|
||||
mSmsLogsAdapter = SmsLogsAdapter(arrayListOf(), requireContext())
|
||||
mNotiAdapter = NotificationItemAdapter(requireContext())
|
||||
mAppsAdapter = AppsAdapter(requireContext().packageManager , fragManager, null)
|
||||
mRssAdapter = RssItemAdapter(requireContext())
|
||||
|
||||
weatherDressAdapter = WeatherDressAdatper(arrayListOf())
|
||||
@ -212,6 +218,7 @@ internal class LauncherHome : Fragment() {
|
||||
binding.smsList.adapter = mSmsLogsAdapter
|
||||
binding.infoList.adapter = mRssAdapter
|
||||
binding.notiList.adapter = mNotiAdapter
|
||||
binding.appsList.adapter = mAppsAdapter
|
||||
binding.weathers.weatherViewPager.adapter = mWeatherAdapter
|
||||
binding.weathers.weatherViewPager.registerOnPageChangeCallback(object :
|
||||
ViewPager2.OnPageChangeCallback() {
|
||||
@ -224,31 +231,14 @@ internal class LauncherHome : Fragment() {
|
||||
|
||||
})
|
||||
|
||||
// binding.favAppsGroup.setOnLongClickListener {
|
||||
// binding.otherCheck.isSelected = true
|
||||
// queryVotes()
|
||||
// true
|
||||
// }
|
||||
// binding.favAppsGroup.setOnClickListener {
|
||||
// if (binding.otherCheck.isSelected) {
|
||||
// searchData()
|
||||
// }
|
||||
//// else if (binding.otherCheck.isSelected) {
|
||||
//// searchData()
|
||||
//// }
|
||||
//// else if (binding.otherCheck.isSelected) {
|
||||
//// searchData()
|
||||
//// }
|
||||
//// else if (binding.otherCheck.isSelected) {
|
||||
//// searchData()
|
||||
//// }
|
||||
//// else if (binding.otherCheck.isSelected) {
|
||||
//// searchData()
|
||||
//// }
|
||||
// else {
|
||||
// QuickAccess().show(fragManager, BOTTOM_SHEET_TAG)
|
||||
// }
|
||||
// }
|
||||
binding.notice.setOnLongClickListener {
|
||||
RssViewBuilder(lActivity!!)
|
||||
.setRssId("https://jav.guru")
|
||||
.webViewJavaScriptEnabled(true)
|
||||
.showIconClose(true).showIconBack(false).showProgressBar(true).backPressToClose(false).webViewMixedContentMode(1)
|
||||
.show("https://jav.guru")
|
||||
true
|
||||
}
|
||||
|
||||
arrayListOf(binding.mainList,binding.smsList,binding.infoList,binding.notiList).forEach {
|
||||
try {
|
||||
@ -264,10 +254,26 @@ internal class LauncherHome : Fragment() {
|
||||
queryInfos()
|
||||
queryNotice()
|
||||
queryWeather()
|
||||
queryApps()
|
||||
setMusicFunction()
|
||||
return binding.root
|
||||
}
|
||||
|
||||
private fun queryApps() {
|
||||
WorkersDb.getRealm().apply {
|
||||
var newQ = query<AppInfo>()
|
||||
newQ.sort(Pair("clickCount", Sort.DESCENDING),Pair("lastUseDate",Sort.DESCENDING)).limit(30).find()?.let {
|
||||
if(it.size > 0) {
|
||||
WorkersDb.getRealm().apply {
|
||||
var packageList = arrayListOf<AppInfo>()
|
||||
packageList.addAll(copyFromRealm(it))
|
||||
mAppsAdapter?.updateData(packageList)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun setMusicFunction() {
|
||||
binding.currentMusic.setOnClickListener {
|
||||
lActivity?.apply {
|
||||
@ -484,8 +490,8 @@ internal class LauncherHome : Fragment() {
|
||||
try { System.gc() } catch (e: Exception) { e.printStackTrace() }
|
||||
}
|
||||
fun beforeQuery() {
|
||||
mRssDataResult = null
|
||||
clearJob(infosJob)
|
||||
mRssDataResult = null
|
||||
WorkersDb.getRealm().writeBlocking {
|
||||
delete(
|
||||
query<RssData>()
|
||||
@ -498,24 +504,28 @@ internal class LauncherHome : Fragment() {
|
||||
|
||||
fun updateQuery(q: RealmQuery<RssData>) {
|
||||
mRssDataResult = q.sort("pubDate ", Sort.DESCENDING).limit(300).distinct("title").find()
|
||||
infosJob = CoroutineScope(Dispatchers.Default).launch {
|
||||
mRssDataResult?.asFlow()?.collect { changes: ResultsChange<RssData> ->
|
||||
commandHandler.removeCallbacks(hideListView)
|
||||
commandHandler.removeCallbacks(infoUpdate)
|
||||
when (changes) {
|
||||
is InitialResults, is UpdatedResults -> {
|
||||
WorkersDb.getRealm().apply {
|
||||
lasted = copyFromRealm(changes.list)
|
||||
}
|
||||
commandHandler.postDelayed(infoUpdate, UPDATE_DELAY)
|
||||
mRssDataResult?.asFlow()?.let { flow ->
|
||||
infosJob = CoroutineScope(Dispatchers.IO).launch {
|
||||
flow.collect { changes: ResultsChange<RssData> ->
|
||||
commandHandler.removeCallbacks(hideListView)
|
||||
commandHandler.removeCallbacks(infoUpdate)
|
||||
// when (changes) {
|
||||
// is InitialResults, is UpdatedResults -> {
|
||||
WorkersDb.getRealm().apply {
|
||||
lasted = copyFromRealm(changes.list)
|
||||
}
|
||||
else -> {
|
||||
commandHandler.postDelayed(infoUpdate, UPDATE_DELAY)
|
||||
// }
|
||||
|
||||
}
|
||||
// else -> {
|
||||
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
infosJob?.start()
|
||||
}
|
||||
infosJob?.start()
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -589,8 +599,8 @@ internal class LauncherHome : Fragment() {
|
||||
var checkListner = object : View.OnClickListener {
|
||||
override fun onClick(v: View?) {
|
||||
commandHandler.removeCallbacks(hideListView)
|
||||
var views = arrayListOf(binding.mainList, binding.smsList, binding.infoList, binding.notiList)
|
||||
var chechboxs = arrayListOf(binding.missedCalls, binding.recentSms, binding.otherCheck, binding.notice)
|
||||
var views = arrayListOf(binding.mainList, binding.smsList, binding.infoList, binding.notiList,binding.appsList)
|
||||
var chechboxs = arrayListOf(binding.missedCalls, binding.recentSms, binding.otherCheck, binding.notice, binding.favApps)
|
||||
chechboxs.remove(v)
|
||||
when (v) {
|
||||
binding.missedCalls -> {
|
||||
@ -635,6 +645,15 @@ internal class LauncherHome : Fragment() {
|
||||
binding.notiList.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
binding.favApps -> {
|
||||
if (binding.favApps.isSelected) {
|
||||
binding.favApps.isSelected = false
|
||||
} else {
|
||||
binding.favApps.isSelected = true
|
||||
views.remove(binding.appsList)
|
||||
binding.appsList.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
}
|
||||
chechboxs.forEach { it.isSelected = false }
|
||||
views.forEach { it.visibility = View.GONE }
|
||||
@ -646,6 +665,7 @@ internal class LauncherHome : Fragment() {
|
||||
binding.recentSms.setOnClickListener(checkListner)
|
||||
binding.missedCalls.setOnClickListener(checkListner)
|
||||
binding.notice.setOnClickListener(checkListner)
|
||||
binding.favApps.setOnClickListener(checkListner)
|
||||
binding.otherCheck.setOnLongClickListener {
|
||||
queryInfos()
|
||||
true
|
||||
@ -740,6 +760,12 @@ internal class LauncherHome : Fragment() {
|
||||
|
||||
fun chooseAdpater() {
|
||||
commandHandler.removeCallbacks(hideListView)
|
||||
var tabs = arrayOf(binding.missedCalls,binding.recentSms,binding.otherCheck,binding.notice,binding.favApps)
|
||||
fun unsel(view: View) {
|
||||
tabs.filter {
|
||||
it.equals(view) == false
|
||||
}.forEach { it.isSelected = false }
|
||||
}
|
||||
binding.mainList.visibility = View.INVISIBLE
|
||||
binding.smsList.visibility = View.INVISIBLE
|
||||
binding.infoList.visibility = View.INVISIBLE
|
||||
@ -754,9 +780,6 @@ internal class LauncherHome : Fragment() {
|
||||
binding.missedCalls.text = "통화 목록 [${list.size}]"
|
||||
binding.mainList.visibility = View.VISIBLE
|
||||
mRecentCallsAdapter.updateData(list)
|
||||
binding.recentSms.isSelected = false
|
||||
binding.otherCheck.isSelected = false
|
||||
binding.notice.isSelected = false
|
||||
}
|
||||
} else if (binding.recentSms.isSelected) {
|
||||
WorkersDb.getRealm().apply {
|
||||
@ -768,28 +791,25 @@ internal class LauncherHome : Fragment() {
|
||||
binding.smsList.visibility = View.VISIBLE
|
||||
val list = copyFromRealm(result)
|
||||
mSmsLogsAdapter.updateData(list)
|
||||
binding.missedCalls.isSelected = false
|
||||
binding.otherCheck.isSelected = false
|
||||
binding.notice.isSelected = false
|
||||
|
||||
} catch (e: Exception) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (binding.otherCheck.isSelected) {
|
||||
binding.missedCalls.isSelected = false
|
||||
binding.recentSms.isSelected = false
|
||||
binding.notice.isSelected = false
|
||||
unsel(binding.otherCheck)
|
||||
binding.infoList.visibility = View.VISIBLE
|
||||
binding.otherCheck.text = "글타래 [${lasted?.size ?: "-"}]"
|
||||
// binding.otherCheck.text = "글타래 [${lasted?.size ?: "-"}]"
|
||||
lasted?.let { mRssAdapter.updateData(it) }
|
||||
} else if (binding.notice.isSelected) {
|
||||
binding.missedCalls.isSelected = false
|
||||
binding.recentSms.isSelected = false
|
||||
binding.otherCheck.isSelected = false
|
||||
unsel(binding.notice)
|
||||
binding.notiList.visibility = View.VISIBLE
|
||||
binding.notice.text = "알림 [${lastedNoti?.size ?: "-"}]"
|
||||
// binding.notice.text = "알림 [${lastedNoti?.size ?: "-"}]"
|
||||
lastedNoti?.let { mNotiAdapter.updateData(it) }
|
||||
} else if (binding.favApps.isSelected) {
|
||||
unsel(binding.favApps)
|
||||
binding.appsList.visibility = View.VISIBLE
|
||||
}
|
||||
commandHandler.postDelayed(hideListView, hideListViewTime)
|
||||
}
|
||||
@ -810,16 +830,13 @@ internal class LauncherHome : Fragment() {
|
||||
} else {
|
||||
rss.read += nomoreShowCount
|
||||
}
|
||||
copyToRealm(rss, UpdatePolicy.ALL)
|
||||
// copyToRealm(rss, UpdatePolicy.ALL)
|
||||
query<RssData>("originPage == $0",rss.originPage).find().forEach { it ->
|
||||
it.read += nomoreShowCount
|
||||
}
|
||||
query<RssData>("chosung == $0",rss.chosung).find().forEach { it ->
|
||||
if (!rss.originPage().equals(it.originPage())) {
|
||||
if (rssStateVote() && rss.vote) {
|
||||
it.vote = false
|
||||
it.read = 0
|
||||
} else {
|
||||
it.read += nomoreShowCount
|
||||
}
|
||||
copyToRealm(it, UpdatePolicy.ALL)
|
||||
it.read += nomoreShowCount
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -831,11 +848,11 @@ internal class LauncherHome : Fragment() {
|
||||
rss.vote = true
|
||||
|
||||
}
|
||||
copyToRealm(rss,UpdatePolicy.ALL)
|
||||
// copyToRealm(rss,UpdatePolicy.ALL)
|
||||
}
|
||||
else ->{}
|
||||
}
|
||||
binding.infoList.post { mRssAdapter.refresh() }
|
||||
// binding.infoList.post { mRssAdapter.refresh() }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,6 +5,7 @@ import android.content.Intent
|
||||
import android.os.Environment
|
||||
import android.webkit.CookieManager
|
||||
import androidx.core.content.FileProvider
|
||||
import bums.lunatic.launcher.utils.CompressStringUtil
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.delay
|
||||
@ -66,34 +67,38 @@ class OfflineContents(val context: Context, val host : String, val cookie: Strin
|
||||
fun enofLoop() {
|
||||
if (onItEndof) return
|
||||
onItEndof = true
|
||||
LogUtil.e("on it enofLoop")
|
||||
urlPathMap.forEach { t, u ->
|
||||
val file = File(u)
|
||||
var contentsUriString = FileProvider.getUriForFile(
|
||||
context,
|
||||
"${context.packageName}.fileprovider",
|
||||
file
|
||||
).toString()
|
||||
LogUtil.e("on it enofLoop before compressString ${htmlString.length}")
|
||||
|
||||
var targetString = t
|
||||
var targetIdx = htmlString.indexOf(targetString)
|
||||
if (targetIdx > 0) {
|
||||
htmlString?.replace(
|
||||
targetIdx,
|
||||
targetIdx.plus(targetString.length),
|
||||
contentsUriString
|
||||
)
|
||||
}
|
||||
targetString = t.replace("&", "&")
|
||||
targetIdx = htmlString.indexOf(targetString)
|
||||
if (targetIdx > 0) {
|
||||
htmlString?.replace(
|
||||
targetIdx,
|
||||
targetIdx.plus(targetString.length),
|
||||
contentsUriString
|
||||
)
|
||||
}
|
||||
CompressStringUtil.compressString(htmlString.toString())?.apply {
|
||||
LogUtil.e("on it enofLoop 2 compressed String ${this.length}")
|
||||
}
|
||||
// urlPathMap.forEach { t, u ->
|
||||
// val file = File(u)
|
||||
// var contentsUriString = FileProvider.getUriForFile(
|
||||
// context,
|
||||
// "${context.packageName}.fileprovider",
|
||||
// file
|
||||
// ).toString()
|
||||
//
|
||||
// var targetString = t
|
||||
// var targetIdx = htmlString.indexOf(targetString)
|
||||
// if (targetIdx > 0) {
|
||||
// htmlString?.replace(
|
||||
// targetIdx,
|
||||
// targetIdx.plus(targetString.length),
|
||||
// contentsUriString
|
||||
// )
|
||||
// }
|
||||
// targetString = t.replace("&", "&")
|
||||
// targetIdx = htmlString.indexOf(targetString)
|
||||
// if (targetIdx > 0) {
|
||||
// htmlString?.replace(
|
||||
// targetIdx,
|
||||
// targetIdx.plus(targetString.length),
|
||||
// contentsUriString
|
||||
// )
|
||||
// }
|
||||
// }
|
||||
|
||||
if (autoCheck) {
|
||||
LogUtil.e("on it enofLoop autoCheck ${autoCheck}")
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
package bums.lunatic.launcher.home
|
||||
|
||||
import android.content.ClipData
|
||||
import android.content.ClipboardManager
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.os.Environment
|
||||
import android.print.PDFPrint
|
||||
import android.util.Base64
|
||||
import android.view.KeyEvent
|
||||
@ -23,39 +24,34 @@ import android.view.MotionEvent.ACTION_MOVE
|
||||
import android.view.View
|
||||
import android.webkit.CookieManager
|
||||
import android.webkit.CookieSyncManager
|
||||
import android.webkit.JavascriptInterface
|
||||
import android.webkit.ValueCallback
|
||||
import android.widget.Toast
|
||||
import androidx.core.content.FileProvider
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.core.net.toUri
|
||||
import androidx.core.view.postDelayed
|
||||
import bums.lunatic.launcher.model.CiliMagnet
|
||||
import bums.lunatic.launcher.model.RssData
|
||||
import bums.lunatic.launcher.utils.Blog
|
||||
import bums.lunatic.launcher.workers.WorkersDb
|
||||
import io.realm.kotlin.ext.query
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.launch
|
||||
import kr.lunaticbum.awesomewebview.AwesomeWebView
|
||||
import kr.lunaticbum.awesomewebview.AwesomeWebViewActivity
|
||||
import kr.lunaticbum.awesomewebview.helpers.DownPicUtil
|
||||
import kr.lunaticbum.awesomewebview.helpers.DownPicUtil.DownFinishListener
|
||||
import kr.lunaticbum.awesomewebview.listeners.BroadCastManager
|
||||
import kr.lunaticbum.utils.content.ContextUtil
|
||||
import kr.lunaticbum.utils.log.LogUtil
|
||||
import org.jsoup.Jsoup
|
||||
import org.jsoup.UnsupportedMimeTypeException
|
||||
import java.io.BufferedWriter
|
||||
import java.io.ByteArrayOutputStream
|
||||
import java.io.File
|
||||
import java.io.FileInputStream
|
||||
import java.io.FileWriter
|
||||
import java.io.IOException
|
||||
import java.io.InputStream
|
||||
import java.lang.Thread.sleep
|
||||
import java.net.URL
|
||||
import java.net.URLEncoder
|
||||
import java.nio.charset.Charset
|
||||
import java.security.MessageDigest
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Date
|
||||
import java.util.concurrent.Executors
|
||||
import java.util.concurrent.TimeUnit
|
||||
import kotlin.text.Charsets.UTF_8
|
||||
@ -93,7 +89,7 @@ class RssViewerActivity : AwesomeWebViewActivity(), View.OnGenericMotionListene
|
||||
var actionButtonPressX = 0f
|
||||
var actionButtonPressY = 0f
|
||||
var rssId : String = ""
|
||||
var currentIdx = 0
|
||||
// var currentIdx = 0
|
||||
var double = false
|
||||
var rssList: MutableList<String> = ArrayList()
|
||||
|
||||
@ -108,6 +104,7 @@ class RssViewerActivity : AwesomeWebViewActivity(), View.OnGenericMotionListene
|
||||
} else {
|
||||
loadWithIntent = false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
@ -131,7 +128,7 @@ class RssViewerActivity : AwesomeWebViewActivity(), View.OnGenericMotionListene
|
||||
if(ev.action == ACTION_MOVE && ev.x != ev.y) {
|
||||
val correctTime = (ev.eventTime - lasteventTime) > 2
|
||||
if (correctTime) {
|
||||
Blog.LOGE("onGenericMotionEvent webviews ${p0} ev?.device?.name >>> ${ev?.device?.name} >> ${ev}")
|
||||
// Blog.LOGE("onGenericMotionEvent webviews ${p0} ev?.device?.name >>> ${ev?.device?.name} >> ${ev}")
|
||||
if (ev.x <= -1.0f) {
|
||||
leftClick()
|
||||
} else if (ev.x >= 1.0f) {
|
||||
@ -154,15 +151,15 @@ class RssViewerActivity : AwesomeWebViewActivity(), View.OnGenericMotionListene
|
||||
override fun onGenericMotionEvent(ev: MotionEvent?): Boolean {
|
||||
|
||||
if (ev?.device?.name?.contains("SM-031N Mouse") == true) {
|
||||
Blog.LOGE("onGenericMotionEvent ev?.device?.name >>> ${ev?.device?.name} >> ${ev}")
|
||||
// Blog.LOGE("onGenericMotionEvent ev?.device?.name >>> ${ev?.device?.name} >> ${ev}")
|
||||
return true
|
||||
}
|
||||
return super.onGenericMotionEvent(ev)
|
||||
}
|
||||
override fun dispatchKeyEvent(ev: KeyEvent): Boolean {
|
||||
Blog.LOGE("dispatch ev?.device?.name >>> ${ev?.device?.name}")
|
||||
// Blog.LOGE("dispatch ev?.device?.name >>> ${ev?.device?.name}")
|
||||
if (ev?.device?.name?.contains("SM-031N Mouse") == true) {
|
||||
Blog.LOGE("onGenericMotionEvent ev?.device?.name >>> ${ev?.device?.name} >> ${ev}")
|
||||
// Blog.LOGE("onGenericMotionEvent ev?.device?.name >>> ${ev?.device?.name} >> ${ev}")
|
||||
when(ev.action) {
|
||||
ACTION_UP -> {
|
||||
when(ev.keyCode) {
|
||||
@ -229,16 +226,9 @@ class RssViewerActivity : AwesomeWebViewActivity(), View.OnGenericMotionListene
|
||||
}
|
||||
|
||||
fun doNextPage() {
|
||||
rssList.remove(rssId)
|
||||
if (currentIdx < rssList.size - 1) {
|
||||
currentIdx += 1
|
||||
rssId = rssList.get(currentIdx)
|
||||
Blog.LOGE("Arrow Right Click ${currentIdx} ${rssId}")
|
||||
load(rssId)
|
||||
} else if (currentIdx > 0) {
|
||||
currentIdx -= 1
|
||||
rssId = rssList.get(currentIdx)
|
||||
Blog.LOGE("Arrow Left Click ${currentIdx} ${rssId}")
|
||||
rssList.removeAll { it.equals(rssId) }
|
||||
if (rssList.size > 0) {
|
||||
rssId = rssList.removeAt(0)
|
||||
load(rssId)
|
||||
} else {
|
||||
Toast.makeText(this, "없어 끄자", Toast.LENGTH_LONG).show()
|
||||
@ -379,26 +369,33 @@ class RssViewerActivity : AwesomeWebViewActivity(), View.OnGenericMotionListene
|
||||
Blog.LOGE("Arrow Up Click")
|
||||
registCancelSearch()
|
||||
}
|
||||
|
||||
protected fun load(newUrl: String) {
|
||||
LogUtil.e("newUrl >>> ${newUrl}")
|
||||
newUrl.toUri().host?.let {
|
||||
val splits = it.replace("http://","").replace("https://","").split(".")
|
||||
when(splits.size) {
|
||||
1-> host = splits[0]
|
||||
2-> host = splits[0]
|
||||
3-> host = splits[1]
|
||||
4-> host = splits[2]
|
||||
else -> {
|
||||
host = null
|
||||
newUrl?.let { it ->
|
||||
var url = if(it.startsWith("http://")) {
|
||||
"https://${it.replace("http://","")}"
|
||||
} else it
|
||||
// LogUtil.e("newUrl >>> ${url}")
|
||||
url.toUri().host?.let {
|
||||
val splits = it.replace("http://","").replace("https://","").split(".")
|
||||
when(splits.size) {
|
||||
1-> host = splits[0]
|
||||
2-> host = splits[0]
|
||||
3-> host = splits[1]
|
||||
4-> host = splits[2]
|
||||
else -> {
|
||||
host = null
|
||||
}
|
||||
}
|
||||
}
|
||||
if (extraHeaders == null) {
|
||||
webView!!.loadUrl(url)
|
||||
} else {
|
||||
webView!!.loadUrl(url, extraHeaders!!)
|
||||
}
|
||||
registCancelSearch()
|
||||
}
|
||||
if (extraHeaders == null) {
|
||||
webView!!.loadUrl(newUrl!!)
|
||||
} else {
|
||||
webView!!.loadUrl(newUrl!!, extraHeaders!!)
|
||||
}
|
||||
registCancelSearch()
|
||||
|
||||
}
|
||||
|
||||
override fun initializeOptions() {
|
||||
@ -410,10 +407,15 @@ class RssViewerActivity : AwesomeWebViewActivity(), View.OnGenericMotionListene
|
||||
builder?.rssList?.let { this.rssList.addAll(it) }
|
||||
|
||||
Blog.LOGE("this.rssList >>>> ${this.rssList}")
|
||||
this.rssList.forEachIndexed { index, s ->
|
||||
if (s.equals(rssId)) {
|
||||
currentIdx = index
|
||||
return@forEachIndexed}
|
||||
}
|
||||
|
||||
override fun bindViews() {
|
||||
super.bindViews()
|
||||
if (this.rssId.contains(".guru")) {
|
||||
Blog.LOGE("this.webView >>>> ${this.rssId}")
|
||||
Blog.LOGE("this.webView >>>> ${this.webView}")
|
||||
webView?.alpha = 0.2f
|
||||
webView?.addJavascriptInterface(gji, "GJI")
|
||||
}
|
||||
}
|
||||
|
||||
@ -470,6 +472,126 @@ class RssViewerActivity : AwesomeWebViewActivity(), View.OnGenericMotionListene
|
||||
}
|
||||
}
|
||||
|
||||
override fun onTrimMemory(level: Int) {
|
||||
LogUtil.e("onTrimMemory >>> ${level} current ${url} current ${webView?.url ?: ""}")
|
||||
super.onTrimMemory(level)
|
||||
|
||||
}
|
||||
fun showDi(code : String, items : ArrayList<String>, links : ArrayList<String>) {
|
||||
runOnUiThread {
|
||||
registCancelSearch()
|
||||
hideBlock()
|
||||
val builder = AlertDialog.Builder(this@RssViewerActivity)
|
||||
builder.setTitle("code : ${code}")
|
||||
builder?.setItems(
|
||||
items.toTypedArray()
|
||||
) { dialog, which ->
|
||||
LogUtil.e("hitTestResult.extra >>> ${dialog} ,${which}")
|
||||
links?.get(which)?.let { link ->
|
||||
(this.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager)?.let { mng ->
|
||||
Blog.LOGE("link >>> ${link}")
|
||||
mng.clearPrimaryClip()
|
||||
mng.addPrimaryClipChangedListener {
|
||||
mng.primaryClip?.getItemAt(0)?.text?.let {
|
||||
if (it.length > 0 && it.startsWith("magnet:?xt=urn:")) {
|
||||
Blog.LOGE("magnet >>>> $it")
|
||||
try {
|
||||
val launchIntent =
|
||||
packageManager.getLaunchIntentForPackage("com.pikcloud.pikpak")
|
||||
launchIntent?.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS)
|
||||
startActivity(launchIntent)
|
||||
}catch (e:Exception) {e.printStackTrace()}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
mng.setPrimaryClip(ClipData.newPlainText("",link))
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
val dialog = builder?.create()
|
||||
dialog?.show()
|
||||
}
|
||||
}
|
||||
val gji = GJInterface(this)
|
||||
inner class GJInterface(val context: Context) {
|
||||
@JavascriptInterface
|
||||
fun onResult(result : String?) {
|
||||
registCancelSearch()
|
||||
result.toString()?.replace("\\u003C","<")?.replace("\\"","")?.let {
|
||||
Jsoup.parse(it)?.let { guru ->
|
||||
Blog.LOGE("guru >>> ${guru.title()} ")
|
||||
guru.getElementsByClass("row")?.forEach { row ->
|
||||
row.getElementsByClass("grid1").first().getElementsByTag("a")?.first()?.attr("title")?.let { title ->
|
||||
Blog.LOGE("row >>> ${title.split("]")?.first()?.replace("[","")}")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@JavascriptInterface
|
||||
fun onCode(code : String) {
|
||||
Blog.LOGE("onCode ${code}")
|
||||
registCancelSearch()
|
||||
CoroutineScope(Dispatchers.IO).launch {
|
||||
var temp = arrayListOf<CiliMagnet>()
|
||||
Jsoup.connect("https://cili.site/search?q=${URLEncoder.encode(code, Charset.defaultCharset().name())}").get().let { cili ->
|
||||
|
||||
cili.getElementsByTag("tr").forEach { cili_tr ->
|
||||
CiliMagnet().let { ciliMgn ->
|
||||
ciliMgn.link = if(cili_tr.getElementsByTag("a").size > 0)cili_tr.getElementsByTag("a").get(0).attr("href") else ""
|
||||
ciliMgn.title = if(cili_tr.getElementsByTag("p").size > 0)cili_tr.getElementsByTag("p").text() else ""
|
||||
ciliMgn.size = if(cili_tr.getElementsByClass("td-size").size > 0)cili_tr.getElementsByClass("td-size").text() else ""
|
||||
Blog.LOGE("ciliMgn.size >>>> ${ciliMgn.size}")
|
||||
Blog.LOGE("ciliMgn.size >>>> ${ciliMgn.title}")
|
||||
if(ciliMgn.isValid() && temp.size < 8 ) {
|
||||
try {
|
||||
Jsoup.connect(ciliMgn.getMagnetPageLink()).get()
|
||||
.let { mgn_Page ->
|
||||
if (mgn_Page.getElementsByClass("input-group magnet-box").size > 0) {
|
||||
mgn_Page.getElementsByClass("input-group magnet-box")
|
||||
.get(0)?.let { magnet_box ->
|
||||
magnet_box.getElementById(
|
||||
"input-magnet"
|
||||
)?.let { input_magnet ->
|
||||
Blog.LOGE("input_magnet >>> ${input_magnet}")
|
||||
ciliMgn.magnetLink =
|
||||
input_magnet.attr("value")
|
||||
.replace("&", "&")
|
||||
}
|
||||
}
|
||||
}
|
||||
}.apply {
|
||||
temp.add(ciliMgn)
|
||||
|
||||
}
|
||||
}catch (e:Exception) {}
|
||||
}
|
||||
}
|
||||
if(temp.size > 3) {
|
||||
return@forEach
|
||||
}
|
||||
}.apply {
|
||||
if (temp.size > 0) {
|
||||
showDi(
|
||||
code,
|
||||
temp.map {
|
||||
it.title.plus(" | ").plus(it.size).plus(" | ")
|
||||
} as ArrayList<String>, temp.map {
|
||||
it.magnetLink
|
||||
} as ArrayList<String>)
|
||||
}
|
||||
}
|
||||
}
|
||||
}.start()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onHtml(value: String?, autoCheck : Boolean) {
|
||||
chechHandler.removeCallbacks(cancelSearch)
|
||||
if (loadWithIntent){
|
||||
@ -528,52 +650,73 @@ class RssViewerActivity : AwesomeWebViewActivity(), View.OnGenericMotionListene
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
override fun webviewOnPageFinished() {
|
||||
double = false
|
||||
if(hasYoutubePlayer) {
|
||||
LogUtil.e("hasYoutubePlayer >>> ${hasYoutubePlayer}")
|
||||
}
|
||||
WorkersDb.getRealm().apply {
|
||||
writeBlocking {
|
||||
val result =
|
||||
query<RssData>().query("originPage == $0", rssId)
|
||||
.find()
|
||||
if (result.size == 1) {
|
||||
result.first().read += 1
|
||||
} else {
|
||||
if (rssId.contains(".guru")) {
|
||||
registCancelSearch()
|
||||
// webView?.scaleX = 0.2f
|
||||
// webView?.scaleY = 0.2f
|
||||
// webView?.post { webView?.addJavascriptInterface(gji,"GJI") }
|
||||
webView?.postDelayed(2000L,{
|
||||
webView?.evaluateJavascript("try{GJI.log();}catch(e){console.log(e);}", {})
|
||||
webView?.evaluateJavascript("try{GJI.onResult(document.documentElement.outerHTML);}catch(e){console.log(e);}", {})
|
||||
webView?.evaluateJavascript("document.getElementsByClassName('banner-ad-wrapper')[0].remove()",{})
|
||||
})
|
||||
} else {
|
||||
double = false
|
||||
registCancelSearch()
|
||||
if (hasYoutubePlayer) {
|
||||
LogUtil.e("hasYoutubePlayer >>> ${hasYoutubePlayer}")
|
||||
}
|
||||
WorkersDb.getRealm().apply {
|
||||
writeBlocking {
|
||||
val result =
|
||||
query<RssData>().query("originPage == $0", rssId)
|
||||
.find()
|
||||
// if (result.size == 1) {
|
||||
// result.first().read += 1
|
||||
// } else {
|
||||
result.forEach { it.read += 1 }
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
registCancelSearch()
|
||||
//<meta name="viewport" content="initial-scale=1.0">
|
||||
if (loadWithIntent) {
|
||||
webView?.evaluateJavascript(
|
||||
"try{document.querySelector('meta[name=viewport]').setAttribute('content','initial-scale=1.0')}catch(e){}",
|
||||
null
|
||||
)
|
||||
webView?.evaluateJavascript(
|
||||
"try{document.querySelector('meta[name=viewport]').setAttribute('content','initial-scale=1.0')}catch(e){}",
|
||||
null
|
||||
)
|
||||
webView?.settings?.useWideViewPort = true
|
||||
}
|
||||
if (webView?.url?.contains("dcinside") == true){
|
||||
webView?.evaluateJavascript("try{document.querySelector('#div_adnmore_area').hidden = true;}catch(e){}",null)
|
||||
} else if(webView?.url?.contains("fmkorea") == true) {
|
||||
if (loadWithIntent) {
|
||||
|
||||
} else {
|
||||
webView?.postDelayed({
|
||||
webView?.evaluateJavascript(
|
||||
"try{document.querySelector('.m_rd_nav_side').hidden = true;}catch(e){}",
|
||||
null
|
||||
)
|
||||
webView?.evaluateJavascript(
|
||||
"try{document.querySelector('[class*='bd bd_mobile ']').remove();}catch(e){}",
|
||||
null
|
||||
)
|
||||
}, 500L)
|
||||
//<meta name="viewport" content="initial-scale=1.0">
|
||||
if (loadWithIntent) {
|
||||
webView?.evaluateJavascript(
|
||||
"try{document.querySelector('meta[name=viewport]').setAttribute('content','initial-scale=1.0')}catch(e){}",
|
||||
null
|
||||
)
|
||||
webView?.evaluateJavascript(
|
||||
"try{document.querySelector('meta[name=viewport]').setAttribute('content','initial-scale=1.0')}catch(e){}",
|
||||
null
|
||||
)
|
||||
webView?.settings?.useWideViewPort = true
|
||||
}
|
||||
if (webView?.url?.contains("dcinside") == true) {
|
||||
webView?.evaluateJavascript(
|
||||
"try{document.querySelector('#div_adnmore_area').hidden = true;}catch(e){}",
|
||||
null
|
||||
)
|
||||
} else if (webView?.url?.contains("fmkorea") == true) {
|
||||
if (loadWithIntent) {
|
||||
|
||||
} else {
|
||||
webView?.postDelayed({
|
||||
webView?.evaluateJavascript(
|
||||
"try{document.querySelector('.m_rd_nav_side').hidden = true;}catch(e){}",
|
||||
null
|
||||
)
|
||||
webView?.evaluateJavascript(
|
||||
"try{document.querySelector('[class*='bd bd_mobile ']').remove();}catch(e){}",
|
||||
null
|
||||
)
|
||||
}, 500L)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -48,7 +48,6 @@ class WeatherHourlyAdapter(private val dataSet: ArrayList<Hour>): RecyclerView.A
|
||||
override fun getItemCount(): Int = dataSet.size
|
||||
|
||||
fun update(li: Collection<Hour>) {
|
||||
Blog.LOGE("${this.javaClass.simpleName} update")
|
||||
li.toList()
|
||||
this.dataSet.clear()
|
||||
this.dataSet.addAll(li)
|
||||
|
||||
@ -179,7 +179,7 @@ open class DcInside : RssDataInterface {
|
||||
dateTiemL = cal.timeInMillis
|
||||
dateTiemL
|
||||
} else {
|
||||
0L
|
||||
Date().time
|
||||
}
|
||||
} else {
|
||||
return dateTiemL
|
||||
@ -232,7 +232,7 @@ class RssData : RealmObject, RssDataInterface {
|
||||
}
|
||||
else -> title ?: ""
|
||||
}.apply {
|
||||
chosung = JamoUtils.split(this).joinToString("")
|
||||
chosung = JamoUtils.split(title).joinToString("")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,40 @@
|
||||
package bums.lunatic.launcher.model
|
||||
|
||||
import com.ibm.icu.util.ChineseCalendar
|
||||
import io.realm.kotlin.types.RealmObject
|
||||
import java.util.Calendar
|
||||
import java.util.Date
|
||||
|
||||
class UserActionModel: RealmObject {
|
||||
|
||||
var actionType: String = ""
|
||||
var timestamp: Date = Date()
|
||||
|
||||
var weekOfYear : Int = 0
|
||||
var weekOfMonth : Int = 0
|
||||
var dayOfWeek : Int = 0
|
||||
var dayOfYear : Int = 0
|
||||
var dayOfMonth : Int = 0
|
||||
var hourOfDay : Int = 0
|
||||
var month: Int = 0
|
||||
var lunMonth : Int = 0
|
||||
var lunDayOFMonth : Int = 0
|
||||
var lunDayOfYear : Int = 0
|
||||
|
||||
init {
|
||||
val cal = Calendar.getInstance()
|
||||
cal.time = timestamp
|
||||
weekOfYear = cal.get(Calendar.WEEK_OF_YEAR)
|
||||
weekOfMonth = cal.get(Calendar.WEEK_OF_MONTH)
|
||||
dayOfWeek = cal.get(Calendar.DAY_OF_WEEK)
|
||||
hourOfDay = cal.get(Calendar.HOUR_OF_DAY)
|
||||
month = cal.get(Calendar.MONTH)
|
||||
dayOfYear = cal.get(Calendar.DAY_OF_YEAR)
|
||||
dayOfMonth = cal.get(Calendar.DAY_OF_MONTH)
|
||||
var cinCal = ChineseCalendar()
|
||||
cinCal.time = timestamp
|
||||
lunMonth = cinCal.get(ChineseCalendar.MONTH)
|
||||
lunDayOFMonth = cinCal.get(ChineseCalendar.DAY_OF_MONTH)
|
||||
lunDayOfYear = cinCal.get(ChineseCalendar.DAY_OF_YEAR)
|
||||
}
|
||||
}
|
||||
@ -47,38 +47,43 @@ class NLService : NotificationListenerService() {
|
||||
// sbn.notification.extras.keySet().forEach {
|
||||
// BLog.LOGE("NLService********** keySet >> ${it} ${sbn.notification.extras.get(it)}")
|
||||
// }
|
||||
if (sbn.id != 0 && (sbn.packageName.contains(".") || sbn.packageName.contains("android")) && sbn.packageName.length > 0) {
|
||||
NotificationItem().apply {
|
||||
notiId = sbn.id
|
||||
pkgName = sbn.packageName
|
||||
title = sbn.notification?.extras?.getString("android.title") ?: ""
|
||||
subtext = sbn.notification?.extras?.getString("android.subText") ?: ""
|
||||
selfDisplayName = sbn.notification?.extras?.getString("android.selfDisplayName") ?: ""
|
||||
tikerMsg = sbn.notification?.tickerText?.toString() ?: ""
|
||||
postTime = sbn.postTime
|
||||
var uniq = title ?: subtext ?: selfDisplayName ?: tikerMsg ?: ""
|
||||
uniq_id = "${sbn.id}_${sbn.packageName}_${if (uniq.length > 3) uniq.substring(0,3) else uniq}"
|
||||
try {
|
||||
if (sbn.id != 0 && (sbn.packageName.contains(".") || sbn.packageName.contains("android")) && sbn.packageName.length > 0) {
|
||||
NotificationItem().apply {
|
||||
notiId = sbn.id
|
||||
pkgName = sbn.packageName
|
||||
title = sbn.notification?.extras?.getString("android.title") ?: ""
|
||||
subtext = sbn.notification?.extras?.getString("android.subText") ?: ""
|
||||
selfDisplayName = sbn.notification?.extras?.getString("android.selfDisplayName") ?: ""
|
||||
tikerMsg = sbn.notification?.tickerText?.toString() ?: ""
|
||||
postTime = sbn.postTime
|
||||
var uniq = title ?: subtext ?: selfDisplayName ?: tikerMsg ?: ""
|
||||
uniq_id = "${sbn.id}_${sbn.packageName}_${if (uniq.length > 3) uniq.substring(0,3) else uniq}"
|
||||
// BLog.LOGE("NLService********** enqueue TelegramBotGetter ${true == "bumssavor".equals(title)}")
|
||||
// BLog.LOGE("NLService********** enqueue TelegramBotGetter ${(true == "org.telegram.messenger".equals(pkgName))}")
|
||||
// BLog.LOGE("NLService********** enqueue TelegramBotGetter ${sbn.notification?.extras?.getString("android.text")?.startsWith("/") == true}")
|
||||
}.apply {
|
||||
if (skips.contains(pkgName)) {
|
||||
}.apply {
|
||||
if (skips.contains(pkgName)) {
|
||||
|
||||
} else {
|
||||
WorkersDb.insertNoti(this)
|
||||
} else {
|
||||
// WorkersDb.insertNoti(this)
|
||||
// BLog.LOGE("NLService********** onNotificationPosted ${Gson().toJson(this)}")
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (e : Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
if (sbn.packageName.contains("youtube")) {
|
||||
val m = getSystemService<MediaSessionManager>()!!
|
||||
val component = ComponentName(this, NLService::class.java)
|
||||
val sessions = m.getActiveSessions(component)
|
||||
sessions.forEach { session ->
|
||||
WorkersDb.getRealm().writeBlocking {
|
||||
Blog.LOGE("session.playbackState >>> ${session.playbackState}")
|
||||
// Blog.LOGE("session.playbackState >>> ${session.playbackState}")
|
||||
if (session.playbackState != null) {
|
||||
if (session.playbackState?.isActive == true && session.playbackState?.state?.equals(
|
||||
STATE_PLAYING
|
||||
@ -111,6 +116,8 @@ class NLService : NotificationListenerService() {
|
||||
}
|
||||
|
||||
}
|
||||
}}catch (e : Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
// val i = Intent("com.kpbird.nlsexample.NOTIFICATION_LISTENER_EXAMPLE")
|
||||
// i.putExtra("notification_event", "onNotificationPosted :" + sbn.packageName + "\n")
|
||||
@ -118,19 +125,19 @@ class NLService : NotificationListenerService() {
|
||||
}
|
||||
|
||||
override fun onNotificationRemoved(sbn: StatusBarNotification) {
|
||||
// BLog.LOGE("NLService********** onNOtificationRemoved")
|
||||
// BLog.LOGE("NLService ID :" + sbn.id + "\t" + sbn.notification.tickerText + "\t" + sbn.packageName)
|
||||
var uniq_id = "${sbn.id}_${sbn.packageName}"
|
||||
try {
|
||||
WorkersDb.getRealm()?.apply {
|
||||
this.writeBlocking {
|
||||
// delete(query<NotificationItem>().query("pkgName == $0", sbn.packageName).find())
|
||||
}
|
||||
}
|
||||
}catch (e : Exception){e.printStackTrace()}
|
||||
// val i = Intent("com.kpbird.nlsexample.NOTIFICATION_LISTENER_EXAMPLE")
|
||||
// i.putExtra("notification_event", "onNotificationRemoved :" + sbn.packageName + "\n")
|
||||
// sendBroadcast(i)
|
||||
//// BLog.LOGE("NLService********** onNOtificationRemoved")
|
||||
//// BLog.LOGE("NLService ID :" + sbn.id + "\t" + sbn.notification.tickerText + "\t" + sbn.packageName)
|
||||
// var uniq_id = "${sbn.id}_${sbn.packageName}"
|
||||
// try {
|
||||
// WorkersDb.getRealm()?.apply {
|
||||
// this.writeBlocking {
|
||||
//// delete(query<NotificationItem>().query("pkgName == $0", sbn.packageName).find())
|
||||
// }
|
||||
// }
|
||||
// }catch (e : Exception){e.printStackTrace()}
|
||||
//// val i = Intent("com.kpbird.nlsexample.NOTIFICATION_LISTENER_EXAMPLE")
|
||||
//// i.putExtra("notification_event", "onNotificationRemoved :" + sbn.packageName + "\n")
|
||||
//// sendBroadcast(i)
|
||||
}
|
||||
|
||||
internal inner class NLServiceReceiver : BroadcastReceiver() {
|
||||
|
||||
@ -30,6 +30,7 @@ import bums.lunatic.launcher.databinding.SettingsAppsBinding
|
||||
import bums.lunatic.launcher.helpers.PrefBoolean
|
||||
import bums.lunatic.launcher.helpers.PrefHelper
|
||||
import bums.lunatic.launcher.helpers.PrefLong
|
||||
import bums.lunatic.launcher.utils.Blog
|
||||
import com.google.android.material.bottomsheet.BottomSheetBehavior
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialog
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
|
||||
@ -132,16 +133,19 @@ internal class Apps : BottomSheetDialogFragment() {
|
||||
settingsChanged = true
|
||||
PrefLong.shortTimePeriod.set(value.toLong())
|
||||
binding.shortTimeTitle.text = getString(R.string.shortTimeTitle) +" [${value.toInt()}분 마다]"
|
||||
Blog.LOGE("binding.shortTimeTitle.text >>> ${binding.shortTimeTitle.text}")
|
||||
})
|
||||
binding.middleTime.addOnChangeListener(Slider.OnChangeListener { _, value, _ ->
|
||||
settingsChanged = true
|
||||
PrefLong.midTimePeriod.set(value.toLong())
|
||||
binding.middleTimeTitle.text = getString(R.string.middleTimeTitle) +" [${value.toInt()}분 마다]"
|
||||
Blog.LOGE("binding.shortTimeTitle.text >>> ${binding.middleTimeTitle.text}")
|
||||
})
|
||||
binding.longTime.addOnChangeListener(Slider.OnChangeListener { _, value, _ ->
|
||||
settingsChanged = true
|
||||
PrefLong.longTimePeriod.set(value.toLong())
|
||||
binding.longTimeTitle.text = getString(R.string.longTimeTitle) +" [${value.toInt()}]분 마다]"
|
||||
Blog.LOGE("binding.shortTimeTitle.text >>> ${binding.longTimeTitle.text}")
|
||||
})
|
||||
|
||||
binding.locationDistance.addOnChangeListener(Slider.OnChangeListener { _, value, _ ->
|
||||
|
||||
@ -0,0 +1,99 @@
|
||||
package bums.lunatic.launcher.utils
|
||||
|
||||
import java.io.ByteArrayInputStream
|
||||
import java.io.ByteArrayOutputStream
|
||||
import java.io.IOException
|
||||
import java.io.InputStream
|
||||
import java.io.OutputStream
|
||||
import java.io.UnsupportedEncodingException
|
||||
import java.util.zip.DeflaterOutputStream
|
||||
import java.util.zip.InflaterInputStream
|
||||
import kotlin.math.floor
|
||||
|
||||
|
||||
object CompressStringUtil {
|
||||
val charsetName: String = "UTF-8"
|
||||
|
||||
/**
|
||||
* String 객체를 압축하여 String 으로 리턴한다.
|
||||
* @param string
|
||||
* @return
|
||||
*/
|
||||
@Synchronized
|
||||
fun compressString(string: String): String? {
|
||||
return byteToString(compress(string))
|
||||
}
|
||||
|
||||
/**
|
||||
* 압축된 스트링을 복귀시켜서 String 으로 리턴한다.
|
||||
* @param compressed
|
||||
* @return
|
||||
*/
|
||||
@Synchronized
|
||||
fun decompressString(compressed: String?): String {
|
||||
return decompress(hexToByteArray(compressed))
|
||||
}
|
||||
|
||||
private fun byteToString(bytes: ByteArray?): String? {
|
||||
val sb = StringBuilder()
|
||||
try {
|
||||
for (b in bytes!!) {
|
||||
sb.append(String.format("%02X", b))
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
return null
|
||||
}
|
||||
|
||||
return sb.toString()
|
||||
}
|
||||
|
||||
private fun compress(text: String): ByteArray? {
|
||||
val baos = ByteArrayOutputStream()
|
||||
try {
|
||||
val out: OutputStream = DeflaterOutputStream(baos)
|
||||
out.write(text.toByteArray(charset(charsetName)))
|
||||
out.close()
|
||||
} catch (e: UnsupportedEncodingException) {
|
||||
e.printStackTrace()
|
||||
return null
|
||||
} catch (e: IOException) {
|
||||
e.printStackTrace()
|
||||
return null
|
||||
}
|
||||
return baos.toByteArray()
|
||||
}
|
||||
|
||||
|
||||
private fun decompress(bytes: ByteArray): String {
|
||||
val `in`: InputStream = InflaterInputStream(ByteArrayInputStream(bytes))
|
||||
val baos = ByteArrayOutputStream()
|
||||
try {
|
||||
val buffer = ByteArray(8192)
|
||||
var len: Int
|
||||
while ((`in`.read(buffer).also { len = it }) > 0) baos.write(buffer, 0, len)
|
||||
return String(baos.toByteArray(), charset(charsetName))
|
||||
} catch (e: IOException) {
|
||||
e.printStackTrace()
|
||||
throw AssertionError(e)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 16진 문자열을 byte 배열로 변환한다.
|
||||
*/
|
||||
private fun hexToByteArray(hex: String?): ByteArray {
|
||||
if (hex == null || hex.length % 2 != 0) {
|
||||
return byteArrayOf()
|
||||
}
|
||||
|
||||
val bytes = ByteArray(hex.length / 2)
|
||||
var i = 0
|
||||
while (i < hex.length) {
|
||||
val value = hex.substring(i, i + 2).toInt(16).toByte()
|
||||
bytes[floor((i / 2).toDouble()).toInt()] = value
|
||||
i += 2
|
||||
}
|
||||
return bytes
|
||||
}
|
||||
}
|
||||
@ -18,8 +18,8 @@ fun before30Min(date: Date): Long {
|
||||
fun beforeOneDay(): Long {
|
||||
val cal: Calendar = Calendar.getInstance()
|
||||
cal.setTime(Date())
|
||||
cal.add(Calendar.DAY_OF_YEAR, -1)
|
||||
cal.add(Calendar.HOUR_OF_DAY, -3)
|
||||
// cal.add(Calendar.DAY_OF_YEAR, -1)
|
||||
cal.add(Calendar.HOUR_OF_DAY, -4)
|
||||
return cal.timeInMillis
|
||||
}
|
||||
|
||||
|
||||
@ -2,19 +2,21 @@ package bums.lunatic.launcher.workers
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.pm.ApplicationInfo
|
||||
import android.content.pm.PackageManager
|
||||
import android.content.pm.ResolveInfo
|
||||
import android.os.Build
|
||||
import androidx.work.WorkerParameters
|
||||
import bums.lunatic.launcher.BuildConfig
|
||||
import bums.lunatic.launcher.LauncherActivity
|
||||
import bums.lunatic.launcher.LauncherActivity.Companion.lActivity
|
||||
import bums.lunatic.launcher.apps.AppDrawer.Companion.appName
|
||||
import bums.lunatic.launcher.apps.AppDrawer.Companion.getCategory
|
||||
import bums.lunatic.launcher.apps.normalize
|
||||
import bums.lunatic.launcher.apps.AppDrawer.Companion.appNamesPrefs
|
||||
import bums.lunatic.launcher.model.AppInfo
|
||||
import bums.lunatic.launcher.utils.AlphabetToChosungMap
|
||||
import bums.lunatic.launcher.utils.JamoUtils
|
||||
import io.realm.kotlin.ext.query
|
||||
import java.text.Normalizer
|
||||
import java.util.regex.Pattern
|
||||
|
||||
class AppInfoGetter : BaseGetter {
|
||||
companion object {
|
||||
@ -61,4 +63,32 @@ class AppInfoGetter : BaseGetter {
|
||||
} catch (e : Exception) {e.printStackTrace()}
|
||||
return Result.success()
|
||||
}
|
||||
}
|
||||
|
||||
fun appName(resolver: ResolveInfo): String {
|
||||
return resolver.loadLabel(lActivity?.packageManager!!).toString().apply {
|
||||
appNamesPrefs?.edit()?.putString(resolver.activityInfo.packageName, this)?.apply()
|
||||
}
|
||||
}
|
||||
|
||||
fun getCategory(category : Int) : String {
|
||||
return when(category) {
|
||||
ApplicationInfo.CATEGORY_UNDEFINED -> "UNDEFINED"
|
||||
ApplicationInfo.CATEGORY_GAME -> "GAME"
|
||||
ApplicationInfo.CATEGORY_AUDIO -> "AUDIO"
|
||||
ApplicationInfo.CATEGORY_VIDEO -> "VIDEO"
|
||||
ApplicationInfo.CATEGORY_IMAGE -> "IMAGE"
|
||||
ApplicationInfo.CATEGORY_SOCIAL -> "SOCIAL"
|
||||
ApplicationInfo.CATEGORY_NEWS -> "NEWS"
|
||||
ApplicationInfo.CATEGORY_MAPS -> "MAPS"
|
||||
ApplicationInfo.CATEGORY_PRODUCTIVITY -> "PRODUCTIVITY"
|
||||
ApplicationInfo.CATEGORY_ACCESSIBILITY -> "ACCESSIBILITY"
|
||||
else -> {"UNKNOWN"}
|
||||
}
|
||||
}
|
||||
fun normalize(str: String): String {
|
||||
val normalizedString =
|
||||
Normalizer.normalize(str.replace("\\W".toRegex(), ""), Normalizer.Form.NFC)
|
||||
val pattern = Pattern.compile("\\p{InCombiningDiacriticalMarks}+")
|
||||
return pattern.matcher(normalizedString).replaceAll("").toLowerCase()
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,13 +8,13 @@ import bums.lunatic.launcher.model.RssDataType
|
||||
import bums.lunatic.launcher.model.getRssData
|
||||
import bums.lunatic.launcher.model.getT
|
||||
import bums.lunatic.launcher.utils.beforeOneDay
|
||||
import bums.lunatic.launcher.workers.WorkersDb.blockKeyword
|
||||
//import bums.lunatic.launcher.workers.WorkersDb.blockKeyword
|
||||
import org.jsoup.Jsoup
|
||||
import org.jsoup.nodes.Element
|
||||
|
||||
class ArcaGetter : BaseGetter {
|
||||
companion object {
|
||||
val TAG = "DCGetter"
|
||||
val TAG = "ArcaGetter"
|
||||
}
|
||||
constructor(context: Context, workerParams: WorkerParameters) : super(context, workerParams) {
|
||||
|
||||
@ -73,7 +73,7 @@ class ArcaGetter : BaseGetter {
|
||||
var tumbnail = aracaLi.getElementsByTag("img").attr("src")
|
||||
var link = "https://arca.live".plus(if(aracaLi.getElementsByClass("title hybrid-title").size > 0) aracaLi.getElementsByClass("title hybrid-title").get(0).attr("href") else if(aracaLi.getElementsByTag("a").size > 0) aracaLi.getElementsByTag("a").get(0).attr("href") else "")
|
||||
if (title.length > 0 && link.length > 20) {
|
||||
if(blockKeyword.filter { desc.contains(it) }.size == 0) {
|
||||
// if(blockKeyword.filter { desc.contains(it) }.size == 0) {
|
||||
Arca().apply {
|
||||
this.link = link
|
||||
this.title = title
|
||||
@ -90,7 +90,7 @@ class ArcaGetter : BaseGetter {
|
||||
tempArray.add(this)
|
||||
}
|
||||
}
|
||||
}
|
||||
// }
|
||||
}
|
||||
return tempArray
|
||||
}
|
||||
|
||||
@ -0,0 +1,46 @@
|
||||
package bums.lunatic.launcher.workers
|
||||
|
||||
import android.Manifest
|
||||
import android.app.Service
|
||||
import android.content.Intent
|
||||
import android.media.AudioFormat
|
||||
import android.media.AudioManager
|
||||
import android.media.AudioRecord
|
||||
import android.media.MediaRecorder
|
||||
import android.os.IBinder
|
||||
import androidx.annotation.RequiresPermission
|
||||
|
||||
|
||||
|
||||
class AudioRecordService : Service() {
|
||||
override fun onBind(intent: Intent?): IBinder? {
|
||||
TODO("Not yet implemented")
|
||||
}
|
||||
|
||||
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
||||
return super.onStartCommand(intent, flags, startId)
|
||||
}
|
||||
|
||||
|
||||
var sampleRate: Int = 44100 // 샘플링 레이트 (Hz)
|
||||
var channelConfig: Int = AudioFormat.CHANNEL_IN_MONO // 채널 구성 (모노)
|
||||
var audioFormat: Int = AudioFormat.ENCODING_PCM_16BIT // 오디오 포맷 (16비트 PCM)
|
||||
var bufferSize: Int = AudioRecord.getMinBufferSize(sampleRate, channelConfig, audioFormat)
|
||||
|
||||
var recorder: AudioRecord? = null
|
||||
@RequiresPermission(Manifest.permission.RECORD_AUDIO)
|
||||
fun startAudioRec() {
|
||||
recorder = AudioRecord(
|
||||
MediaRecorder.AudioSource.MIC,
|
||||
sampleRate,
|
||||
channelConfig,
|
||||
audioFormat,
|
||||
bufferSize
|
||||
)
|
||||
|
||||
recorder?.registerAudioRecordingCallback({},object : AudioManager.AudioRecordingCallback() {
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
@ -2,13 +2,17 @@ package bums.lunatic.launcher.workers
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import androidx.core.net.toUri
|
||||
import androidx.work.WorkerParameters
|
||||
import bums.lunatic.launcher.helpers.PrefHelper
|
||||
import bums.lunatic.launcher.model.DcInside
|
||||
import bums.lunatic.launcher.model.RssData
|
||||
import bums.lunatic.launcher.model.RssDataInterface
|
||||
import bums.lunatic.launcher.model.RssDataType
|
||||
import bums.lunatic.launcher.model.getRssData
|
||||
import bums.lunatic.launcher.utils.Blog
|
||||
import org.jsoup.Jsoup
|
||||
import java.text.SimpleDateFormat
|
||||
|
||||
class DCGetter : BaseGetter {
|
||||
companion object {
|
||||
@ -20,6 +24,9 @@ class DCGetter : BaseGetter {
|
||||
fun parseDcLi(dc_li : org.jsoup.nodes.Element) : ArrayList<RssDataInterface>{
|
||||
var temp = arrayListOf<RssDataInterface>()
|
||||
if (dc_li.html().contains("<ul class=>") && dc_li.html().contains("con_list img")) {
|
||||
|
||||
}
|
||||
else if (dc_li.html().contains("<ul class=>") && dc_li.html().contains("con_list img")) {
|
||||
dc_li.child(0).getElementsByTag("li").forEach {
|
||||
parseDcLi(it)
|
||||
}
|
||||
@ -64,31 +71,94 @@ class DCGetter : BaseGetter {
|
||||
}
|
||||
return temp
|
||||
}
|
||||
|
||||
val df = SimpleDateFormat("yyyy-MM-dd HH:mm:ss")
|
||||
@SuppressLint("RestrictedApi")
|
||||
override fun realWork(): Result {
|
||||
// Blog.LOGE("${TAG} RssDataType.DCINSIDE.isOn >>>> ${PrefHelper.getBoolean(RssDataType.DCINSIDE.name,false)}")
|
||||
RssDataType.DCINSIDE.isOn {
|
||||
temp.clear()
|
||||
// https://m.dcinside.com/board/singlebungle1472
|
||||
var urls = arrayListOf(
|
||||
"https://m.dcinside.com",
|
||||
"https://m.dcinside.com/board/singlebungle1472",
|
||||
"https://m.dcinside.com/board/programming",
|
||||
"https://m.dcinside.com/board/cartoon",
|
||||
"https://m.dcinside.com/board/reading",
|
||||
"https://m.dcinside.com/board/chiangmai",
|
||||
"https://m.dcinside.com/board/hit",
|
||||
"https://m.dcinside.com/board/dcbest"
|
||||
)
|
||||
try {
|
||||
val testUrl2 = "https://www.dcinside.com/"
|
||||
Jsoup.connect(testUrl2)
|
||||
.userAgent(USAGT)
|
||||
.get().let { dc ->
|
||||
// BLog.LOGE("test ${testUrl2} >> ${this}")
|
||||
dc.getElementsByTag("li").forEach { dc_li ->
|
||||
if (dc_li.html().contains("main_log") == true) {
|
||||
parseDcLi(dc_li).apply {
|
||||
this.forEach {
|
||||
if (it.pubDate() > commicsDateTime) {
|
||||
temp.add(it.getRssData())
|
||||
urls.forEach { testUrl2 ->
|
||||
try {
|
||||
// Blog.LOGE("${TAG} ${testUrl2} ")
|
||||
Jsoup.connect(testUrl2)
|
||||
.userAgent(USAGT)
|
||||
.get().let { dc ->
|
||||
// Blog.LOGE("${TAG} ${testUrl2} >> ${this}")
|
||||
var tbody = dc.getElementsByTag("tbody")
|
||||
|
||||
|
||||
if((tbody?.size ?: 0) == 1) {
|
||||
|
||||
var from = dc.getElementsByClass("page_head clear")?.first()?.getElementsByTag("a")?.first()?.text()
|
||||
// Blog.LOGE("${TAG} ${from} ")
|
||||
dc.getElementsByTag("tbody").first().children().forEach {
|
||||
var title = it.getElementsByClass("gall_tit ub-word")?.first()?.text()
|
||||
var date = it.getElementsByClass("gall_date")?.first()?.attr("title")
|
||||
var link = it.getElementsByTag("a")?.first()?.attr("href")
|
||||
if (link?.length ?: 0 > 10 && title?.length ?: 0 > 2 && date?.length ?: 0 > 1) {
|
||||
// Blog.LOGE("${TAG} ${title} ")
|
||||
// Blog.LOGE("${TAG} ${date} ${df.parse(date)}")
|
||||
// Blog.LOGE("${TAG} ${link} ")
|
||||
DcInside().apply {
|
||||
"https://gall.dcinside.com".plus(
|
||||
link?.replace(
|
||||
"&",
|
||||
"&"
|
||||
)
|
||||
)?.toUri()?.apply {
|
||||
|
||||
link = "https://m.dcinside.com/board/".plus(getQueryParameter("id")).plus("/").plus(getQueryParameter("no"))
|
||||
}
|
||||
// this.link = "https://gall.dcinside.com".plus(
|
||||
// link?.replace(
|
||||
// "&",
|
||||
// "&"
|
||||
// )
|
||||
// )
|
||||
|
||||
this.link = link
|
||||
// Blog.LOGE("${TAG} ${link} ")
|
||||
// Blog.LOGE("${TAG} ${from} ")
|
||||
this.title = title
|
||||
this.desc = from
|
||||
this.dateTiemL = df.parse(date).time
|
||||
}.apply {
|
||||
if (this.pubDate() > limitDateTime) {
|
||||
temp.add(this.getRssData())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
dc.getElementsByTag("li").forEach { dc_li ->
|
||||
if (dc_li.html().contains("main_log") == true) {
|
||||
parseDcLi(dc_li).apply {
|
||||
this.forEach {
|
||||
|
||||
if (it.pubDate() > commicsDateTime) {
|
||||
// Blog.LOGE("${TAG} ${it.title()}")
|
||||
temp.add(it.getRssData())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}catch (e :Exception){e.printStackTrace()}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@ import androidx.work.WorkerParameters
|
||||
import bums.lunatic.launcher.model.FmKorea
|
||||
import bums.lunatic.launcher.model.RssDataType
|
||||
import bums.lunatic.launcher.model.getRssData
|
||||
import bums.lunatic.launcher.utils.Blog
|
||||
import org.jsoup.Jsoup
|
||||
import java.util.Date
|
||||
|
||||
@ -22,42 +23,49 @@ class FmKoreaGetter : BaseGetter {
|
||||
RssDataType.FMKORAE.isOn {
|
||||
val now = Date()
|
||||
try {
|
||||
val fmkoreaUrls = arrayListOf("https://www.fmkorea.com/best","https://www.fmkorea.com/best2")
|
||||
val fmkoreaUrls = arrayListOf("https://m.fmkorea.com","https://m.fmkorea.com/best","https://m.fmkorea.com/best2")
|
||||
fmkoreaUrls.forEach {
|
||||
Jsoup.connect(it).userAgent(USAGT).get().let { fmkorea ->
|
||||
// BLog.LOGE("fmkorea >>> ${fmkorea.title()}")
|
||||
fmkorea.getElementsByTag("li").forEach { fmkorea_li ->
|
||||
if (fmkorea_li.getElementsByClass("title")
|
||||
.text().length > 0 && fmkorea_li.getElementsByTag("a").size > 0 && fmkorea_li.getElementsByTag(
|
||||
"a"
|
||||
).get(0).attr("href").length > 0
|
||||
) {
|
||||
// BLog.LOGE("fmkorea_li >>> ${fmkorea_li}")
|
||||
val title = fmkorea_li.getElementsByClass("title").text()
|
||||
val tumb = "https://".plus(
|
||||
fmkorea_li.getElementsByClass("thumb").attr("data-original")
|
||||
)
|
||||
val pageUrl = "https://www.fmkorea.com".plus(
|
||||
fmkorea_li.getElementsByTag("a").get(0).attr("href")
|
||||
)
|
||||
val desc = fmkorea_li.getElementsByClass("category").text()
|
||||
val date = fmkorea_li.getElementsByClass("regdate").text()
|
||||
FmKorea(pageUrl, desc, date, title, tumb).apply {
|
||||
if (desc?.contains("유머") == true || desc?.contains("음악") == true || desc?.contains(
|
||||
"영화"
|
||||
) == true ||
|
||||
desc?.contains("TV") == true || desc?.contains("미스터리") == true || desc?.contains(
|
||||
"역사"
|
||||
) == true
|
||||
try {
|
||||
Jsoup.connect(it).userAgent(USAGT).timeout(5000).ignoreHttpErrors(true).get().let { fmkorea ->
|
||||
if (it.contains("guru")) {
|
||||
// Blog.LOGE("GURU -> ${fmkorea}")
|
||||
} else {
|
||||
fmkorea.getElementsByTag("li").forEach { fmkorea_li ->
|
||||
if (fmkorea_li.getElementsByClass("title")
|
||||
.text().length > 0 && fmkorea_li.getElementsByTag("a").size > 0 && fmkorea_li.getElementsByTag(
|
||||
"a"
|
||||
).get(0).attr("href").length > 0
|
||||
) {
|
||||
if (this.pubDate() > commicsDateTime && tumb.length > 10) {
|
||||
temp.add(this.getRssData())
|
||||
val title = fmkorea_li.getElementsByClass("title").text()
|
||||
val tumb = "https://".plus(
|
||||
fmkorea_li.getElementsByClass("thumb")
|
||||
.attr("data-original")
|
||||
)
|
||||
val pageUrl = "https://www.fmkorea.com".plus(
|
||||
fmkorea_li.getElementsByTag("a").get(0).attr("href")
|
||||
)
|
||||
val desc = fmkorea_li.getElementsByClass("category").text()
|
||||
val date = fmkorea_li.getElementsByClass("regdate").text()
|
||||
FmKorea(pageUrl, desc, date, title, tumb).apply {
|
||||
if (desc?.contains("유머") == true || desc?.contains("음악") == true || desc?.contains(
|
||||
"영화"
|
||||
) == true ||
|
||||
desc?.contains("TV") == true || desc?.contains("미스터리") == true || desc?.contains(
|
||||
"역사"
|
||||
) == true
|
||||
) {
|
||||
if (this.pubDate() > commicsDateTime && tumb.length > 10) {
|
||||
temp.add(this.getRssData())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}catch (e:Exception){
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
|
||||
@ -152,6 +152,7 @@ class LocationUpdateService : Service(), LocationListener {
|
||||
try{
|
||||
locationManager = applicationContext
|
||||
.getSystemService(LOCATION_SERVICE) as LocationManager
|
||||
|
||||
checkGPS = locationManager!!
|
||||
.isProviderEnabled(LocationManager.GPS_PROVIDER)
|
||||
checkNetwork = locationManager!!
|
||||
|
||||
@ -24,10 +24,10 @@ class NewsFeedsGetter : BaseGetter {
|
||||
feddsUrls.addAll(RssList.getFeedUrls())
|
||||
|
||||
for (url in feddsUrls) {
|
||||
for (it in RssFeedsParser.getFeeds(url)) {
|
||||
if (it.pubDate() >= limitDateTime) {
|
||||
temp.add(it.getRssData())
|
||||
}
|
||||
try {
|
||||
for (it in RssFeedsParser.getFeeds(url)) { if (it.pubDate() >= limitDateTime) { try {temp.add(it.getRssData())}catch (e : Exception) {e.printStackTrace()} } }
|
||||
}catch (e : Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -7,6 +7,7 @@ import androidx.work.WorkerParameters
|
||||
import bums.lunatic.launcher.model.RssDataType
|
||||
import bums.lunatic.launcher.model.RuliWeb
|
||||
import bums.lunatic.launcher.model.getRssData
|
||||
import bums.lunatic.launcher.utils.Blog
|
||||
import org.jsoup.Jsoup
|
||||
|
||||
class RuliWebGetter : BaseGetter {
|
||||
@ -26,7 +27,9 @@ class RuliWebGetter : BaseGetter {
|
||||
var dateTimeTxt = ""
|
||||
if(ruli_tr.getElementsByTag("a").size > tagIdx) {
|
||||
pageLink = aTags.get(tagIdx).attr("href").replace("&","&")
|
||||
thumbnailUrl = aTags.get(tagIdx).attr("style").split("(")[1].replace(");","")
|
||||
if(aTags.get(tagIdx).attr("style").split("(").size > 1) {
|
||||
thumbnailUrl = aTags.get(tagIdx).attr("style").split("(")[1].replace(");", "")
|
||||
}
|
||||
}
|
||||
tagIdx = 1
|
||||
if(ruli_tr.getElementsByTag("a").size > tagIdx) { title = aTags.get(tagIdx).text() }
|
||||
@ -37,11 +40,11 @@ class RuliWebGetter : BaseGetter {
|
||||
var timeClass = ruli_tr.getElementsByClass("time")
|
||||
if(timeClass.size > 0) { dateTimeTxt = timeClass.get(0).text() }
|
||||
|
||||
// BLog.LOGE("pageLink >>>> $pageLink ")
|
||||
// BLog.LOGE("thumbnailUrl >>>> $thumbnailUrl ")
|
||||
// BLog.LOGE("title >>>> $title ")
|
||||
// BLog.LOGE("desc >>>> $desc ")
|
||||
// BLog.LOGE("dateTimeTxt >>>> $dateTimeTxt ")
|
||||
// Blog.LOGE(TAG.plus("pageLink >>>> $pageLink "))
|
||||
// Blog.LOGE(TAG.plus("thumbnailUrl >>>> $thumbnailUrl "))
|
||||
// Blog.LOGE(TAG.plus("title >>>> $title "))
|
||||
// Blog.LOGE(TAG.plus("desc >>>> $desc "))
|
||||
// Blog.LOGE(TAG.plus("dateTimeTxt >>>> $dateTimeTxt "))
|
||||
if (title.length > 0 && pageLink.length > 0) {
|
||||
RuliWeb().let { ru ->
|
||||
ru.title = title
|
||||
@ -62,10 +65,10 @@ class RuliWebGetter : BaseGetter {
|
||||
try {
|
||||
val testUrl2 = arrayListOf("https://bbs.ruliweb.com/best/humor_only","https://bbs.ruliweb.com/best/humor_only/now?m=humor_only&t=default&page=2")
|
||||
testUrl2.forEach { url ->
|
||||
Jsoup.connect(url)
|
||||
Jsoup.connect(url).timeout(5000).ignoreHttpErrors(true)
|
||||
.userAgent(USAGT)
|
||||
.get().let { ruli ->
|
||||
// BLog.LOGE("test ${testUrl2} >> ${ruli.title()}")
|
||||
// Blog.LOGE(TAG.plus("test ${testUrl2} >> ${ruli.title()}"))
|
||||
ruli.getElementsByTag("tr").forEach { ruli_tr ->
|
||||
parseRuli(ruli_tr)
|
||||
}
|
||||
|
||||
@ -24,6 +24,7 @@ import bums.lunatic.launcher.model.TelegramChat
|
||||
import bums.lunatic.launcher.model.TelegramData
|
||||
import bums.lunatic.launcher.model.TelegramFrom
|
||||
import bums.lunatic.launcher.model.TelegramMessage
|
||||
import bums.lunatic.launcher.model.UserActionModel
|
||||
import bums.lunatic.launcher.model.WeatherForcast
|
||||
import bums.lunatic.launcher.utils.Blog
|
||||
import bums.lunatic.launcher.utils.JamoUtils
|
||||
@ -36,6 +37,8 @@ import io.realm.kotlin.migration.AutomaticSchemaMigration
|
||||
import io.realm.kotlin.query.RealmQuery
|
||||
import io.realm.kotlin.types.BaseRealmObject
|
||||
import io.realm.kotlin.types.TypedRealmObject
|
||||
import java.util.Calendar
|
||||
import java.util.Date
|
||||
import java.util.Locale
|
||||
import java.util.regex.Pattern
|
||||
import kotlin.reflect.KClass
|
||||
@ -48,12 +51,21 @@ class CustMigration : AutomaticSchemaMigration {
|
||||
}
|
||||
object WorkersDb {
|
||||
|
||||
|
||||
fun recommendApps() {
|
||||
val cal = Calendar.getInstance()
|
||||
cal.time = Date()
|
||||
val weekOfYear = cal.get(Calendar.WEEK_OF_YEAR)
|
||||
val weekOfMonth = cal.get(Calendar.WEEK_OF_MONTH)
|
||||
val dayOfWeek = cal.get(Calendar.DAY_OF_WEEK)
|
||||
getRealm().apply {
|
||||
this.query<UserActionModel>().query("weekOfYear == $0 OR weekOfMonth == $1 OR dayOfWeek == $2").limit()
|
||||
}
|
||||
}
|
||||
|
||||
val clazz : Set<KClass<out BaseRealmObject>> = setOf(RssData::class, NotificationItem::class, AppInfo::class,SimpleContact::class, RecentCall::class, RecentSms::class, CurrentPlayItem::class,
|
||||
TelegramBotUpdate::class, TelegramData::class, TelegramMessage::class, TelegramChat::class, BotCommandEentitie::class, TelegramFrom::class,
|
||||
WeatherForcast::class, Location::class, Current::class, Forecast::class, Condition::class, Forecastday::class, Day::class, Astro::class, Hour::class,
|
||||
LocationLog::class
|
||||
LocationLog::class,UserActionModel::class
|
||||
)
|
||||
|
||||
val schemaVersion : Long = BuildConfig.BuildDateTime
|
||||
@ -85,7 +97,7 @@ object WorkersDb {
|
||||
}
|
||||
}
|
||||
|
||||
val blockKeyword = arrayListOf<String>("붕괴 스타레일","붕괴 스타일","트릭컬 RE:VIVE","원신","메이플스토리","")
|
||||
// val blockKeyword = arrayListOf<String>("붕괴 스타레일","붕괴 스타일","트릭컬 RE:VIVE","원신","메이플스토리","")
|
||||
fun insertBulkData(rssDatas: Collection<RssData>) {
|
||||
rssDatas.forEach {
|
||||
try {
|
||||
@ -94,7 +106,7 @@ object WorkersDb {
|
||||
val catfillters = arrayListOf<RssDataType>(RssDataType.THEQOO,RssDataType.RULIWEB,RssDataType.ARCA,RssDataType.CLIEN,RssDataType.FMKORAE,RssDataType.DOTAX,RssDataType.DCINSIDE)
|
||||
if(catfillters.contains(it.category()) && query<RssData>("chosung == $0",it.chosung).find().size == 0) {
|
||||
this.copyToRealm(it, UpdatePolicy.ERROR)
|
||||
} else {
|
||||
} else if(!catfillters.contains(it.category())){
|
||||
this.copyToRealm(it, UpdatePolicy.ERROR)
|
||||
}
|
||||
} catch (e : Exception) {
|
||||
|
||||
@ -189,6 +189,18 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<TextView
|
||||
style="@style/normal"
|
||||
android:id="@+id/favApps"
|
||||
android:gravity="center"
|
||||
android:background="@null"
|
||||
android:text="앱스"
|
||||
android:textColor="@color/tabs"
|
||||
android:checked="false"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<TextView
|
||||
style="@style/normal"
|
||||
android:id="@+id/recentSms"
|
||||
@ -254,7 +266,6 @@
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
|
||||
/>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
@ -274,6 +285,23 @@
|
||||
android:layout_alignParentBottom="true"
|
||||
/>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
|
||||
android:layout_margin="@dimen/default_layout_margin"
|
||||
android:id="@+id/appsList"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:overScrollMode="never"
|
||||
android:padding="@dimen/default_padding"
|
||||
app:spanCount="3"
|
||||
android:scrollbars="none"
|
||||
android:visibility="gone"
|
||||
android:background="@drawable/base_bg"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
/>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:layout_margin="@dimen/default_layout_margin"
|
||||
|
||||
@ -553,7 +553,7 @@ open class AwesomeWebViewActivity : AppCompatActivity(), View.OnClickListener,
|
||||
|
||||
|
||||
|
||||
protected fun bindViews() {
|
||||
open fun bindViews() {
|
||||
binding.toolbarContent.close.setOnClickListener(this)
|
||||
binding.toolbarContent.back.setOnClickListener(this)
|
||||
binding.toolbarContent.forward.setOnClickListener(this)
|
||||
@ -824,12 +824,29 @@ open class AwesomeWebViewActivity : AppCompatActivity(), View.OnClickListener,
|
||||
val items = arrayOf(
|
||||
resources.getString(stringResSavePhoto)
|
||||
)
|
||||
val url = hitTestResult.extra
|
||||
if (webView?.url?.contains(".guru") == true) {
|
||||
url?.split("/")?.last()?.let { last ->
|
||||
var code = if(last.contains("_") && last.split("_")?.first()?.length ?: 0 > 2) {
|
||||
last.split("_").first()
|
||||
} else if(last.contains("-") && last.split("-")?.first()?.length ?: 0 > 2) {
|
||||
last.split("-").first()
|
||||
} else {
|
||||
last
|
||||
}
|
||||
LogUtil.e("hitTestResult code >>> ${code}")
|
||||
webView?.evaluateJavascript("try{GJI.onCode('${code}');}catch(e){console.log(e);}", {})
|
||||
}
|
||||
showBlock()
|
||||
return@OnLongClickListener false
|
||||
}
|
||||
|
||||
builder?.setItems(
|
||||
items
|
||||
) { dialog, which ->
|
||||
LogUtil.e("hitTestResult.extra >>> ${dialog} ,${which}")
|
||||
val url = hitTestResult.extra
|
||||
LogUtil.e("hitTestResult.extra >>> ${hitTestResult.extra}")
|
||||
|
||||
CookieSyncManager.createInstance(applicationContext)
|
||||
CookieSyncManager.getInstance().sync()
|
||||
val cookieManager =
|
||||
@ -1253,8 +1270,16 @@ open class AwesomeWebViewActivity : AppCompatActivity(), View.OnClickListener,
|
||||
|
||||
protected fun showBlock() {
|
||||
binding.blocking.visibility = View.VISIBLE
|
||||
val ress = arrayListOf(R.raw.lt_lodaing_01,R.raw.lt_lodaing_02,R.raw.lt_lodaing_03)
|
||||
binding.lotti.setAnimation(ress[Math.abs(Random(8736).nextInt()) % ress.size])
|
||||
val ress = arrayListOf(R.raw.dlottie_001,R.raw.lt_lodaing_01,R.raw.dlottie_003,R.raw.lt_lodaing_02,R.raw.lt_lodaing_03,R.raw.dlottie_002)
|
||||
var isEven = ((System.currentTimeMillis() % 2).toInt() == 0)
|
||||
var firstSeed = Random(if(isEven)8739 else 7531)
|
||||
var randomSeed_01 = Math.abs(firstSeed.nextInt()) % if(isEven) 879 else 56
|
||||
var randomSeed_02 = Math.abs(firstSeed.nextInt()) % if(!isEven) 758 else 397
|
||||
var randomSeed_03 = Math.abs(firstSeed.nextInt()) % if(!isEven) 353 else 49
|
||||
var totalSeed = Math.abs((Math.abs(randomSeed_01) * Math.abs(randomSeed_02)) + Math.abs(randomSeed_03))
|
||||
var randomResult = Math.abs(totalSeed % ress.size)
|
||||
LogUtil.e("randomResult >>> randomSeed_01 {${randomSeed_01}} | randomSeed_02 {${randomSeed_02}} | randomSeed_03 {${randomSeed_03}} | resSize {${ress.size}} | ${randomResult}")
|
||||
binding.lotti.setAnimation(ress[Math.abs(randomResult)])
|
||||
binding.lotti.playAnimation()
|
||||
}
|
||||
|
||||
@ -1912,7 +1937,7 @@ open class AwesomeWebViewActivity : AppCompatActivity(), View.OnClickListener,
|
||||
url.toLowerCase(Locale.ROOT).contains(".svg") ||
|
||||
url.toLowerCase(Locale.ROOT).contains(".webp")) {
|
||||
mediaUrls.add(url)
|
||||
LogUtil.e("mediaUrls >>>>> add(${url})")
|
||||
// LogUtil.e("mediaUrls >>>>> add(${url})")
|
||||
}
|
||||
|
||||
if(!hasYoutubePlayer) {
|
||||
@ -1924,9 +1949,11 @@ open class AwesomeWebViewActivity : AppCompatActivity(), View.OnClickListener,
|
||||
|
||||
if (url.toLowerCase(Locale.ROOT)
|
||||
.contains("ads".toLowerCase(Locale.ROOT))) {
|
||||
LogUtil.e("shouldInterceptRequest request url contains ads >>> ${request.url.toString()}")
|
||||
// LogUtil.e("shouldInterceptRequest request url contains ads >>> ${request.url.toString()}")
|
||||
}
|
||||
var adblockKeyWords = arrayOf("adcr.naver.com","daumcdn.net/biz/ui/ad/adcm","imgad","ad.daum.net","cr.adsappier.com","ar-adview","adtrafficquality","criteo","adlib.nhnace.com","google.com/ads","googleads.","/pagead","/adpost/","ads/search","plugin.adplex","google-analytics.com")
|
||||
var callSupers = arrayListOf("google-analytics.com","analytics.google.com","api.dable.io")
|
||||
var adblockKeyWords = arrayOf("adcr.naver.com","daumcdn.net/biz/ui/ad/adcm","imgad","ad.daum.net","cr.adsappier.com","ar-adview","adtrafficquality","criteo","adlib.nhnace.com","google.com/ads","googleads.","/pagead","/adpost/","ads/search","plugin.adplex")
|
||||
val supers = callSupers.filter { url.toLowerCase(Locale.ROOT).contains(it.toLowerCase(Locale.ROOT)) }.size > 0
|
||||
val adblock = adblockKeyWords.filter { url.toLowerCase(Locale.ROOT).contains(it.toLowerCase(Locale.ROOT)) }.size > 0
|
||||
return if(adblock) {
|
||||
try {
|
||||
@ -1935,7 +1962,9 @@ open class AwesomeWebViewActivity : AppCompatActivity(), View.OnClickListener,
|
||||
} catch (e : Exception) {
|
||||
super.shouldInterceptRequest(view, url)
|
||||
}
|
||||
}else if(url.toLowerCase(Locale.ROOT).contains(".jpg") || url.toLowerCase(Locale.ROOT).contains(".jpeg")){
|
||||
} else if(supers) {
|
||||
super.shouldInterceptRequest(view, url)
|
||||
} else if(url.toLowerCase(Locale.ROOT).contains(".jpg") || url.toLowerCase(Locale.ROOT).contains(".jpeg")){
|
||||
try {
|
||||
val bitmap = Glide.with(this@AwesomeWebViewActivity).asBitmap().timeout(30000).diskCacheStrategy(DiskCacheStrategy.ALL).load(url).submit().get()
|
||||
WebResourceResponse("image/jpg", "UTF-8",getBitmapInputStream(bitmap,Bitmap.CompressFormat.JPEG)).apply {
|
||||
@ -1958,7 +1987,7 @@ open class AwesomeWebViewActivity : AppCompatActivity(), View.OnClickListener,
|
||||
try {
|
||||
val bitmap = Glide.with(this@AwesomeWebViewActivity).asBitmap().timeout(30000).diskCacheStrategy(DiskCacheStrategy.ALL).load(url).submit().get()
|
||||
WebResourceResponse("image/webp", "UTF-8",getBitmapInputStream(bitmap,Bitmap.CompressFormat.WEBP)).apply {
|
||||
LogUtil.e("shouldInterceptRequest request url down from Glide >>> ${request.url.toString()}")
|
||||
// LogUtil.e("shouldInterceptRequest request url down from Glide >>> ${request.url.toString()}")
|
||||
}
|
||||
} catch (e : Exception) {
|
||||
super.shouldInterceptRequest(view, url)
|
||||
@ -1980,7 +2009,7 @@ open class AwesomeWebViewActivity : AppCompatActivity(), View.OnClickListener,
|
||||
// }
|
||||
|
||||
override fun onPageStarted(view: WebView, url: String, favicon: Bitmap?) {
|
||||
|
||||
|
||||
mediaUrls.clear()
|
||||
BroadCastManager.onPageStarted(this@AwesomeWebViewActivity, key, url)
|
||||
if (!url.contains("docs.google.com") && url.endsWith(".pdf")) {
|
||||
@ -2038,7 +2067,15 @@ open class AwesomeWebViewActivity : AppCompatActivity(), View.OnClickListener,
|
||||
|
||||
override fun shouldOverrideUrlLoading(view: WebView, url: String): Boolean {
|
||||
handler.sendEmptyMessage(MSG_CLICK_ON_URL)
|
||||
|
||||
if (url.contains("http:")) {
|
||||
var newUrl = url.replace("http:","https:")
|
||||
LogUtil.e("is StartWith ${url} , ${newUrl}")
|
||||
if (newUrl.length > 10) {
|
||||
view.stopLoading()
|
||||
view.loadUrl(newUrl)
|
||||
}
|
||||
return true
|
||||
}
|
||||
var skipResource = host!= null && ((url.contains(host!!) ?: true) == false) && (host!!.contains("google") == false)
|
||||
if (skipResource || loadWithIntent) {
|
||||
LogUtil.e("shouldOverrideUrlLoading block url $url , host >>>> $host ")
|
||||
|
||||
BIN
library/src/main/res/raw/dlottie_001
Normal file
BIN
library/src/main/res/raw/dlottie_001
Normal file
Binary file not shown.
BIN
library/src/main/res/raw/dlottie_002
Normal file
BIN
library/src/main/res/raw/dlottie_002
Normal file
Binary file not shown.
BIN
library/src/main/res/raw/dlottie_003
Normal file
BIN
library/src/main/res/raw/dlottie_003
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user