You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
In ShareDataActivity we checking if appDir.listFiles() != null to continue our work. Though in L68 we trying to get the length of our File array fileList = new String[files.length] without even checking if our array is null or not and that can lead to Crash and Runtime exception if array found null, and can lead to poor user experience
Expected Behavior
If the our CSV dir doesn't exist then no need to call ShareDataActivity, either we can check for the csv file list before calling it in NeuroLab.java on method onNavigationItemSelected() or either to get array length of file after confirming that our array is not null and if found null then show a message to user that our file doesn't exist/no data to share!
Steps to reproduce it
If our CSV dir is empty or file are null, then ShareDataActivity will crash because of null array
System Information
Device
Xiaomi Redmi Note 5 Pro/AI (whyred)
Android version/OS
Android Q (API 29)
I'll provide a runtime crash screenshot below! I can have a PR over here to fix this!
The text was updated successfully, but these errors were encountered:
Description
In ShareDataActivity we checking if
appDir.listFiles() != null
to continue our work. Though in L68 we trying to get the length of our File arrayfileList = new String[files.length]
without even checking if our array is null or not and that can lead to Crash and Runtime exception if array found null, and can lead to poor user experienceExpected Behavior
If the our CSV dir doesn't exist then no need to call ShareDataActivity, either we can check for the csv file list before calling it in
NeuroLab.java
on methodonNavigationItemSelected()
or either to get array length of file after confirming that our array is not null and if found null then show a message to user that our file doesn't exist/no data to share!Steps to reproduce it
If our CSV dir is empty or file are null, then ShareDataActivity will crash because of null array
System Information
I'll provide a runtime crash screenshot below! I can have a PR over here to fix this!
The text was updated successfully, but these errors were encountered: