Skip to content

Conversation

@daniloercoli
Copy link
Contributor

Fix #43 by switching to PreferenceChangeListener on the PasscodeLock toggle.

By setting up a listener on the onChanges event, the listener is called even when the user taps on the toggle UI item (most right of the screen). Instead by hooking up onClick the listener is only called when the user taps on the text/row, but not the actual toggle.

cc @theck13
Please test this intensively ;) Don't want to break PasscodeLock on newest devices :)

…stener` to update the PasscodePreference Toggle and launch the setup activity.
@daniloercoli daniloercoli added this to the 1.5 milestone Oct 26, 2016
@theck13
Copy link
Contributor

theck13 commented Oct 26, 2016

Pass

Google Pixel on Android 7.1 with PasscodeLock Sample 1.0
LG G3 on Android 6.0 with PasscodeLock Sample 1.0
LG G4 on Android 6.0.1 with PasscodeLock Sample 1.0
Samsung Galaxy S 4 on Android 5.0.1 with PasscodeLock Sample 1.0

Fail

Nexus 5 on Android 4.4.2 with PasscodeLock Sample 1.0
Samsung Galaxy S III on Android 4.4.4 with PasscodeLock Sample 1.0
Samsung Galaxy Tab 3 on Android 4.4.2 with PasscodeLock Sample 1.0

The app is crashing on pre-Lollipop devices and emulators when tapping the "Enable lock" row or switch. Unfortunately, the monitor is not showing any exception or stack trace.

@daniloercoli
Copy link
Contributor Author

Fail

Nexus 5 on Android 4.4.2 with PasscodeLock Sample 1.0
Samsung Galaxy S III on Android 4.4.4 with PasscodeLock Sample 1.0
Samsung Galaxy Tab 3 on Android 4.4.2 with PasscodeLock Sample 1.0

The app is crashing on pre-Lollipop devices and emulators when tapping the "Enable lock" row or > switch. Unfortunately, the monitor is not showing any exception or stack trace.

Weird. I've a device with 4.4 and worked fine. Will try tomorrow on emulators then.

@daniloercoli
Copy link
Contributor Author

@theck13 - Thanks for the testing. Will ping you again, once I resolved the issues.

…thout using the compatLibrary - `android:background="?android:attr/selectableItemBackgroundBorderless`
@daniloercoli
Copy link
Contributor Author

daniloercoli commented Oct 27, 2016

Hey @theck13 - The problem was in the XML file that defines the keyboard layout. (Actually in the definition of the style of the pincode buttons). We were setting the background of buttons without using the compat library tag and then the crash on old devices. We were setting the background by using android:background="?android:attr/selectableItemBackgroundBorderless instead of ?attr/selectableItemBackgroundBorderless 🤕 in Sample app.

I didn't notice the crash yesterday because I tested changes in wp-android, and the issue wasn't there, since wp-android uses ?android:attr/selectableItemBackground that works fine on Pre-Lollipop background. Anyway I changed it in the library to ?attr/selectableItemBackground for safety.

Please, check both wp-android and Sample app. I tested the library on both apps, on a 4.4 device and on a 7.0 device, without having errors.

@theck13
Copy link
Contributor

theck13 commented Oct 27, 2016

Pass

Google Pixel on Android 7.1 with PasscodeLock Sample 1.0
LG G3 on Android 6.0 with PasscodeLock Sample 1.0
LG G4 on Android 6.0.1 with PasscodeLock Sample 1.0
Nexus 5 on Android 4.4.2 with PasscodeLock Sample 1.0
Samsung Galaxy S III on Android 4.4.4 with PasscodeLock Sample 1.0
Samsung Galaxy S 4 on Android 5.0.1 with PasscodeLock Sample 1.0
Samsung Galaxy Tab 3 on Android 4.4.2 with PasscodeLock Sample 1.0

:shipit:

@theck13 theck13 merged commit 8c44df9 into develop Oct 27, 2016
@theck13 theck13 deleted the issue/43-PIN-Input-Screen-Not-Shown-pre-lollipop branch October 27, 2016 16:04
@theck13 theck13 removed their assignment Oct 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants