feat(location): durable offline GPS outbox and hourly daily uploads v0.1.50

This commit is contained in:
Codex
2026-10-19 00:57:33 +08:00
parent cd3ed420a2
commit e3afb2e07f
26 changed files with 697 additions and 135 deletions
+6 -1
View File
@@ -44,7 +44,7 @@ class AndroidLocationContractTests(unittest.TestCase):
manifest = ET.parse(ANDROID/'AndroidManifest.xml').getroot()
service = next(s for s in manifest.findall('application/service') if s.get(NS+'name') == '.LocationService')
self.assertEqual(service.get(NS+'exported'), 'false')
self.assertEqual(service.get(NS+'foregroundServiceType'), 'location')
self.assertEqual(set(service.get(NS+'foregroundServiceType').split('|')), {'location','dataSync'})
boot = (ANDROID/'src/cn/ucvl/zhaodisplay/BootReceiver.java').read_text()
self.assertNotIn('LocationService', boot)
self.assertIn('phoneMode', boot)
@@ -52,6 +52,11 @@ class AndroidLocationContractTests(unittest.TestCase):
self.assertNotIn('WebView', ui)
self.assertIn('共享我的位置', ui)
self.assertIn('new int[]{10,60,300}', ui)
self.assertIn('自定义小时 / 天',ui)
self.assertIn('LocationCadence.custom',ui)
queue=(ANDROID/'src/cn/ucvl/zhaodisplay/LocationQueue.java').read_text(encoding='utf-8')
for contract in ('AndroidKeyStore','AES/GCM/NoPadding','MAX_POINTS=50000','MAX_DATABASE_BYTES','batch.digest.equals','"verified".equals(state)','db.beginTransaction()'):
self.assertIn(contract,queue)
self.assertIn('consent.isChecked()', ui)
def test_map_uses_first_party_tiles_and_never_exposes_pairing_token(self):