Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Crash DashboardWidgetService #12234

Conversation

alperozturk96
Copy link
Collaborator

@alperozturk96 alperozturk96 commented Dec 5, 2023

  • Tests written, or not not needed

@@ -166,55 +166,17 @@ class StackRemoteViewsFactory(
@Suppress("NestedBlockDepth", "TooGenericExceptionCaught")
private fun createItemView(position: Int): RemoteViews {
return RemoteViews(context.packageName, R.layout.widget_item).apply {
if (widgetItems.isEmpty()) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actual fix

if (widgetItem.iconUrl.isNotEmpty()) {
val glide: FutureTarget<Bitmap>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extracted to separate functions for increase code readability

@alperozturk96
Copy link
Collaborator Author

/rebase

Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
@nextcloud-command nextcloud-command force-pushed the bugfix/fix-crash-DashboardWidgetService-IndexOutOfBoundsException branch from 88b4154 to 982bda6 Compare December 5, 2023 10:57
Signed-off-by: alperozturk <[email protected]>
Copy link

github-actions bot commented Dec 5, 2023

Codacy

Lint

TypemasterPR
Warnings7474
Errors00

SpotBugs

CategoryBaseNew
Bad practice2626
Correctness7070
Dodgy code359359
Experimental22
Internationalization99
Malicious code vulnerability22
Multithreaded correctness99
Performance5858
Security1818
Total553553

Copy link

github-actions bot commented Dec 5, 2023

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/12234.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.

@alperozturk96
Copy link
Collaborator Author

alperozturk96 commented Dec 6, 2023

/backport to stable-3.27

1 similar comment
@alperozturk96
Copy link
Collaborator Author

/backport to stable-3.27

Copy link
Collaborator

@JonasMayerDev JonasMayerDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not tested but code looks good!

@alperozturk96 alperozturk96 merged commit 8023b0f into master Dec 6, 2023
20 checks passed
@delete-merged-branch delete-merged-branch bot deleted the bugfix/fix-crash-DashboardWidgetService-IndexOutOfBoundsException branch December 6, 2023 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DashboardWidgetService Java error: IndexOutOfBoundsException
2 participants