feat(android): warm voice interface and custom sampling up to one day v0.1.51

This commit is contained in:
Codex
2026-10-19 01:19:28 +08:00
parent e3afb2e07f
commit 0a7c4d9b96
28 changed files with 401 additions and 107 deletions
+11 -1
View File
@@ -51,7 +51,9 @@ class AndroidLocationContractTests(unittest.TestCase):
ui = (ANDROID/'src/cn/ucvl/zhaodisplay/LocationActivity.java').read_text(encoding='utf-8')
self.assertNotIn('WebView', ui)
self.assertIn('共享我的位置', ui)
self.assertIn('new int[]{10,60,300}', ui)
self.assertIn('自定义采集间隔', ui)
self.assertIn('LocationCadence.customSample', ui)
self.assertIn('setSamplePeriod(result.optInt', ui)
self.assertIn('自定义小时 / 天',ui)
self.assertIn('LocationCadence.custom',ui)
queue=(ANDROID/'src/cn/ucvl/zhaodisplay/LocationQueue.java').read_text(encoding='utf-8')
@@ -59,6 +61,14 @@ class AndroidLocationContractTests(unittest.TestCase):
self.assertIn(contract,queue)
self.assertIn('consent.isChecked()', ui)
def test_voice_has_full_screen_large_controls_and_real_amplitude(self):
panel=(ANDROID/'src/cn/ucvl/zhaodisplay/VoicePanel.java').read_text(encoding='utf-8')
surface=(ANDROID/'src/cn/ucvl/zhaodisplay/VoiceSurface.java').read_text(encoding='utf-8')
for text in ('setLayout(-1,-1)','getMaxAmplitude()','VoiceGesture.sendAtLimit(cancelled)','ACTION_CANCEL:finish(false)','view.full','stopPlayer("rejected")'):
self.assertIn(text,panel)
for text in ('上滑取消','已打开 App','setContentDescription'):
self.assertIn(text,surface)
def test_map_uses_first_party_tiles_and_never_exposes_pairing_token(self):
source = (ANDROID/'src/cn/ucvl/zhaodisplay/LocationMapView.java').read_text(encoding='utf-8')
for text in ('https://zhao.ucvl.cn/maps/phone','shouldInterceptRequest','setGeolocationEnabled(false)','setAllowFileAccess(false)','JSONObject.quote','setItems(new JSONArray())'):