[Feat] (Android): trace APK boots to POST; bottom nav bar switches to the render server

The trace flavor manifest removed PostActivity and made ServerControlActivity
the launcher, so the APK opened straight into the render server screen. Keep
both screens: PostActivity is the launcher again, and a bottom navigation bar
(NavBar, plugin flavor unaffected) switches between them via
FLAG_ACTIVITY_REORDER_TO_FRONT with transitions suppressed, so each screen
keeps its state. ServerControlActivity is singleTop now and handles extras in
onNewIntent so adb-driven starts still work. The POST screen also shows an
indeterminate progress bar while the self-test runs.
This commit is contained in:
swung0x48 committed 2026-09-28 21:06:44 -04:00
1 parent b9a89967b0
commit 884f6aac96
4 files changed
+117 -18

No files matched your search

@@ -15,6 +15,7 @@ import android.view.View;
import android.widget.Button;
import android.widget.HorizontalScrollView;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.ScrollView;
import android.widget.TextView;
@@ -69,6 +70,7 @@ public final class PostActivity extends Activity {
private LinearLayout contentLayout;
private TextView statusView;
private ProgressBar progressBar;
/**
* Per-backend bench UI state. Unlike the POST itself (single-flight, latched),
@@ -93,11 +95,20 @@ public final class PostActivity extends Activity {
scrollView.setBackgroundColor(COLOR_BACKGROUND);
scrollView.setFillViewport(true);
scrollView.addView(contentLayout);
setContentView(scrollView);
setContentView(NavBar.wrap(this, scrollView, NavBar.TAB_POST));
addText("MobileGL Driver POST", 20, COLOR_TEXT, true, 0);
statusView = addText("Running self-test...", 14, COLOR_INFO, false, dp(8));
progressBar = new ProgressBar(this, null, android.R.attr.progressBarStyleHorizontal);
progressBar.setIndeterminate(true);
LinearLayout.LayoutParams progressParams = new LinearLayout.LayoutParams(
LinearLayout.LayoutParams.MATCH_PARENT,
LinearLayout.LayoutParams.WRAP_CONTENT
);
progressParams.topMargin = dp(8);
contentLayout.addView(progressBar, progressParams);
boolean startWorker = false;
boolean renderNow = false;
synchronized (POST_LOCK) {
@@ -298,6 +309,7 @@ public final class PostActivity extends Activity {
}
private void renderCachedResult() {
progressBar.setVisibility(View.GONE);
String json;
Throwable failure;
synchronized (POST_LOCK) {