You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
val radareOffsetFinder =RadareOffsetFinder(context)
1225
+
val success = radareOffsetFinder.findSdpOffset() ?:false
1226
+
if (success) {
1227
+
Toast.makeText(context, "Found offset please restart the Bluetooth process", Toast.LENGTH_LONG).show()
1228
+
}
1229
+
} else {
1230
+
RadareOffsetFinder.clearSdpOffset()
1231
+
}
1232
+
isProcessingSdp =false
1233
+
}
1234
+
}
1235
+
},
1236
+
verticalAlignment =Alignment.CenterVertically
1237
+
) {
1238
+
Column(
1239
+
modifier =Modifier
1240
+
.weight(1f)
1241
+
.padding(vertical =8.dp)
1242
+
.padding(end =4.dp)
1243
+
) {
1244
+
Text(
1245
+
text ="Act as an Apple device",
1246
+
fontSize =16.sp,
1247
+
color = textColor
1248
+
)
1249
+
Spacer(modifier =Modifier.height(4.dp))
1250
+
Text(
1251
+
text ="Enables multi-device connectivity and Accessibility features like customizing transparency mode (amplification, tone, ambient noise reduction, conversation boost, and EQ)",
1252
+
fontSize =14.sp,
1253
+
color = textColor.copy(0.6f),
1254
+
lineHeight =16.sp,
1255
+
)
1256
+
if (actAsAppleDevice) {
1257
+
Spacer(modifier =Modifier.height(8.dp))
1258
+
Text(
1259
+
text ="Might be unstable!! A maximum of two devices can be connected to your AirPods. If you are using with an Apple device like an iPad or Mac, then please connect that device first and then your Android.",
1260
+
fontSize =12.sp,
1261
+
color =MaterialTheme.colorScheme.error,
1262
+
lineHeight =14.sp,
1263
+
)
1264
+
}
1265
+
}
1266
+
1267
+
StyledSwitch(
1268
+
checked = actAsAppleDevice,
1269
+
onCheckedChange = {
1270
+
if (!isProcessingSdp) {
1271
+
actAsAppleDevice = it
1272
+
isProcessingSdp =true
1273
+
coroutineScope.launch {
1274
+
if (it) {
1275
+
val radareOffsetFinder =RadareOffsetFinder(context)
1276
+
val success = radareOffsetFinder.findSdpOffset() ?:false
1277
+
if (success) {
1278
+
Toast.makeText(context, "Found offset please restart the Bluetooth process", Toast.LENGTH_LONG).show()
0 commit comments