Route Android back through Gio settings flow

This commit is contained in:
Joe Julian
2026-04-03 11:21:17 -07:00
parent 6afdf49f5e
commit a4933f2127
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) { func TestUISecurityDialogContentDoesNotPanicWithSmallViewport(t *testing.T) {
t.Parallel() 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}}" /> <uses-sdk android:minSdkVersion="{{.MinSDK}}" android:targetSdkVersion="{{.TargetSDK}}" />
{{range .Permissions}} <uses-permission android:name="{{.}}"/> {{range .Permissions}} <uses-permission android:name="{{.}}"/>
{{end}}{{range .Features}} <uses-feature android:{{.}} android:required="false"/> {{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}} {{.AppSnip}}
<activity android:name="org.gioui.GioActivity" <activity android:name="org.gioui.GioActivity"
android:label="{{.AppName}}" android:label="{{.AppName}}"