@@ -171,31 +171,31 @@ class AirPodsService: Service() {
171171 it.setTextViewText(
172172 R .id.left_battery_widget,
173173 batteryNotification.getBattery().find { it.component == BatteryComponent .LEFT }?.let {
174- if (it.status != BatteryStatus .DISCONNECTED ) {
174+ // if (it.status != BatteryStatus.DISCONNECTED) {
175175 " ${if (it.status == BatteryStatus .CHARGING ) " ⚡" else " " } ${it.level} %"
176- } else {
177- " "
178- }
176+ // } else {
177+ // ""
178+ // }
179179 } ? : " "
180180 )
181181 it.setTextViewText(
182182 R .id.right_battery_widget,
183183 batteryNotification.getBattery().find { it.component == BatteryComponent .RIGHT }?.let {
184- if (it.status != BatteryStatus .DISCONNECTED ) {
184+ // if (it.status != BatteryStatus.DISCONNECTED) {
185185 " ${if (it.status == BatteryStatus .CHARGING ) " ⚡" else " " } ${it.level} %"
186- } else {
187- " "
188- }
186+ // } else {
187+ // ""
188+ // }
189189 } ? : " "
190190 )
191191 it.setTextViewText(
192192 R .id.case_battery_widget,
193193 batteryNotification.getBattery().find { it.component == BatteryComponent .CASE }?.let {
194- if (it.status != BatteryStatus .DISCONNECTED ) {
194+ // if (it.status != BatteryStatus.DISCONNECTED) {
195195 " ${if (it.status == BatteryStatus .CHARGING ) " ⚡" else " " } ${it.level} %"
196- } else {
197- " "
198- }
196+ // } else {
197+ // ""
198+ // }
199199 } ? : " "
200200 )
201201 }
@@ -205,7 +205,7 @@ class AirPodsService: Service() {
205205
206206 fun updateNotificationContent (connected : Boolean , airpodsName : String? = null, batteryList : List <Battery >? = null) {
207207 val notificationManager = getSystemService(NotificationManager ::class .java)
208- val textColor = this .getSharedPreferences(" settings" , MODE_PRIVATE ).getLong(" textColor" , 0 )
208+ // val textColor = this.getSharedPreferences("settings", MODE_PRIVATE).getLong("textColor", 0)
209209 var updatedNotification: Notification ? = null
210210
211211 if (connected) {
@@ -262,23 +262,23 @@ class AirPodsService: Service() {
262262 updatedNotification = NotificationCompat .Builder (this , " background_service_status" )
263263 .setSmallIcon(R .drawable.airpods)
264264 .setContentTitle(""" L: ${batteryList?.find { it.component == BatteryComponent .LEFT }?.let {
265- if (it.status != BatteryStatus .DISCONNECTED ) {
265+ // if (it.status != BatteryStatus.DISCONNECTED) {
266266 " ${if (it.status == BatteryStatus .CHARGING ) " ⚡" else " " } ${it.level} %"
267- } else {
268- " "
269- }
267+ // } else {
268+ // ""
269+ // }
270270 } ? : " " } R: ${batteryList?.find { it.component == BatteryComponent .RIGHT }?.let {
271- if (it.status != BatteryStatus .DISCONNECTED ) {
271+ // if (it.status != BatteryStatus.DISCONNECTED) {
272272 " ${if (it.status == BatteryStatus .CHARGING ) " ⚡" else " " } ${it.level} %"
273- } else {
274- " "
275- }
273+ // } else {
274+ // ""
275+ // }
276276 } ? : " " } C: ${batteryList?.find { it.component == BatteryComponent .CASE }?.let {
277- if (it.status != BatteryStatus .DISCONNECTED ) {
277+ // if (it.status != BatteryStatus.DISCONNECTED) {
278278 " ${if (it.status == BatteryStatus .CHARGING ) " ⚡" else " " } ${it.level} %"
279- } else {
280- " "
281- }
279+ // } else {
280+ // ""
281+ // }
282282 } ? : " " } """ )
283283 .setCategory(Notification .CATEGORY_SERVICE )
284284 .setPriority(NotificationCompat .PRIORITY_LOW )
0 commit comments