@@ -14,6 +14,7 @@ import androidx.core.app.NotificationCompat
1414import androidx.core.app.NotificationManagerCompat
1515import com.github.kr328.clash.common.compat.getColorCompat
1616import com.github.kr328.clash.common.compat.pendingIntentFlags
17+ import com.github.kr328.clash.common.compat.startForegroundCompat
1718import com.github.kr328.clash.common.log.Log
1819import com.github.kr328.clash.common.util.intent
1920import com.github.kr328.clash.core.model.LogMessage
@@ -130,17 +131,17 @@ class LogcatService : Service(), CoroutineScope by CoroutineScope(Dispatchers.De
130131 NotificationChannelCompat .Builder (
131132 CHANNEL_ID ,
132133 NotificationManagerCompat .IMPORTANCE_DEFAULT
133- ).setName(getString(R .string.clash_logcat)).build()
134+ ).setName(getString(com.github.kr328.clash.design. R .string.clash_logcat)).build()
134135 )
135136 }
136137
137138 private fun showNotification () {
138139 val notification = NotificationCompat
139140 .Builder (this , CHANNEL_ID )
140- .setSmallIcon(R .drawable.ic_logo_service)
141- .setColor(getColorCompat(R .color.color_clash_light))
142- .setContentTitle(getString(R .string.clash_logcat))
143- .setContentText(getString(R .string.running))
141+ .setSmallIcon(com.github.kr328.clash.service. R .drawable.ic_logo_service)
142+ .setColor(getColorCompat(com.github.kr328.clash.design. R .color.color_clash_light))
143+ .setContentTitle(getString(com.github.kr328.clash.design. R .string.clash_logcat))
144+ .setContentText(getString(com.github.kr328.clash.design. R .string.running))
144145 .setContentIntent(
145146 PendingIntent .getActivity(
146147 this ,
@@ -152,7 +153,7 @@ class LogcatService : Service(), CoroutineScope by CoroutineScope(Dispatchers.De
152153 )
153154 .build()
154155
155- startForeground (R .id.nf_logcat_status, notification)
156+ startForegroundCompat (R .id.nf_logcat_status, notification)
156157 }
157158
158159 companion object {
0 commit comments