avoid:
2023-03-01 16:47:40.443 23569-23628 UploadAndS...ilesWorker com.nextcloud.talk2 E Something went wrong when trying to upload file
java.lang.NullPointerException
at com.nextcloud.talk.jobs.UploadAndShareFilesWorker.showFailedToUploadNotification(UploadAndShareFilesWorker.kt:258)
at com.nextcloud.talk.jobs.UploadAndShareFilesWorker.doWork(UploadAndShareFilesWorker.kt:163)
at androidx.work.Worker$1.run(Worker.java:86)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:919)
2023-03-01 16:47:40.444 23569-23607 WM-WorkerWrapper com.nextcloud.talk2 E Work [ id=27e4e319-a966-4515-ac07-d6ad7ee68268, tags={ com.nextcloud.talk.jobs.UploadAndShareFilesWorker } ] failed because it threw an exception/error
java.util.concurrent.ExecutionException: java.lang.NullPointerException
at androidx.work.impl.utils.futures.AbstractFuture.getDoneValue(AbstractFuture.java:516)
at androidx.work.impl.utils.futures.AbstractFuture.get(AbstractFuture.java:475)
at androidx.work.impl.WorkerWrapper$2.run(WorkerWrapper.java:311)
at androidx.work.impl.utils.SerialExecutor$Task.run(SerialExecutor.java:91)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:919)
Caused by: java.lang.NullPointerException
at com.nextcloud.talk.jobs.UploadAndShareFilesWorker.showFailedToUploadNotification(UploadAndShareFilesWorker.kt:258)
at com.nextcloud.talk.jobs.UploadAndShareFilesWorker.doWork(UploadAndShareFilesWorker.kt:167)
at androidx.work.Worker$1.run(Worker.java:86)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:919)
2023-03-01 16:47:40.446 23569-23607 WM-WorkerWrapper com.nextcloud.talk2 I Worker result FAILURE for Work [ id=27e4e319-a966-
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-02-27 12:29:00.275 995-995 AndroidRuntime.........
java.lang.NullPointerException
at com.nextcloud.talk.controllers.ChatController.modifyMessageCount(ChatController.kt:2536)
at com.nextcloud.talk.controllers.ChatController.addMessagesToAdapter(ChatController.kt:2515)
at com.nextcloud.talk.controllers.ChatController.processMessagesFromTheFuture(ChatController.kt:2489)
at com.nextcloud.talk.controllers.ChatController.processMessages(ChatController.kt:2437)
at com.nextcloud.talk.controllers.ChatController.processMessagesResponse(ChatController.kt:2398)
at com.nextcloud.talk.controllers.ChatController.access$processMessagesResponse(ChatController.kt:221)
at com.nextcloud.talk.controllers.ChatController$pullChatMessages$2.onNext(ChatController.kt:2309)
at com.nextcloud.talk.controllers.ChatController$pullChatMessages$2.onNext(ChatController.kt:2294)
at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.drainNormal(ObservableObserveOn.java:201)
at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.run(ObservableObserveOn.java:255)
at io.reactivex.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:124)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8741)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
...for preparation to replace Dialog that was openend in ChatController. It will be replaced by Notification Actions.
The dialog was not opened when already being in a chat, because remapChatController only moved the currentChatController to top so to won't be initialized again. That's why the dialog didn't pop up for this case.
As a solution, the actions should be available directly inside the notification.
For this, it must be avoided that the "recording available" notification is closed whenever the chat is opened.
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Otherwise following error was thrown:
Expected com.nextcloud.talk.viewmodels.CallRecordingViewModel$RecordingStartingState@5f78de22 but encountered com.nextcloud.talk.viewmodels.CallRecordingViewModel$RecordingStartingState@516ebdf8
com.vividsolutions.jts.util.AssertionFailedException: Expected com.nextcloud.talk.viewmodels.CallRecordingViewModel$RecordingStartingState@5f78de22 but encountered com.nextcloud.talk.viewmodels.CallRecordingViewModel$RecordingStartingState@516ebdf8
at app//com.vividsolutions.jts.util.Assert.equals(Assert.java:100)
at app//com.vividsolutions.jts.util.Assert.equals(Assert.java:85)
at app//com.nextcloud.talk.viewmodels.CallRecordingViewModelTest.testCallRecordingViewModel_clickStartRecord(CallRecordingViewModelTest.kt:25)
at java.base@11.0.15/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>