feat: add typed data and views with scoped device power
This commit is contained in:
@@ -45,7 +45,7 @@ class AndroidLocationContractTests(unittest.TestCase):
|
||||
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(set(service.get(NS+'foregroundServiceType').split('|')), {'location','dataSync'})
|
||||
boot = (ANDROID/'src/cn/ucvl/zhaodisplay/BootReceiver.java').read_text()
|
||||
boot = (ANDROID/'src/cn/ucvl/zhaodisplay/BootReceiver.java').read_text(encoding='utf-8')
|
||||
self.assertNotIn('LocationService', boot)
|
||||
self.assertIn('phoneMode', boot)
|
||||
ui = (ANDROID/'src/cn/ucvl/zhaodisplay/LocationActivity.java').read_text(encoding='utf-8')
|
||||
@@ -72,24 +72,24 @@ class AndroidLocationContractTests(unittest.TestCase):
|
||||
|
||||
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())'):
|
||||
for text in ('ServerEndpoint.MAP_PHONE','ServerEndpoint.mapResource','ServerEndpoint.mapPage','shouldInterceptRequest','setGeolocationEnabled(false)','setAllowFileAccess(false)','JSONObject.quote','setItems(new JSONArray())'):
|
||||
self.assertIn(text,source)
|
||||
self.assertNotIn('addJavascriptInterface',source)
|
||||
self.assertNotIn('getSharedPreferences',source)
|
||||
|
||||
def test_phone_three_tabs_use_native_cards_and_keep_sharing_explicit(self):
|
||||
def test_phone_five_tabs_use_native_cards_and_keep_sharing_explicit(self):
|
||||
source=(ANDROID/'src/cn/ucvl/zhaodisplay/LocationActivity.java').read_text(encoding='utf-8')
|
||||
layout=(ANDROID/'src/cn/ucvl/zhaodisplay/PhoneLayout.java').read_text(encoding='utf-8')
|
||||
for value in ('"位置","沟通","我的"','scrolls[i].setVisibility(i==next?VISIBLE:GONE)','setContentDescription','共享我的位置'):
|
||||
for value in ('"位置","家庭","设备","沟通","我的"','scrolls[i].setVisibility(i==next?VISIBLE:GONE)','setContentDescription','共享我的位置'):
|
||||
self.assertIn(value,layout)
|
||||
for value in ('voice.finish(false);phone.select(tab)','if(content.getParent()==scroll)','开启共享后生效','consent.setChecked(false)','showDetail("允许谁查看"','setLayout(-1,-1)'):
|
||||
for value in ('phone.select(tab);tabChanged(tab)','void tabChanged(int tab){voice.finish(false);','if(content.getParent()==scroll)','开启共享后生效','consent.setChecked(false)','showDetail("允许谁查看"','setLayout(-1,-1)'):
|
||||
self.assertIn(value,source)
|
||||
self.assertNotIn('startService',layout)
|
||||
self.assertNotIn('https://',layout)
|
||||
self.assertNotIn('dockSlot',layout)
|
||||
self.assertIn('sortPositions(response.optJSONArray',source)
|
||||
self.assertIn('voice.dock.receiverCard',source)
|
||||
self.assertIn('voice.communication(tab==1)',source)
|
||||
self.assertIn('voice.communication(tab==PhoneLayout.COMMUNICATION)',source)
|
||||
|
||||
def test_voice_page_uses_explicit_receiver_consent_and_cancels_on_navigation(self):
|
||||
source=(ANDROID/'src/cn/ucvl/zhaodisplay/VoicePanel.java').read_text(encoding='utf-8')
|
||||
|
||||
Reference in New Issue
Block a user