additional linting
This commit is contained in:
@@ -306,7 +306,7 @@ class CallAudioManager(
|
||||
.any {
|
||||
it.type == AudioDeviceInfo.TYPE_BLUETOOTH_SCO ||
|
||||
it.type == AudioDeviceInfo.TYPE_BLUETOOTH_A2DP ||
|
||||
it.type == AudioDeviceInfo.TYPE_BLE_HEADSET
|
||||
(Build.VERSION.SDK_INT >= Build.VERSION_CODES.S && it.type == AudioDeviceInfo.TYPE_BLE_HEADSET)
|
||||
}
|
||||
} catch (_: Exception) {
|
||||
false
|
||||
|
||||
@@ -36,6 +36,7 @@ import androidx.activity.enableEdgeToEdge
|
||||
import androidx.activity.result.contract.ActivityResultContracts
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import com.vitorpamplona.amethyst.R
|
||||
import com.vitorpamplona.amethyst.commons.call.CallState
|
||||
@@ -387,7 +388,7 @@ class CallActivity : AppCompatActivity() {
|
||||
addAction(ACTION_PIP_HANGUP)
|
||||
addAction(ACTION_PIP_TOGGLE_MUTE)
|
||||
}
|
||||
registerReceiver(pipActionReceiver, filter, RECEIVER_NOT_EXPORTED)
|
||||
ContextCompat.registerReceiver(this, pipActionReceiver, filter, ContextCompat.RECEIVER_NOT_EXPORTED)
|
||||
}
|
||||
|
||||
private fun unregisterPipReceiver() {
|
||||
|
||||
+6
-1
@@ -88,6 +88,7 @@ import com.vitorpamplona.amethyst.ui.screen.loggedIn.AccountViewModel
|
||||
import kotlinx.collections.immutable.toImmutableList
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.withContext
|
||||
import java.util.Locale
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@Composable
|
||||
@@ -742,5 +743,9 @@ private suspend fun probeSourceMetadata(
|
||||
private fun formatSize(bytes: Long): String {
|
||||
if (bytes <= 0) return "—"
|
||||
val mb = bytes.toDouble() / (1024 * 1024)
|
||||
return if (mb >= 1) String.format("%.1f MB", mb) else String.format("%.0f KB", bytes / 1024.0)
|
||||
return if (mb >= 1) {
|
||||
String.format(Locale.getDefault(), "%.1f MB", mb)
|
||||
} else {
|
||||
String.format(Locale.getDefault(), "%.0f KB", bytes / 1024.0)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -558,7 +558,7 @@
|
||||
<string name="nest_disconnect">断开连接</string>
|
||||
<string name="nest_mute">静音</string>
|
||||
<string name="nest_unmute">取消静音</string>
|
||||
<string name="nest_connecting">正在连接...</string>
|
||||
<string name="nest_connecting">正在连接…</string>
|
||||
<string name="nest_connecting_resolving">正在解析房间</string>
|
||||
<string name="nest_connecting_transport">正在打开传输</string>
|
||||
<string name="nest_connecting_handshake">正在协商音频</string>
|
||||
|
||||
+1
-1
@@ -59,7 +59,7 @@ class Nip06CommonTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore()
|
||||
@Ignore
|
||||
fun fromSeedNip06FromSnort() {
|
||||
val privateKeyNsec = nip06.privateKeyFromMnemonic(snortTest).toHexKey()
|
||||
assertEquals("nsec1ppw9ltr2x9qwg9a2qnmgv98tfruy2ejnja7me76mwmsreu3s8u2sscj5nt", privateKeyNsec)
|
||||
|
||||
Reference in New Issue
Block a user