Before package rename: all hiddify references cleaned in Kotlin
This commit is contained in:
@@ -14,7 +14,7 @@ class ActiveGroupsChannel(private val scope: CoroutineScope) : FlutterPlugin,
|
||||
CommandClient.Handler {
|
||||
companion object {
|
||||
const val TAG = "A/ActiveGroupsChannel"
|
||||
const val CHANNEL = "com.hiddify.app/active-groups"
|
||||
const val CHANNEL = "com.umbrix.app/active-groups"
|
||||
val gson = Gson()
|
||||
}
|
||||
|
||||
|
||||
@@ -12,8 +12,8 @@ class EventHandler : FlutterPlugin {
|
||||
|
||||
companion object {
|
||||
const val TAG = "A/EventHandler"
|
||||
const val SERVICE_STATUS = "com.hiddify.app/service.status"
|
||||
const val SERVICE_ALERTS = "com.hiddify.app/service.alerts"
|
||||
const val SERVICE_STATUS = "com.umbrix.app/service.status"
|
||||
const val SERVICE_ALERTS = "com.umbrix.app/service.alerts"
|
||||
}
|
||||
|
||||
private var statusChannel: EventChannel? = null
|
||||
|
||||
@@ -12,7 +12,7 @@ import kotlinx.coroutines.CoroutineScope
|
||||
class GroupsChannel(private val scope: CoroutineScope) : FlutterPlugin, CommandClient.Handler {
|
||||
companion object {
|
||||
const val TAG = "A/GroupsChannel"
|
||||
const val CHANNEL = "com.hiddify.app/groups"
|
||||
const val CHANNEL = "com.umbrix.app/groups"
|
||||
val gson = Gson()
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ class LogHandler : FlutterPlugin {
|
||||
|
||||
companion object {
|
||||
const val TAG = "A/LogHandler"
|
||||
const val SERVICE_LOGS = "com.hiddify.app/service.logs"
|
||||
const val SERVICE_LOGS = "com.umbrix.app/service.logs"
|
||||
}
|
||||
|
||||
private lateinit var logsChannel: EventChannel
|
||||
|
||||
@@ -21,7 +21,7 @@ class MethodHandler(private val scope: CoroutineScope) : FlutterPlugin,
|
||||
|
||||
companion object {
|
||||
const val TAG = "A/MethodHandler"
|
||||
const val channelName = "com.hiddify.app/method"
|
||||
const val channelName = "com.umbrix.app/method"
|
||||
|
||||
enum class Trigger(val method: String) {
|
||||
Setup("setup"),
|
||||
|
||||
@@ -33,7 +33,7 @@ class PlatformSettingsHandler : FlutterPlugin, MethodChannel.MethodCallHandler,
|
||||
private lateinit var ignoreRequestResult: MethodChannel.Result
|
||||
|
||||
companion object {
|
||||
const val channelName = "com.hiddify.app/platform"
|
||||
const val channelName = "com.umbrix.app/platform"
|
||||
|
||||
const val REQUEST_IGNORE_BATTERY_OPTIMIZATIONS = 44
|
||||
val gson = Gson()
|
||||
|
||||
@@ -11,7 +11,7 @@ import kotlinx.coroutines.CoroutineScope
|
||||
class StatsChannel(private val scope: CoroutineScope) : FlutterPlugin, CommandClient.Handler{
|
||||
companion object {
|
||||
const val TAG = "A/StatsChannel"
|
||||
const val STATS_CHANNEL = "com.hiddify.app/stats"
|
||||
const val STATS_CHANNEL = "com.umbrix.app/stats"
|
||||
}
|
||||
|
||||
private val commandClient =
|
||||
|
||||
@@ -51,7 +51,7 @@ class ServiceNotification(private val status: MutableLiveData<Status>, private v
|
||||
NotificationCompat.Builder(service, notificationChannel)
|
||||
.setShowWhen(false)
|
||||
.setOngoing(true)
|
||||
.setContentTitle("Hiddify")
|
||||
.setContentTitle("Umbrix")
|
||||
.setOnlyAlertOnce(true)
|
||||
.setSmallIcon(R.drawable.ic_stat_logo)
|
||||
.setCategory(NotificationCompat.CATEGORY_SERVICE)
|
||||
@@ -84,13 +84,13 @@ class ServiceNotification(private val status: MutableLiveData<Status>, private v
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
Application.notification.createNotificationChannel(
|
||||
NotificationChannel(
|
||||
notificationChannel, "hiddify service", NotificationManager.IMPORTANCE_LOW
|
||||
notificationChannel, "umbrix service", NotificationManager.IMPORTANCE_LOW
|
||||
)
|
||||
)
|
||||
}
|
||||
service.startForeground(
|
||||
notificationId, notificationBuilder
|
||||
.setContentTitle(profileName.takeIf { it.isNotBlank() } ?: "Hiddify")
|
||||
.setContentTitle(profileName.takeIf { it.isNotBlank() } ?: "Umbrix")
|
||||
.setContentText(service.getString(contentTextId)).build()
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.umbrix.app.constant
|
||||
|
||||
object Action {
|
||||
const val SERVICE = "com.hiddify.app.SERVICE"
|
||||
const val SERVICE_CLOSE = "com.hiddify.app.SERVICE_CLOSE"
|
||||
const val SERVICE_RELOAD = "com.hiddify.app.sfa.SERVICE_RELOAD"
|
||||
const val SERVICE = "com.umbrix.app.SERVICE"
|
||||
const val SERVICE_CLOSE = "com.umbrix.app.SERVICE_CLOSE"
|
||||
const val SERVICE_RELOAD = "com.umbrix.app.sfa.SERVICE_RELOAD"
|
||||
}
|
||||
Reference in New Issue
Block a user