Skip to content
This repository has been archived by the owner on Dec 14, 2021. It is now read-only.

Workaround for IllegalStateException in autofill activity #1205

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Governa
Copy link

@Governa Governa commented Jun 23, 2020

It seems that in Android 8.0.0 (API 26) there is a bug where setting the
auto fill activity window to translucent causes an exception to be thrown.
Per #1076 it doesn't happen on Android 8.1.

This patch works around the problem by not setting the window to be
translucent on API 26 only. The window is (obviously) not translucent, but
the App doesn't crash and is otherwise usable.

Fixes #1076 and #1157

Testing and Review Notes

Tested on a Galaxy S7 - Android 8.0.0

To Do

  • add “WIP” to the PR title if pushing up but not complete nor ready for review
  • double check the original issue to confirm it is fully satisfied
  • add testing notes and screenshots in PR description to help guide reviewers
  • add unit tests
    • optional: consider adding instrumentation (integration/UI) tests
  • consider running this branch in a debug simulator and check for memory leak notifications or any warnings
  • request the "UX" team perform a design review (if/when applicable)
  • make sure CI builds are passing (e.g.: fix lint and other errors)
  • check on the accessibility of any added UI

@Governa Governa requested a review from a team as a code owner June 23, 2020 16:00
Copy link
Contributor

@eliserichards eliserichards left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Governa! Thanks for the contribution!

There are a few other attributes that the NoBackgroundTheme specifies in the main style.xml. Could you add those to these files as well?

<style name="NoBackgroundTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="android:windowIsTranslucent">true</item>
        <item name="android:windowContentOverlay">@null</item>
        <item name="android:windowNoTitle">true</item>
        <item name="android:windowBackground">@android:color/transparent</item>
        <item name="android:background">@android:color/transparent</item>
        <item name="colorPrimaryDark">@android:color/transparent</item>
        <item name="android:backgroundDimEnabled">true</item>
        <item name="android:popupBackground">@android:color/transparent</item>
    </style>

…galStateException in autofill activity

  It seems that in Android 8.0.0 (API 26) there is a bug where setting the
auto fill activity window to translucent causes an exception to be thrown.
Per mozilla-lockwise#1076 it doesn't happen on Android 8.1.

  This patch works around the problem by not setting the window to be
translucent on API 26 only. The window is (obviously) not translucent, but
the App doesn't crash and is otherwise usable.
@Governa
Copy link
Author

Governa commented Jul 22, 2020

This issue seems to impact many users, is there anything I can do to make merging this easier?

Yes, I am one of the impacted users and waiting eagerly for this fix to be able to use Lockwise :-)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash when trying to use autofill while Lockwise is locked.
2 participants