This commit is contained in:
lunaticbum 2026-01-14 17:27:56 +09:00
parent 175165184d
commit 5425589ad9
17 changed files with 47 additions and 120 deletions

View File

@ -808,7 +808,6 @@ async function handleCommon() {
}
}
if (window.scrollY < 5) {
console.log("window.scrollY >>> " + window.scrollY)
window.scrollTo({top: 5, behavior: 'smooth'});
}

View File

@ -29,7 +29,7 @@ object OkHttpClientInstance {
val client: OkHttpClient by lazy {
// 네트워크 로그를 보기 위한 인터셉터 설정
val loggingInterceptor = HttpLoggingInterceptor().apply {
level = HttpLoggingInterceptor.Level.BODY
level = HttpLoggingInterceptor.Level.NONE
}
OkHttpClient.Builder()

View File

@ -234,44 +234,6 @@ open class LauncherActivity : CommonActivity() {
override fun onNewIntent(intent: Intent) {
Blog.LOGE("onNewIntent intent >> ${intent}")
// if(intent?.action?.equals(Intent.ACTION_SEND) == true &&
// intent?.hasExtra(Intent.EXTRA_TEXT) == true) {
// intent?.getStringExtra(Intent.EXTRA_TEXT)?.let {
// if(it.startsWith("http") == false) {
// it.split("http").forEach { string ->
// if(string.startsWith("http")) {
// try {
// string.toUri()?.let { uri ->
// Blog.LOGE("onNewIntent string uri.lastPathSegment >>>>> ${uri.host}")
// Blog.LOGE("onNewIntent string uri.lastPathSegment >>>>> ${uri.lastPathSegment}")
// }
// } catch (e: Exception) {
//
// }
// }
// }
// } else {
// try {
// it.toUri()?.let { uri ->
// Blog.LOGE("onNewIntent it uri.lastPathSegment >>>>> ${uri.host}")
// Blog.LOGE("onNewIntent it uri.lastPathSegment >>>>> ${uri.lastPathSegment}")
// }
// } catch (e: Exception) {
//
// }
// }
// }
// } else if (intent?.action == Intent.ACTION_WEB_SEARCH) {
// openWithIntent(intent)
// } else {
// Blog.LOGE("onNewIntent intent?.hasExtra >> ${intent?.hasExtra(Intent.EXTRA_STREAM)}")
//&& intent.hasExtra("android.intent.extra.EXTRA_START_REASON") && intent.getStringExtra(
// "android.intent.extra.EXTRA_START_REASON"
// ).equals("startDockOrHome")
// )
try {
val fragment = supportFragmentManager.findFragmentByTag(AppDrawerBottomSheet.TAG)
Blog.LOGE("fragment >>> $fragment")
@ -640,6 +602,12 @@ open class LauncherActivity : CommonActivity() {
// DB에서 위젯 복구
private fun restoreWidgets() {
// WorkersDb.getRealm().writeBlocking {
// delete(query<WidgetData>().find())
// }
val widgets = WorkersDb.getRealm().query<WidgetData>().find()
widgets.forEach { widgetData ->
createWidget(null, widgetData)

View File

@ -92,7 +92,7 @@ internal class LunaticLauncher : Application() {
// Blog.LOGE("chain.request().url() >>> ${chain.request().url} : host : $host")
val response = chain.proceed(newRequestBuilder.build())
Blog.LOGE("응답 코드: ${response.code}:${response.message}")
// Blog.LOGE("응답 코드: ${response.code}:${response.message}")
response
}
.addInterceptor(logging)

View File

@ -192,7 +192,6 @@ class AppDrawerBottomSheet : BottomSheetDialogFragment() {
}
binding.hidden.setOnClickListener {
binding.hidden.isSelected = !binding.hidden.isSelected
Blog.LOGE("binding.hidden.isSelected >>> ${binding.hidden.isSelected}")
filterAppsList(keyword)
}
@ -375,7 +374,6 @@ class AppDrawerBottomSheet : BottomSheetDialogFragment() {
}
}
Blog.LOGE("unifiedList >>> ${unifiedList.size}")
// 6. [UI 업데이트]
withContext(Dispatchers.Main) {

View File

@ -85,7 +85,6 @@ class ForeGroundService : Service() {
val NOTIF_ID = 830721
override fun onCreate() {
super.onCreate()
Blog.LOGE("onCreate")
mWorkManager = WorkManager.getInstance(this)
val filter = IntentFilter(BluetoothDevice.ACTION_ACL_CONNECTED)
registerReceiver(bluetoothreceiver, filter)
@ -93,7 +92,6 @@ class ForeGroundService : Service() {
}
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
Blog.LOGE("onStartCommand >>> ${intent}")
when(intent?.action) {
ACTION_SENDMSG -> {
intent?.getStringExtra(EXTRA_MSGKEY)?.let {
@ -205,7 +203,6 @@ class ForeGroundService : Service() {
}
override fun onBind(intent: Intent?): IBinder? {
Blog.LOGE("onBind intent >>> ${intent}")
return null
}
private val CHANNEL_ID = "bums_service_channel"

View File

@ -24,7 +24,6 @@ class HourlyLogWriter(private val logDir: File) {
// 로그 기록 함수 (비동기)
fun writeLog(data: String) {
if (true)return
Blog.LOGE("writeLog >>> ${data}")
ioScope.launch {
try {
if (!logDir.exists()) logDir.mkdirs()
@ -34,7 +33,6 @@ class HourlyLogWriter(private val logDir: File) {
// 파일이 바뀌었으면 기록 경로 갱신
lastFilePath.set(logFile.absolutePath)
logFile.appendText("${System.currentTimeMillis()},$data\n")
Blog.LOGE("writeLog >>> ${logFile.length()}")
} catch (e: Exception) {
e.printStackTrace()
}

View File

@ -175,7 +175,6 @@ open class GeckoWeb @JvmOverloads constructor(
nUrl.let {
val finalUrl = if (it.split("//").size > 1) it.replace("//", "/").replace("https:/", "https://") else it
Blog.LOGE("Loading: $finalUrl")
this.session?.loadUri(finalUrl)
}
currentRetryCount = 0
@ -392,11 +391,8 @@ open class GeckoWeb @JvmOverloads constructor(
// Delegate 연결 (NullPointerException 방지를 위해 상단 선언된 변수 사용)
session.contentDelegate = contentDelegate
Blog.LOGE("session.contentDelegate = $contentDelegate")
session.progressDelegate = progressDelegate
Blog.LOGE("session.progressDelegate = $progressDelegate")
session.navigationDelegate = navigationDelegate
Blog.LOGE("session.navigationDelegate = $navigationDelegate")
session.mediaDelegate = mediaDelegate
session.promptDelegate = promptDelegate
session.mediaSessionDelegate = mediaSessionDelegate

View File

@ -117,8 +117,6 @@ open class NeoRssActivity : CommonActivity() {
var lastAction = MotionEvent.ACTION_HOVER_EXIT
override fun dispatchKeyEvent(ev: KeyEvent): Boolean {
val currentFragment = supportFragmentManager.findFragmentById(R.id.fragment_container)
Blog.LOGE("dispatch ev?.device?.name >>> ${ev?.device?.name} , keyCode >> ${ev?.keyCode}")
if (ev?.device?.name?.contains("SM-031N Mouse") == true) {
when(ev.action) {
ACTION_UP -> {
@ -199,13 +197,11 @@ open class NeoRssActivity : CommonActivity() {
}
override fun dispatchTrackballEvent(event: MotionEvent?): Boolean {
Blog.LOGE("event >>> ${event?.device}")
return super.dispatchTrackballEvent(event)
}
@SuppressLint("RestrictedApi")
override fun dispatchKeyShortcutEvent(event: KeyEvent): Boolean {
Blog.LOGE("event >>> ${event.device}")
return super.dispatchKeyShortcutEvent(event)
}
@ -294,7 +290,6 @@ open class NeoRssActivity : CommonActivity() {
}
fun floatClick(v : View) {
Blog.LOGE("v >>> ${v}")
showContents(v.id)
}
@ -549,7 +544,6 @@ open class NeoRssActivity : CommonActivity() {
}
override fun onTouchEvent(event: MotionEvent?): Boolean {
Blog.LOGE("event >>> ${event}")
return super.onTouchEvent(event)
}

View File

@ -203,9 +203,7 @@ internal class RssHome : Fragment() {
var openQuery = ""
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
Blog.LOGE("arguments >>> ${arguments}")
arguments?.let {
Blog.LOGE("arguments >>> ${arguments}")
if(it.containsKey("query") && it.getString("query")!!.length > 0) {
Blog.LOGE("it.getString ${it.getString("query")}")
openQuery = it.getString("query")!!
@ -328,7 +326,6 @@ internal class RssHome : Fragment() {
var currentRss : RssData? = null
@SuppressLint("SimpleDateFormat")
fun openGecko(rssData: RssData? = null) {
Blog.LOGE("rssData >>> ${rssData}")
binding.layoutRssSummary.root.visibility = View.GONE
fun openSummary(rssData : RssData) {
@ -466,7 +463,6 @@ internal class RssHome : Fragment() {
}
}
Blog.LOGE("useHiddenMenu >>> $openQuery")
if (openQuery.length > 0) {
binding.geckoWeb.loadUrl("https://www.google.com/search?q=${openQuery}")
openQuery = ""
@ -581,7 +577,6 @@ internal class RssHome : Fragment() {
binding.geckoWeb.decoViews.add(activity.findViewById<ImageButton>(R.id.reload))
binding.geckoWeb.decoViews.add(activity.findViewById<ImageButton>(R.id.dl_video))
}
Blog.LOGE("binding.geckoWeb.decoViews >>> ${binding.geckoWeb.decoViews.size}")
return binding.root
}
@ -640,7 +635,6 @@ internal class RssHome : Fragment() {
}
fun updateQuery(q: RealmQuery<RssData>) {
Blog.LOGE("updateQuery >>> ${q.description()}")
infosJob?.cancel()
commandHandler.removeCallbacks(infoUpdate)
mLastedQuery = q.query("hide != $0", true).sort("pubDate ", Sort.DESCENDING).limit(500).distinct("originPage", "title")
@ -881,7 +875,6 @@ internal class RssHome : Fragment() {
try {
imageView.visibility = View.INVISIBLE
imageView.setAlpha(0.05f)
Blog.LOGE("loadImage >>> $url")
Picasso.get()
.load(url)
.into(imageView, object : com.squareup.picasso.Callback {

View File

@ -249,7 +249,6 @@ init {
val imageLoader = CoilInstance.getImageLoader(holder.itemView.context)
Blog.LOGE("imageUrl >>> ${imageUrl}")
holder.imageView.load("https://lunaticbum.kr$imageUrl",imageLoader) {
crossfade(true)
error(R.drawable.ic_news) // 에러 시 보여줄 이미지 (ic_error.xml 같은 drawable 필요)

View File

@ -198,11 +198,6 @@ internal class RssItemAdapter (
}
if (rssData.thumbnailUrl()?.length ?: 0 > 6) {
Blog.LOGE("rssData.thumbnailUrl() >>> ${rssData.thumbnailUrl()}")
// val requestOptions = RequestOptions()
// .diskCacheStrategy(DiskCacheStrategy.ALL)
// .timeout(3000) // 3초
Picasso.get().load(rssData.thumbnailUrl().replace("&amp;", "&").toUri())
.error(rssData.category().getResId())
.into(holder.view.circlePreview,object : Callback {
@ -230,7 +225,7 @@ internal class RssItemAdapter (
true
) == true || event.device.name?.equals("J06", true) == true)
) {
Blog.LOGE("event.device.name >>> ${event.device.name}")
return true//mSimpleFingerGestures.onTouch(v,event)
} else {
return false

View File

@ -50,17 +50,16 @@ class NLService : NotificationListenerService() {
if (sbn.packageName.contains("bums.lunatic.launcher") == false) {
val notification = sbn.notification
val extras = notification.extras
val title = extras.getString(Notification.EXTRA_TITLE) ?: ""
val title = extras.getCharSequence(Notification.EXTRA_TITLE)?.toString() ?: ""
val text = extras.getCharSequence(Notification.EXTRA_TEXT)?.toString() ?: ""
val bigText = extras.getCharSequence(Notification.EXTRA_BIG_TEXT)?.toString() ?: ""
val extraInfo = extras.getCharSequence(Notification.EXTRA_INFO_TEXT)?.toString() ?: ""
val subText = extras.getCharSequence(Notification.EXTRA_SUB_TEXT)?.toString() ?: ""
val conversationTitle =
extras.getCharSequence(Notification.EXTRA_CONVERSATION_TITLE)?.toString() ?: ""
val summaryText =
extras.getCharSequence(Notification.EXTRA_SUMMARY_TEXT)?.toString() ?: ""
val verificationText =
extras.getCharSequence(Notification.EXTRA_VERIFICATION_TEXT)?.toString() ?: ""
val conversationTitle = extras.getCharSequence(Notification.EXTRA_CONVERSATION_TITLE)?.toString() ?: ""
val summaryText = extras.getCharSequence(Notification.EXTRA_SUMMARY_TEXT)?.toString() ?: ""
val verificationText = extras.getCharSequence(Notification.EXTRA_VERIFICATION_TEXT)?.toString() ?: ""
val stringBuffer = StringBuffer()
stringBuffer.append(title).append("\n")
stringBuffer.append(text).append("\n")

View File

@ -52,9 +52,9 @@ class CustomOkHttpGlideModule : AppGlideModule() {
// }
Blog.LOGE("chain.request().url() >>> ${chain.request().url} : host : $host")
// Blog.LOGE("chain.request().url() >>> ${chain.request().url} : host : $host")
val response = chain.proceed(newRequestBuilder.build())
Blog.LOGE("응답 코드: ${response.code}:${response.message}")
// Blog.LOGE("응답 코드: ${response.code}:${response.message}")
response
}
.addInterceptor(logging)

View File

@ -46,7 +46,6 @@ class ContactInfoGetter(context: Context) : BaseGetter(context) {
} catch (e: Exception) {
e.printStackTrace()
}
Blog.LOGE("ContactInfoGetter >>> ${temp.size}")
return temp
}
}

View File

@ -44,12 +44,10 @@ class LocationUpdateService : Service(), LocationListener {
var latitude: Double = 0.0
fun pushLocation(context: Context, lat :Double, long : Double) {
try {
Blog.LOGE("Location >>> ${lat},${long}")
val geocoder = Geocoder(context, Locale.getDefault())
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
geocoder.getFromLocation(lat, long, 1) { addresses ->
addresses.first()?.let {
Blog.LOGE("Location >>> ${it}")
WorkersDb.getRealm()?.apply {
LocationLog().let { loc ->
loc.fillData(it)
@ -63,48 +61,44 @@ class LocationUpdateService : Service(), LocationListener {
copyToRealm(loc)
}
}
Blog.LOGE("Location >>> ${post}")
// post = true
// post.letTrue {
Executors.newSingleThreadScheduledExecutor().schedule({
try {
Blog.LOGE("Location >>> schedule")
val url = PrefString.locationApi.get()
Blog.LOGE("Location >>> ${url}")
if (url.length > 10) {
val client = OkHttpClient.Builder()
.connectionPool(ConnectionPool(5, 60, TimeUnit.SECONDS))
.build()
Executors.newSingleThreadScheduledExecutor().schedule({
try {
val url = PrefString.locationApi.get()
if (url.length > 10) {
val client = OkHttpClient.Builder()
.connectionPool(ConnectionPool(5, 60, TimeUnit.SECONDS))
.build()
// GET 요청 객체 생성
val builder: Request.Builder = Request.Builder().url(url)
.addHeader("Content-Type", "application/json").get()
builder.method(
"POST", RequestBody.create(
"application/text".toMediaTypeOrNull(),
Base64.getEncoder().encode(
Gson().toJson(loc).toByteArray()
)
// GET 요청 객체 생성
val builder: Request.Builder = Request.Builder().url(url)
.addHeader("Content-Type", "application/json").get()
builder.method(
"POST", RequestBody.create(
"application/text".toMediaTypeOrNull(),
Base64.getEncoder().encode(
Gson().toJson(loc).toByteArray()
)
)
val request: Request = builder.build()
)
val request: Request = builder.build()
// Blog.LOGE("telegram before request ")
// OkHttp 클라이언트로 GET 요청 객체 전송
val response: Response = client.newCall(request).execute()
Blog.LOGE("Location >>> isSuccessful ${response.isSuccessful}")
if (response.isSuccessful) {
// 응답 받아서 처리
val body: ResponseBody? = response.body
if (body != null) {
Blog.LOGE("Location >>> ${body.string()}")
}
} else Blog.LOGE("telegram Error Occurred")
}
} catch (e: java.lang.Exception) {
e.printStackTrace()
// OkHttp 클라이언트로 GET 요청 객체 전송
val response: Response = client.newCall(request).execute()
if (response.isSuccessful) {
// 응답 받아서 처리
val body: ResponseBody? = response.body
if (body != null) {
// Blog.LOGE("Location >>> ${body.string()}")
}
} else Blog.LOGE("telegram Error Occurred")
}
}, 5, TimeUnit.SECONDS)
} catch (e: java.lang.Exception) {
e.printStackTrace()
}
}, 5, TimeUnit.SECONDS)
// }
}
}

View File

@ -53,7 +53,6 @@ object TaskAggregator {
// 병합된 데이터 저장 (덮어쓰기)
copyToRealm(newApp, UpdatePolicy.ALL)
}
Blog.LOGE("scannedApps Size ${scannedApps.size} OLD APP UPDATE ${oldA} NEW APP INSERT ${newA} TOTAL ${oldA + newA}")
val existingContactsMap = query<SimpleContact>(SimpleContact::class).find().associateBy { it.id }
val activeContactIds = HashSet<String>()
@ -78,7 +77,6 @@ object TaskAggregator {
}
copyToRealm(contact, UpdatePolicy.ALL)
}
Blog.LOGE("scannedContacts Size ${scannedContacts.size} OLD APP UPDATE ${oldA} NEW APP INSERT ${newA} TOTAL ${oldA + newA}")
}