split compose functions, and organize stuff

This commit is contained in:
Kavish Devar
2024-12-13 01:41:37 +05:30
parent 7b03a7e9f0
commit 809818f60d
32 changed files with 1733 additions and 1273 deletions

View File

@@ -0,0 +1,25 @@
package me.kavishdevar.aln.receivers
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import me.kavishdevar.aln.AirPodsService
class BootReceiver: BroadcastReceiver() {
override fun onReceive(context: Context?, intent: Intent?) {
when (intent?.action) {
Intent.ACTION_MY_PACKAGE_REPLACED -> try { context?.startForegroundService(
Intent(
context,
AirPodsService::class.java
)
) } catch (e: Exception) { e.printStackTrace() }
Intent.ACTION_BOOT_COMPLETED -> try { context?.startForegroundService(
Intent(
context,
AirPodsService::class.java
)
) } catch (e: Exception) { e.printStackTrace() }
}
}
}