forked from mozilla-lockwise/lockwise-android
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Workaround for mozilla-lockwise#1076 and mozilla-lockwise#1157 - Ille…
…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.
- Loading branch information
Showing
2 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!-- | ||
~ This Source Code Form is subject to the terms of the Mozilla Public | ||
~ License, v. 2.0. If a copy of the MPL was not distributed with this | ||
~ file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
--> | ||
|
||
<resources> | ||
<!-- Bug #1076 workaround: windowIsTranslucent -> false --> | ||
<style name="NoBackgroundTheme" parent="Theme.AppCompat.Light.NoActionBar"> | ||
<item name="android:windowIsTranslucent">false</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> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!-- | ||
~ This Source Code Form is subject to the terms of the Mozilla Public | ||
~ License, v. 2.0. If a copy of the MPL was not distributed with this | ||
~ file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
--> | ||
|
||
<resources> | ||
<!-- Undo bug #1076 workaround (see values-26/styles.xml) --> | ||
<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> | ||
</resources> |