Tusky-App-Android/app/src/main/java/com/keylesspalace/tusky/util
Konrad Pozniak f2ffba1679
never create more than the allowed number of shortcuts (#4389)
The only crash so far in the 25.0-beta1 crash reports. Probably not a
regression though as that code did not change in a while.

```
Exception java.lang.IllegalArgumentException: Max number of dynamic shortcuts exceeded
  at android.os.Parcel.createExceptionOrNull (Parcel.java:3032)
  at android.os.Parcel.createException (Parcel.java:3012)
  at android.os.Parcel.readException (Parcel.java:2995)
  at android.os.Parcel.readException (Parcel.java:2937)
  at android.content.pm.IShortcutService$Stub$Proxy.addDynamicShortcuts (IShortcutService.java:618)
  at android.content.pm.ShortcutManager.addDynamicShortcuts (ShortcutManager.java:240)
  at androidx.core.content.pm.ShortcutManagerCompat.addDynamicShortcuts (ShortcutManagerCompat.java:334)
  at com.keylesspalace.tusky.util.ShareShortcutHelper$updateShortcut$1.invokeSuspend (ShareShortcutHelper.kt:96)
  at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (ContinuationImpl.kt:33)
  at kotlinx.coroutines.DispatchedTask.run (DispatchedTask.kt:104)
  at android.os.Handler.handleCallback (Handler.java:984)
  at android.os.Handler.dispatchMessage (Handler.java:104)
  at android.os.Looper.loopOnce (Looper.java:238)
  at android.os.Looper.loop (Looper.java:357)
  at android.app.ActivityThread.main (ActivityThread.java:8094)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:548)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:957)
Caused by android.os.RemoteException: Remote stack trace:
  at com.android.server.pm.ShortcutService.enforceMaxActivityShortcuts (ShortcutService.java:1768)
  at com.android.server.pm.ShortcutPackage.enforceShortcutCountsBeforeOperation (ShortcutPackage.java:1551)
  at com.android.server.pm.ShortcutService.addDynamicShortcuts (ShortcutService.java:2161)
  at android.content.pm.IShortcutService$Stub.onTransact (IShortcutService.java:281)
  at android.os.Binder.execTransactInternal (Binder.java:1294)
```
2024-04-25 17:08:46 +02:00
..
AbsoluteTimeFormatter.kt upgrade ktlint plugin to 12.0.3 (#4169) 2024-01-04 17:00:55 +01:00
ActivityExensions.kt Better screen transitions (#4285) 2024-02-25 16:20:15 +01:00
AlertDialogExtensions.kt Fix some warnings & recreate lint-baseline.xml (#4278) 2024-02-25 16:20:26 +01:00
AsciiFolding.kt Fix the tag span generation for tags with nonascii characters (#2700) 2022-09-17 19:06:45 +02:00
AttachmentHelper.kt Add option to not crop image previews (#2832) 2022-12-01 21:20:46 +01:00
BindingHolder.kt add ktlint plugin to project and apply default code style (#2209) 2021-06-28 21:13:24 +02:00
BlurHashDecoder.kt add ktlint plugin to project and apply default code style (#2209) 2021-06-28 21:13:24 +02:00
CardViewMode.kt add ktlint plugin to project and apply default code style (#2209) 2021-06-28 21:13:24 +02:00
CompositeWithOpaqueBackground.kt Optimize I/O code using Okio - part 2 (#4372) 2024-04-14 16:39:29 +02:00
CryptoUtil.kt upgrade ktlint plugin to 12.0.3 (#4169) 2024-01-04 17:00:55 +01:00
CustomEmojiHelper.kt Replace Gson library with Moshi (#4309) 2024-04-02 21:01:04 +02:00
CustomFragmentStateAdapter.kt add ktlint plugin to project and apply default code style (#2209) 2021-06-28 21:13:24 +02:00
Either.kt Remove redundant crossinline (#4348) 2024-03-29 21:12:49 +01:00
EmptyPagingSource.kt upgrade ktlint plugin to 12.0.3 (#4169) 2024-01-04 17:00:55 +01:00
FlowExtensions.kt upgrade ktlint plugin to 12.0.3 (#4169) 2024-01-04 17:00:55 +01:00
FocalPointUtil.kt upgrade ktlint plugin to 12.0.3 (#4169) 2024-01-04 17:00:55 +01:00
GlideExtensions.kt Replace RxJava3 code with coroutines (#4290) 2024-02-29 15:28:48 +01:00
GlideModule.kt support animated PNGs and WEBPs (#2244) 2021-10-09 10:45:41 +02:00
HttpHeaderLink.kt upgrade ktlint plugin to 12.0.3 (#4169) 2024-01-04 17:00:55 +01:00
IOUtils.kt Optimize I/O code using Okio (#4366) 2024-04-10 21:52:55 +02:00
IconUtils.kt Convert util/{HttpHeaderLink,PairedList,TimestampUtils,ThemeUtils} to Kotlin (#3046) 2022-12-31 13:01:35 +01:00
ImageLoadingHelper.kt Composite semi-transparent avatars over a solid background (#3874) 2023-08-08 23:09:59 +02:00
Lazy.kt Use unsafeLazy to simplify thread unsafe lazy initializations (#3276) 2023-02-20 20:14:54 +01:00
LinkHelper.kt Fix some warnings & recreate lint-baseline.xml (#4278) 2024-02-25 16:20:26 +01:00
ListStatusAccessibilityDelegate.kt Replace Gson library with Moshi (#4309) 2024-04-02 21:01:04 +02:00
ListUtils.kt update Kotlin to 1.7.10 and fix some (new?) warnings (#2647) 2022-08-07 19:36:09 +02:00
LocaleExtensions.kt Code cleanups (#3264) 2023-02-20 19:58:37 +01:00
LocaleManager.kt update ktlint plugin to 11.3.1, format code (#3442) 2023-03-13 13:16:39 +01:00
LocaleUtils.kt Machine translation of posts (#4307) 2024-03-09 16:12:18 +01:00
MediaUtils.kt Optimize I/O code using Okio - part 2 (#4372) 2024-04-14 16:39:29 +02:00
NoUnderlineURLSpan.kt Kotlin 1.9.0 (#3835) 2023-08-02 09:04:24 +02:00
NotificationTypeConverter.kt update ktlint plugin to 11.3.1, format code (#3442) 2023-03-13 13:16:39 +01:00
NumberUtils.kt Replace shortNumber() with formatNumber() (#3519) 2023-06-10 16:29:26 +02:00
PairedList.kt upgrade ktlint plugin to 12.0.3 (#4169) 2024-01-04 17:00:55 +01:00
PickMediaFiles.kt add ktlint plugin to project and apply default code style (#2209) 2021-06-28 21:13:24 +02:00
RelativeTimeUpdater.kt Replace RxJava3 code with coroutines (#4290) 2024-02-29 15:28:48 +01:00
Resource.kt Convert some sealed classes to interfaces (#4347) 2024-03-29 20:11:53 +01:00
RickRoll.kt add ktlint plugin to project and apply default code style (#2209) 2021-06-28 21:13:24 +02:00
ShareShortcutHelper.kt never create more than the allowed number of shortcuts (#4389) 2024-04-25 17:08:46 +02:00
SharedPreferencesExtensions.kt New settings (#891) 2018-11-12 21:09:39 +01:00
Single.kt Replace RxJava3 code with coroutines (#4290) 2024-02-29 15:28:48 +01:00
SmartLengthInputFilter.kt upgrade ktlint plugin to 12.0.3 (#4169) 2024-01-04 17:00:55 +01:00
SpanUtils.kt upgrade ktlint plugin to 12.0.3 (#4169) 2024-01-04 17:00:55 +01:00
StatusDisplayOptions.kt upgrade ktlint plugin to 12.0.3 (#4169) 2024-01-04 17:00:55 +01:00
StatusParsingHelper.kt Support code blocks (#4090) 2023-11-01 09:22:23 +01:00
StatusViewHelper.kt upgrade ktlint plugin to 12.0.3 (#4169) 2024-01-04 17:00:55 +01:00
StringUtils.kt Replace java.util.Random with kotlin Random object (#4364) 2024-04-10 21:47:27 +02:00
ThemeUtils.kt fix theme preference defaults (#4061) 2023-10-14 14:20:20 +02:00
ThrowableExtensions.kt upgrade ktlint plugin to 12.0.3 (#4169) 2024-01-04 17:00:55 +01:00
TimestampUtils.kt Revert "make timestamp abbreviations plurals (#4202)" (#4230) 2024-01-28 19:48:35 +01:00
TouchDelegateHelper.kt fix crash in TouchDelegateHelper when not all views are available (#3016) 2022-12-07 19:34:54 +01:00
ViewBindingExtensions.kt Simplify and reduce overhead of lazy view binding in Fragments (#4269) 2024-02-23 20:10:33 +01:00
ViewDataUtils.kt Machine translation of posts (#4307) 2024-03-09 16:12:18 +01:00
ViewExtensions.kt Ensure textview fields can be copy/pasted (#3707) 2023-06-11 18:39:48 +02:00