Skip to content

Secure local folders stays on if user taps the screen anywhere without selecting any folder. #2369

@yashk2000

Description

@yashk2000

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

  1. Open security settings and set a password if not set already.
  2. Set password on local folders. Tap anywhere outside the dialog without selecting any folder to be secured.
  3. The local folders security is switched on, even though no folder is selected.
  4. Go to local folders.
  5. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions