Describe the bug
Crash caused by rotating the screen on the "manage data" page
To Reproduce
Steps to reproduce the behavior:
- Install a2dp and open app
- Click three points in the upper right corner
- Click "manage data"
- Click "import database from sd card
- Rotate screen
- Back
- Crash
Expected behavior
Not crash
Smartphone (please complete the following information):
- Device: HUAWEI nova 5 pro
- OS: EMUI 9.1.1
- Rooted: No
- Version: v2.13.0.4
Additional context
logcat:
: java.lang.RuntimeException: An error occurred while executing doInBackground()
08-08 05:19:06.505 7795 8103 E AndroidRuntime: at android.os.AsyncTask$4.done(AsyncTask.java:399)
08-08 05:19:06.505 7795 8103 E AndroidRuntime: at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
08-08 05:19:06.505 7795 8103 E AndroidRuntime: at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
08-08 05:19:06.505 7795 8103 E AndroidRuntime: at java.util.concurrent.FutureTask.run(FutureTask.java:271)
08-08 05:19:06.505 7795 8103 E AndroidRuntime: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:289)
08-08 05:19:06.505 7795 8103 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
08-08 05:19:06.505 7795 8103 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
08-08 05:19:06.505 7795 8103 E AndroidRuntime: at java.lang.Thread.run(Thread.java:919)
08-08 05:19:06.505 7795 8103 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
08-08 05:19:06.505 7795 8103 E AndroidRuntime: at android.widget.Toast.<init>(Toast.java:121)
08-08 05:19:06.505 7795 8103 E AndroidRuntime: at android.widget.Toast.makeText(Toast.java:286)
08-08 05:19:06.505 7795 8103 E AndroidRuntime: at android.widget.Toast.makeText(Toast.java:276)
08-08 05:19:06.505 7795 8103 E AndroidRuntime: at a2dp.Vol.DeviceDB.selectAll(DeviceDB.java:247)
08-08 05:19:06.505 7795 8103 E AndroidRuntime: at a2dp.Vol.ManageData$SelectDataTask.doInBackground(ManageData.java:398)
08-08 05:19:06.505 7795 8103 E AndroidRuntime: at a2dp.Vol.ManageData$SelectDataTask.doInBackground(ManageData.java:385)
08-08 05:19:06.505 7795 8103 E AndroidRuntime: at android.os.AsyncTask$3.call(AsyncTask.java:378)
08-08 05:19:06.505 7795 8103 E AndroidRuntime: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
08-08 05:19:06.505 7795 8103 E AndroidRuntime: ... 4 more
record:

Describe the bug
Crash caused by rotating the screen on the "manage data" page
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Not crash
Smartphone (please complete the following information):
Additional context
logcat:
record:
