Route Android back through Gio settings flow

This commit is contained in:
Joe Julian
2026-04-03 11:21:17 -07:00
parent efd1b48df0
commit 17d52e1e45
2 changed files with 15 additions and 1 deletions
+14
View File
@@ -887,6 +887,20 @@ func TestUIPhoneBackReturnsFromSubscreenToEntries(t *testing.T) {
}
}
func TestUIPhoneBackClosesSettingsDialog(t *testing.T) {
t.Parallel()
u := newUIWithModel("phone", vault.Model{})
u.securityDialogOpen = true
if !u.handlePhoneBack() {
t.Fatal("handlePhoneBack() = false, want true for open settings dialog")
}
if u.securityDialogOpen {
t.Fatal("securityDialogOpen = true after back, want false")
}
}
func TestUISecurityDialogContentDoesNotPanicWithSmallViewport(t *testing.T) {
t.Parallel()
+1 -1
View File
@@ -471,7 +471,7 @@ func exeAndroid(tmpDir string, tools *androidTools, bi *buildInfo, extraJars, pe
<uses-sdk android:minSdkVersion="{{.MinSDK}}" android:targetSdkVersion="{{.TargetSDK}}" />
{{range .Permissions}} <uses-permission android:name="{{.}}"/>
{{end}}{{range .Features}} <uses-feature android:{{.}} android:required="false"/>
{{end}}{{.ManifestSnip}} <application {{.IconSnip}} android:label="{{.AppName}}">
{{end}}{{.ManifestSnip}} <application {{.IconSnip}} android:label="{{.AppName}}" android:enableOnBackInvokedCallback="false">
{{.AppSnip}}
<activity android:name="org.gioui.GioActivity"
android:label="{{.AppName}}"