Skip to content

pwagen 1.2

Choose a tag to compare

@ddagunts ddagunts released this 04 Aug 01:21

Fixes generated apps crashing on launch in 1.1. If you are on 1.1, update and
regenerate your apps.

What broke

The system-bar work added in 1.1 asked the window for its insets controller
before setContentView had created the decor view that answers for it, so every
generated app died in onCreate — in both bar modes:

java.lang.NullPointerException: Attempt to invoke virtual method
'android.view.WindowInsetsController
 com.android.internal.policy.DecorView.getWindowInsetsController()'
on a null object reference
  at com.android.internal.policy.PhoneWindow.getInsetsController
  at dev.pwagen.shell.MainActivity.applyThemeColor

The generator itself was unaffected — only the apps it generates.

The fix

Window setup now runs after setContentView. Hiding the bars and choosing their
icon colour moved into onWindowFocusChanged, since the insets controller is not
wired up until the window is attached. That also fixes a bar the user swipes in
transiently never being put back.

Important

Regenerate your apps after updating. The fix is in the template APK that
pwagen embeds, so apps generated by 1.1 keep crashing until they are rebuilt.
Regenerating bumps the version code, so each installs as an in-place upgrade
and keeps its cookies, logins and firewall rules.

Verifying this build

sha256  da43885eeb4e1d1816b9f5146060069395b8e19c4da4f6b63c4a6a43d14ad0b7

Same signing key as 1.0 and 1.1, so this updates in place:

813d6225f1c3bedeafd47e33775e7c0f5390cdedf259bd883c0e26b6d04b9dee