diff --git a/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawEvenHubWebViewHost.kt b/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawEvenHubWebViewHost.kt index 7e563d0e..bee8e1da 100644 --- a/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawEvenHubWebViewHost.kt +++ b/App_Resources/Android/src/main/java/com/faceclaw/app/FaceclawEvenHubWebViewHost.kt @@ -1,6 +1,7 @@ package com.faceclaw.app import android.app.Activity +import android.content.MutableContextWrapper import android.os.Build import android.os.Handler import android.os.Looper @@ -54,9 +55,20 @@ import java.util.ArrayList * timers/onResume asserted on attach. The main Looper keeps ticking under the * foreground service, so apps keep driving their glasses windows in the * background. + * + * Activity recreation: this host outlives any one activity (it is a process + * singleton, and apps keep running while the activity is destroyed and + * recreated, e.g. after an app update or a config change). The overlay lives in + * one activity's content view, so attach and showOnPhone first move it, with + * every WebView in it, into the activity they are given if it isn't already + * there; otherwise "show" would raise it in a dead window. WebViews are created + * on a MutableContextWrapper whose base is re-pointed at the same time, so the + * dialogs Chromium opens from the page (e.g. a