Skip to content

Commit

Permalink
Fix server and mac address
Browse files Browse the repository at this point in the history
  • Loading branch information
kmod-midori committed Jan 3, 2025
1 parent 93e22bd commit acc0610
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
12 changes: 12 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@
-keepattributes LineNumberTable,SourceFile
-renamesourcefileattribute SourceFile

-keepattributes Signature,InnerClasses
-keepclasseswithmembers class io.netty.** {
*;
}
-keepnames class io.netty.** {
*;
}

-keep class moe.reimu.catshare.services.* {
*;
}

# Please add these rules to your existing keep rules in order to suppress warnings.
# This is generated automatically by the Android Gradle plugin.
-dontwarn com.aayushatharva.brotli4j.Brotli4jLoader
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,13 +355,12 @@ class P2pSenderService : BaseP2pService() {
try {
groupInfoFuture = CompletableDeferred()
p2pManager.createGroupSuspend(p2pChannel, p2pConfig)
val newGroupInfo = groupInfoFuture.awaitWithTimeout(
groupInfoFuture.awaitWithTimeout(
Duration.ofSeconds(5),
"Waiting for P2P group info"
)

val p2pMac =
ShizukuUtils.getMacAddress(newGroupInfo.`interface`) ?: "02:00:00:00:00:00"
val p2pMac = ShizukuUtils.getMacAddress("p2p0") ?: "02:00:00:00:00:00"
Log.d(TAG, "Advertised local MAC address: $p2pMac")

withTimeoutReason(Duration.ofSeconds(10), "BLE operations") {
Expand Down

0 comments on commit acc0610

Please sign in to comment.