fix: add legacy-compatible Android phone link

This commit is contained in:
zhy200308
2026-08-12 16:40:43 +08:00
parent 2ff0741fff
commit ccaaab7002
12 changed files with 243 additions and 49 deletions
+5 -1
View File
@@ -13,6 +13,7 @@ gray=(ROOT/'android/app/src/main/java/com/qft/optical/GrayFrame.kt').read_text()
assert re.search(r'minSdk\s*=\s*24',gradle)
assert 'WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="28"' in manifest
assert 'ACCESS_FINE_LOCATION" android:maxSdkVersion="32"' in manifest and 'NEARBY_WIFI_DEVICES' in manifest
assert 'android.hardware.wifi.direct' in manifest
assert 'networkSecurityConfig="@xml/network_security_config"' in manifest and 'cleartextTrafficPermitted="true"' in security
assert 'Build.VERSION.SDK_INT >= 29' in wifi and 'connectLegacy' in wifi and 'subnetEndpoints' in wifi and 'directedBroadcast' in wifi
assert 'MAX_WORKERS = 8' in upload and 'QFTDISC2:' in upload
@@ -27,9 +28,12 @@ assert 'unsupportedHotspot' in main and 'pair.copy(wifi = null)' in main
assert 'probeConnectedNetwork' in upload and 'workers = 48' in upload
assert 'awaitGatewayEndpoints' not in main
assert 'QFTPHONE2:' in (ROOT/'android/app/src/main/java/com/qft/optical/PairingProtocol.kt').read_text()
assert 'startLocalOnlyHotspot' in phone_hotspot and 'PhoneShareServer.create' in main
assert 'WifiP2pManager' in phone_hotspot and 'createGroup' in phone_hotspot
assert 'GROUP_OWNER_BAND_2GHZ' in phone_hotspot and 'setNetworkName("DIRECT-QF-' in phone_hotspot
assert 'startLocalOnlyHotspot' in phone_hotspot and 'Build.VERSION.SDK_INT < 26' not in main
assert '/qft/phone/manifest' in phone_server and '/qft/phone/download/' in phone_server
assert 'startDownloadsFromPhone' in main and 'downloadPath = item.path' in main
assert 'downloadPath.startsWith("/qft/phone/download/")' in download and 'else RANGE_WORKERS' in download
assert 'phoneQrSidePx(windowWidth, windowHeight' in main
assert 'LinearLayout.LayoutParams(qrSide, qrSide)' in main
assert 'PhoneQr.render(encoded, 720)' not in main
+1
View File
@@ -45,6 +45,7 @@ assert 'const val PREFIX_PHONE_V2 = "QFTPHONE2:"' in pairing
assert '"m" -> TransferDirection.PHONE_TO_PHONE' in pairing
assert 'require(item.getString("path") == expectedPath)' in server
assert 'headers["x-qft-token"] != session' in server
assert 'phoneShareSha256Exact' in server and 'require(input.read() < 0)' in server
assert 'Range: bytes=<start>-<end>' not in server # implementation, not documentation placeholder
assert 'baseUrl + pairing.downloadPath' in download
assert 'digest(downloadPath.toByteArray' in download