Release v0.1.54: scheduled location sessions and paged voice delivery history

This commit is contained in:
Codex
2026-10-19 07:55:36 +08:00
parent ad2614719b
commit 4dc3e2fb9f
28 changed files with 481 additions and 153 deletions
@@ -18,7 +18,7 @@ public class PhonePreviewActivity extends LocationActivity {
// Limit the actual Activity layout to a phone viewport without changing display configuration.
((android.view.ViewGroup)phone.getParent()).removeView(phone);FrameLayout outer=new FrameLayout(this);outer.setBackgroundColor(PhoneStyle.PAPER);
int width="narrow".equals(mode)||"large".equals(mode)?320:390;outer.addView(phone,new FrameLayout.LayoutParams(style.dp(width),style.dp("narrow".equals(mode)?640:844),Gravity.TOP|Gravity.CENTER_HORIZONTAL));previewRoot=phone;setContentView(outer);
new Handler().postDelayed(()->{try{exercise();if(mode.equals("history"))exerciseHistory();else save();}catch(Exception e){throw new RuntimeException(e);}},1800);
new Handler().postDelayed(()->{try{exercise();if(mode.equals("history"))exerciseHistory();else if(mode.equals("cycles"))LocationCycleChecks.run(this,this::save);else if(mode.equals("storage")){QueueStorageChecks.run(this);save();}else save();}catch(Exception e){throw new RuntimeException(e);}},1800);
}
void check(boolean condition,String message){if(!condition)throw new AssertionError(message);}
void exercise()throws Exception{
@@ -34,6 +34,11 @@ public class PhonePreviewActivity extends LocationActivity {
phone.nav.getChildAt(0).performClick();check(phone.tab==0,"family navigation");
check(!prefs.getBoolean("active",false),"navigation never enables sharing");
}
if(mode.equals("modes")){
selectTab(2);sharingMode.setSelection(1);check(samplePeriodSeconds()==10&&uploadPeriod()==10,"realtime fixes both cadences to ten seconds");
sharingMode.setSelection(0);check(samplePeriodSeconds()==300&&uploadPeriod()==7200,"scheduled controls retain independent cadences");
check(!prefs.getBoolean("active",false),"choosing a mode never enables sharing");
}
if(mode.equals("mine")||mode.equals("large"))selectTab(2);
else if(mode.equals("voice")||mode.equals("recording")||mode.equals("cancel")||mode.equals("narrow")||mode.equals("history")){
selectTab(1);voice.ui.removeCallbacks(voice.visual);VoiceSurface v=voice.page();v.expand.setVisibility(View.GONE);v.destination(new JSONObject("{\"name\":\"家庭显示终端\",\"kind\":\"display\",\"online\":true}"),true);v.recipient.setText("家庭显示终端");v.status.setText("界面验收 · 不录音、不发送语音");