fix(android): hide system bars in avatar and camera apps

This commit is contained in:
zenord
2026-10-14 10:35:40 +08:00
parent 5f8512db69
commit 4161a2a7a1
10 changed files with 98 additions and 13 deletions
+1 -1
View File
@@ -53,7 +53,7 @@ def publish(report,output,version,network_actions=False):
flags += ['-P'+name+'=true' for name in ('avatarFullActionCandidate','avatarPlaybackClockFix','avatarStartupFix','presenceCandidate','faceDiagnosticsFix','cameraCompatibilityFix','cameraDirectYuv','cameraPreviewStream','cameraProbeDiagnostic')]
subprocess.run([str(ROOT/'scripts/build.sh'),'assembleDebug','compileDebugAndroidTestKotlin',*flags],check=True,cwd=ROOT)
built=ROOT/'app/build/outputs/apk/debug/app-debug.apk';badge=pack.badging(built)
version_name='0.7.13' if network_actions else '0.7.12'
version_name='0.7.14' if network_actions else '0.7.12'
for value in ("name='com.gorios.lanvoice'",f"versionCode='{version}'",f"versionName='{version_name}'","sdkVersion:'26'","targetSdkVersion:'34'"):
require(value in badge,'APK metadata: '+value)
require(re.search(r'^native-code: (.+)$',badge,re.M)[1].strip()=="'arm64-v8a'",'APK ABI')
+6 -6
View File
@@ -14,7 +14,7 @@ ROOT = Path(__file__).resolve().parents[1]
TOOLS = Path('/home/ubuntu/android-build/sdk/build-tools/34.0.0')
CERT = 'b9608336bc1ed1de3269bb4594f9fe718daaa5439511c5187aa385d2b799dcf1'
SHARED = (
'CameraDiagnosticsActivity.kt', 'expression/CameraProbeController.kt',
'CameraDiagnosticsActivity.kt', 'ImmersiveMode.kt', 'expression/CameraProbeController.kt',
'expression/CameraProbeState.kt', 'expression/CameraPreviewSurface.kt',
'expression/FaceDiagnostics.kt', 'expression/FaceCueRules.kt',
'expression/ExpressionRules.kt', 'expression/ExpressionState.kt',
@@ -32,8 +32,8 @@ def digest(path):
def verify(apk):
badge = subprocess.check_output([str(TOOLS/'aapt'), 'dump', 'badging', str(apk)], text=True)
for value in ("name='com.gorios.lanvoice.cameraprobe'", "versionCode='1'",
"versionName='camera-probe-0.1.0'", "sdkVersion:'26'", "targetSdkVersion:'34'"):
for value in ("name='com.gorios.lanvoice.cameraprobe'", "versionCode='2'",
"versionName='camera-probe-0.1.1'", "sdkVersion:'26'", "targetSdkVersion:'34'"):
require(value in badge, 'APK metadata: '+value)
permissions = set(re.findall(r"^uses-permission: name='([^']+)'", badge, re.M))
require(permissions == {'android.permission.CAMERA', 'android.permission.INTERNET',
@@ -72,8 +72,8 @@ def verify(apk):
sources[name] = digest(source)
trust = ROOT/'camera-probe/build/generated/cameraTrust/res/raw/gateway_cert.pem'
require(trust.read_bytes() == (ROOT/'app/src/main/res/raw/gateway_cert.pem').read_bytes(), 'gateway trust drift')
return {'package': 'com.gorios.lanvoice.cameraprobe', 'version_name': 'camera-probe-0.1.0',
'version_code': 1, 'min_sdk': 26, 'target_sdk': 34, 'certificate_sha256': CERT,
return {'package': 'com.gorios.lanvoice.cameraprobe', 'version_name': 'camera-probe-0.1.1',
'version_code': 2, 'min_sdk': 26, 'target_sdk': 34, 'certificate_sha256': CERT,
'abi': 'arm64-v8a', 'assets': 0, 'microphone_permission': False,
'shared_production_sources': sources, 'camera_tests': 7, 'device': 'not_run'}
@@ -88,7 +88,7 @@ def main():
subprocess.run([str(ROOT/'scripts/build.sh'), ':camera-probe:assembleDebug'], cwd=ROOT, check=True)
built = ROOT/'camera-probe/build/outputs/apk/debug/camera-probe-debug.apk'
report = verify(built)
artifact = ROOT/'artifacts/lan-voice-camera-probe-v010-code1-debug.apk'
artifact = ROOT/'artifacts/lan-voice-camera-probe-v011-code2-debug.apk'
require(not artifact.exists() and not artifact.with_suffix('.apk.sha256').exists(), 'published camera version occupied')
with artifact.open('xb') as target, built.open('rb') as source:
shutil.copyfileobj(source, target)