This commit is contained in:
Albert Vaca Cintora
2025-10-27 01:18:23 +01:00
parent 5f876df5db
commit ebc9006e04
5 changed files with 6 additions and 7 deletions

View File

@@ -242,7 +242,7 @@ class BackgroundService : Service() {
try {
startForeground(FOREGROUND_NOTIFICATION_ID, createForegroundNotification(), ServiceInfo.FOREGROUND_SERVICE_TYPE_CONNECTED_DEVICE)
} catch (e: IllegalStateException) { // To catch ForegroundServiceStartNotAllowedException
Log.w("BackgroundService", "Couldn't startForeground", e);
Log.w("BackgroundService", "Couldn't startForeground", e)
return START_STICKY
}
}

View File

@@ -272,7 +272,7 @@ public final class CollectionsBackport {
}
public Iterator<E> iterator() {
return new Iterator<E>() {
return new Iterator<>() {
private final Iterator<? extends E> i = c.iterator();
public boolean hasNext() {
@@ -722,7 +722,7 @@ public final class CollectionsBackport {
}
public Iterator<Map.Entry<K, V>> iterator() {
return new Iterator<Map.Entry<K, V>>() {
return new Iterator<>() {
private final Iterator<? extends Map.Entry<? extends K, ? extends V>> i = c.iterator();
public boolean hasNext() {

View File

@@ -23,9 +23,9 @@ open class DeviceItem(
binding.listItemEntryIcon.setImageDrawable(device.icon)
binding.listItemEntryTitle.text = device.name
binding.getRoot().setOnClickListener(View.OnClickListener { v1: View? ->
binding.getRoot().setOnClickListener { v1: View? ->
callback(device)
})
}
return binding.getRoot()
}

View File

@@ -215,7 +215,7 @@ class PairingFragment : BaseFragment<DevicesListBinding>() {
Log.w("PairingFragment", "Devices:" + allDevices.toList().toString())
break
}
seenNames.add(device.name);
seenNames.add(device.name)
}
connectedSection = SectionItem(res.getString(R.string.category_connected_devices))

View File

@@ -5,7 +5,6 @@
*/
package org.kde.kdeconnect
import io.mockk.MockKAnnotations
import io.mockk.mockk
import org.json.JSONException
import org.junit.Assert