exit camera view on last delete
When taking a photo or uploading a photo, if you delete the last photo, and then attempt to finish the description of said photo by pressing the checkmark, the app will crash
file: /data/user/0/com.h.pixeldroid/files/1.0.alpha9-1618747759565.tracedroid
Android Version: 11
Phone Model: ****
TraceDroid Version: 1.1
TraceDroid extra:
Stacktrace:
java.lang.ArrayIndexOutOfBoundsException: length=10; index=-1
at java.util.ArrayList.get(ArrayList.java:439)
at com.h.pixeldroid.postCreation.carousel.ImageCarousel.setEditingMediaDescription(SourceFile:8)
at f.onClick(java-style lambda group:1)
at android.view.View.performClick(View.java:8160)
at android.view.View.performClickInternal(View.java:8137)
at android.view.View.access$3700(View.java:888)
at android.view.View$PerformClick.run(View.java:30236)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:246)
at android.app.ActivityThread.main(ActivityThread.java:8506)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
Log:
0 D: Writing unhandled exception to: /data/user/0/com.h.pixeldroid/files/1.0.alpha9-1618747759565.tracedroid
1 D: Searching Exceptions in: /data/user/0/com.h.pixeldroid/files
2 D: current handler class=com.android.internal.os.RuntimeInit$KillApplicationHandler
Edited by Matthieu