-
Notifications
You must be signed in to change notification settings - Fork 914
Description
Actual Behaviour
When the user is selecting the folders to be secured, the dialog can be closed by tapping anywhere outside the dialog. But when the dialog closes, local folders security should be turned off, instead, it stays on. Now when the user tries to open an album, the app crashes.
Expected Behaviour
The local folders security should turn off if the dialog is closed by tapping outside and the app should not crash.
Steps to reproduce it
- Open security settings and set a password if not set already.
- Set password on local folders. Tap anywhere outside the dialog without selecting any folder to be secured.
- The local folders security is switched on, even though no folder is selected.
- Go to local folders.
- Open any album. App crashes.
LogCat for the issue
2019-01-09 12:00:12.809 7053-7053/org.fossasia.phimpme E/AndroidRuntime: FATAL EXCEPTION: main
Process: org.fossasia.phimpme, PID: 7053
java.lang.NullPointerException: Attempt to get length of null array
at org.fossasia.phimpme.gallery.activities.LFMainActivity.check(LFMainActivity.java:608)
at org.fossasia.phimpme.gallery.activities.LFMainActivity.access$1000(LFMainActivity.java:146)
at org.fossasia.phimpme.gallery.activities.LFMainActivity$4.onClick(LFMainActivity.java:631)
at android.view.View.performClick(View.java:6608)
at android.view.View.performClickInternal(View.java:6585)
at android.view.View.access$3100(View.java:782)
at android.view.View$PerformClick.run(View.java:25945)
at android.os.Handler.handleCallback(Handler.java:874)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:198)
at android.app.ActivityThread.main(ActivityThread.java:6729)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Would you like to work on the issue?
YES.