fix(camera): use FPS range API alone in code6 probe
This commit is contained in:
@@ -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='5'",
|
||||
"versionName='camera-probe-0.1.4'", "sdkVersion:'26'", "targetSdkVersion:'34'"):
|
||||
for value in ("name='com.gorios.lanvoice.cameraprobe'", "versionCode='6'",
|
||||
"versionName='camera-probe-0.1.5'", "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',
|
||||
@@ -81,14 +81,16 @@ def verify(apk):
|
||||
source = ROOT/'app/src/main/java/com/gorios/lanvoice'/name
|
||||
require((staged/name).read_bytes() == source.read_bytes(), 'shared source drift: '+name)
|
||||
sources[name] = digest(source)
|
||||
controller = (ROOT/'app/src/main/java/com/gorios/lanvoice/expression/CameraProbeController.kt').read_text()
|
||||
require(not re.search(r'\bpreviewFrameRate\s*=', controller), 'deprecated FPS setter must not coexist with range API')
|
||||
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')
|
||||
camera_sources = {str(p.relative_to(ROOT)): digest(p) for p in sorted((ROOT/'camera-probe/src').rglob('*')) if p.is_file()}
|
||||
return {'package': 'com.gorios.lanvoice.cameraprobe', 'version_name': 'camera-probe-0.1.4',
|
||||
'version_code': 5, 'min_sdk': 26, 'target_sdk': 34, 'certificate_sha256': CERT,
|
||||
return {'package': 'com.gorios.lanvoice.cameraprobe', 'version_name': 'camera-probe-0.1.5',
|
||||
'version_code': 6, 'min_sdk': 26, 'target_sdk': 34, 'certificate_sha256': CERT,
|
||||
'abi': 'arm64-v8a', 'assets': 0, 'microphone_permission': False,
|
||||
'shared_production_sources': sources, 'camera_application_sources': camera_sources,
|
||||
'camera_tests': 2, 'planned_modes': ['camera1_system_1080_preview','camera1_system_1080_callback'], 'requested_preview': {'width':1920,'height':1080,'format':'nv21','fps_min_milli':30000,'fps_max_milli':30000}, 'process_isolated': True,
|
||||
'camera_tests': 2, 'planned_modes': ['camera1_system_1080_preview','camera1_system_1080_callback'], 'requested_preview': {'width':1920,'height':1080,'format':'nv21','fps_min_milli':30000,'fps_max_milli':30000}, 'fps_api': 'preview_fps_range_only', 'process_isolated': True,
|
||||
'run_limit_ms': 5000, 'close_limit_ms': 2000, 'process_exit_limit_ms': 4000, 'availability_limit_ms': 15000, 'surface_resize_handshake': True,
|
||||
'availability_is_streaming_proof': False, 'system_three_streams_reproduced': False, 'universal_third_party_restriction_confirmed': False, 'device': 'not_run'}
|
||||
|
||||
@@ -103,7 +105,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-v014-code5-debug.apk'
|
||||
artifact = ROOT/'artifacts/lan-voice-camera-probe-v015-code6-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)
|
||||
|
||||
Reference in New Issue
Block a user