Commit log

6c0b410 Fix DTMF causes track to become disposed

Stephen Paul Weber created

42c09f4 use setText instead of append()

Daniel Gultsch created

214b3d4 expand emoji range to cover e14

Daniel Gultsch created

c4bc52f Merge branch 'color-resources' of git.sr.ht:~hdasch/cheogram-android

Click to expand commit body
* 'color-resources' of git.sr.ht:~hdasch/cheogram-android:
  Fix ColorResourcesTableCreator creation exception.

Stephen Paul Weber created

fb88410 Throttle BobTransfer re-attempts

Stephen Paul Weber created

bdafe2c Fix ColorResourcesTableCreator creation exception.

Click to expand commit body
A java.lang.ArrayIndexOutOfBoundsException is thrown the third,
and subsequent times, ThemeHelper.applyCustomColors() is called.

,----
| java.lang.ArrayIndexOutOfBoundsException: src.length=128 srcPos=0 dst.length=131 dstPos=2 length=-128
`----

One way to trigger this is to call
ConversationsOverviewFragment.onStart() three times.  For example,
open the app then, three dot menu -> Settings, back, three dot menu ->
Settings, back.

The exception is raised at line ColorResourcesTableCreator.java:616.
So, stringToByteArrayUtf8() is ill prepared to deal with a string
longer than 127 bytes.

While the cast to signed byte is the immediate cause of the exception,
the root cause is growth of the ColorResource name string as the
package name is prepended to the color resource name on each pass
through ColorResourceTableCreator.create().  Using
Resource.getResourceEntryName() instead of Resource.getResourceName()
prevents this.

For the record, here’s the Exception stack trace:

2023-03-23 23:18:34.592   622-622   ColorResou...derCreator com.cheogram.android                 E  Failed to create the ColorResourcesTableCreator.
                                                                                                    java.lang.ArrayIndexOutOfBoundsException: src.length=128 srcPos=0 dst.length=131 dstPos=2 length=-128
                                                                                                    	at java.lang.System.arraycopy(Native Method)
                                                                                                    	at com.cheogram.android.ColorResourcesTableCreator.stringToByteArrayUtf8(ColorResourcesTableCreator.java:616)
                                                                                                    	at com.cheogram.android.ColorResourcesTableCreator.access$800(ColorResourcesTableCreator.java:40)
                                                                                                    	at com.cheogram.android.ColorResourcesTableCreator$StringPoolChunk.processString(ColorResourcesTableCreator.java:299)
                                                                                                    	at com.cheogram.android.ColorResourcesTableCreator$StringPoolChunk.<init>(ColorResourcesTableCreator.java:223)
                                                                                                    	at com.cheogram.android.ColorResourcesTableCreator$PackageChunk.<init>(ColorResourcesTableCreator.java:347)
                                                                                                    	at com.cheogram.android.ColorResourcesTableCreator$ResTable.<init>(ColorResourcesTableCreator.java:140)
                                                                                                    	at com.cheogram.android.ColorResourcesTableCreator.create(ColorResourcesTableCreator.java:114)
                                                                                                    	at com.cheogram.android.ColorResourcesLoaderCreator.create(ColorResourcesLoaderCreator.java:45)
                                                                                                    	at eu.siacs.conversations.utils.ThemeHelper.applyCustomColors(ThemeHelper.java:67)
                                                                                                    	at eu.siacs.conversations.ui.ConversationsActivity.onStart(ConversationsActivity.java:658)
                                                                                                    	at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1455)
                                                                                                    	at android.app.Activity.performStart(Activity.java:8076)
                                                                                                    	at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3660)
                                                                                                    	at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:221)
                                                                                                    	at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201)
                                                                                                    	at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173)
                                                                                                    	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
                                                                                                    	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2210)
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:106)
                                                                                                    	at android.os.Looper.loopOnce(Looper.java:201)
                                                                                                    	at android.os.Looper.loop(Looper.java:288)
                                                                                                    	at android.app.ActivityThread.main(ActivityThread.java:7839)
                                                                                                    	at java.lang.reflect.Method.invoke(Native Method)
                                                                                                    	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
                                                                                                    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)

Hugh Daschbach created

935570b Delay showing command bar on refreshes

Click to expand commit body
To prevent flickering when the other side says it has commands but doesn't.

Stephen Paul Weber created

3737b01 Tags haven't been "read-only" for awhile

Stephen Paul Weber created

b0e7dc7 Respect tag visibility setting more often

Stephen Paul Weber created

b6b9a67 Fix NPE

Stephen Paul Weber created

1e5fe19 Fetch and render vcard4

Stephen Paul Weber created

ef1744a Allow experimental suffix/prefix-label extensions

Stephen Paul Weber created

d2fe3f0 type of null means text-single which is surely fillable

Stephen Paul Weber created

36a0f0a Release sign key

Stephen Paul Weber created

35544cf Sign release bundle

Stephen Paul Weber created

b323f12 Build release aab for playstore as well

Stephen Paul Weber created

1874115 Add system name and groups when adding a contact for the first time

Stephen Paul Weber created

53d1b4a Dedup across system tags and server tags

Stephen Paul Weber created

092fbbd Update some screenshots

Stephen Paul Weber created

55461d4 Fix NPE

Stephen Paul Weber created

2c167b1 If we get here with 0 resources to call, don't make the user pick one and then crash

Stephen Paul Weber created

218e769 Merge branch 'shapeable-view-warnings' of git.sr.ht:~hdasch/cheogram-android

Click to expand commit body
* 'shapeable-view-warnings' of git.sr.ht:~hdasch/cheogram-android:
  Resolve "Failed to inflate ..." warnings.

Stephen Paul Weber created

3804dc2 Ping all online MUCs every second max ping interval

Stephen Paul Weber created

9c06087 Add Note to Self contact

Stephen Paul Weber created

cf0f129 Resolve "Failed to inflate ..." warnings.

Click to expand commit body
After merging 39a2d3e, "Failed to inflate ColorStateList" warnings
overwhelm logcat output.  This may be Android version specific.  But
on an API 30 avd, this makes it difficult to spot other errors while
debugging.  Full traceback below.

https://stackoverflow.com/questions/71746801/getting-failed-to-inflate-colorstatelist-leaving-it-to-the-framework-when-usi
suggests a fix, applied here.

Traceback (slightly reformatted):

```
2023-03-14 15:02:00.951  6324-6324  ResourcesCompat         com.cheogram.android                 W  Failed to inflate ColorStateList, leaving it to the framework
   java.lang.UnsupportedOperationException: Failed to resolve attribute at index 0: TypedValue{t=0x2/d=0x7f0400eb a=-1}
   	at android.content.res.TypedArray.getColor(TypedArray.java:528)
   	at androidx.core.content.res.ColorStateListInflaterCompat.inflate(ColorStateListInflaterCompat.java:160)
   	at androidx.core.content.res.ColorStateListInflaterCompat.createFromXmlInner(ColorStateListInflaterCompat.java:125)
   	at androidx.core.content.res.ColorStateListInflaterCompat.createFromXml(ColorStateListInflaterCompat.java:104)
   	at androidx.core.content.res.ResourcesCompat.inflateColorStateList(ResourcesCompat.java:262)
   	at androidx.core.content.res.ResourcesCompat.getColorStateList(ResourcesCompat.java:236)
   	at androidx.core.content.ContextCompat.getColorStateList(ContextCompat.java:519)
   	at androidx.appcompat.content.res.AppCompatResources.getColorStateList(AppCompatResources.java:48)
   	at com.google.android.material.resources.MaterialResources.getColorStateList(MaterialResources.java:65)
   	at com.google.android.material.imageview.ShapeableImageView.<init>(ShapeableImageView.java:114)
   	at com.google.android.material.imageview.ShapeableImageView.<init>(ShapeableImageView.java:92)
   	at java.lang.reflect.Constructor.newInstance0(Native Method)
   	at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
   	at android.view.LayoutInflater.createView(LayoutInflater.java:852)
   	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1004)
   	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:959)
   	at android.view.LayoutInflater.rInflate(LayoutInflater.java:1121)
   	at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1082)
   	at android.view.LayoutInflater.rInflate(LayoutInflater.java:1124)
   	at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1082)
   	at android.view.LayoutInflater.rInflate(LayoutInflater.java:1124)
   	at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1082)
   	at android.view.LayoutInflater.inflate(LayoutInflater.java:680)
   	at android.view.LayoutInflater.inflate(LayoutInflater.java:532)
   	at androidx.databinding.DataBindingUtil.inflate(DataBindingUtil.java:126)
   	at androidx.databinding.DataBindingUtil.inflate(DataBindingUtil.java:95)
   	at eu.siacs.conversations.ui.adapter.ConversationAdapter.onCreateViewHolder(ConversationAdapter.java:50)
   	at eu.siacs.conversations.ui.adapter.ConversationAdapter.onCreateViewHolder(ConversationAdapter.java:34)
   	at androidx.recyclerview.widget.RecyclerView$Adapter.createViewHolder(RecyclerView.java:7078)
   	at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6235)
   	at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6118)
   	at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6114)
   	at androidx.recyclerview.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2303)
   	at androidx.recyclerview.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1627)
   	at androidx.recyclerview.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1587)
   	at androidx.recyclerview.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:665)
   	at androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:4134)
   	at androidx.recyclerview.widget.RecyclerView.dispatchLayout(RecyclerView.java:3851)
   	at androidx.recyclerview.widget.RecyclerView.onLayout(RecyclerView.java:4404)
   	at android.view.View.layout(View.java:22844)
   	at android.view.ViewGroup.layout(ViewGroup.java:6389)
   	at androidx.coordinatorlayout.widget.CoordinatorLayout.layoutChild(CoordinatorLayout.java:1213)
   	at androidx.coordinatorlayout.widget.CoordinatorLayout.onLayoutChild(CoordinatorLayout.java:899)
   	at androidx.coordinatorlayout.widget.CoordinatorLayout.onLayout(CoordinatorLayout.java:919)
   	at android.view.View.layout(View.java:22844)
W  	at android.view.ViewGroup.layout(ViewGroup.java:6389)
   	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
   	at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
   	at android.view.View.layout(View.java:22844)
   	at android.view.ViewGroup.layout(ViewGroup.java:6389)
   	at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1829)
   	at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1673)
   	at android.widget.LinearLayout.onLayout(LinearLayout.java:1582)
   	at android.view.View.layout(View.java:22844)
   	at android.view.ViewGroup.layout(ViewGroup.java:6389)
   	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
   	at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
   	at android.view.View.layout(View.java:22844)
   	at android.view.ViewGroup.layout(ViewGroup.java:6389)
   	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
   	at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
   	at android.view.View.layout(View.java:22844)
   	at android.view.ViewGroup.layout(ViewGroup.java:6389)
   	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
   	at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
   	at android.view.View.layout(View.java:22844)
   	at android.view.ViewGroup.layout(ViewGroup.java:6389)
   	at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1829)
   	at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1673)
   	at android.widget.LinearLayout.onLayout(LinearLayout.java:1582)
   	at android.view.View.layout(View.java:22844)
   	at android.view.ViewGroup.layout(ViewGroup.java:6389)
   	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
   	at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
   	at com.android.internal.policy.DecorView.onLayout(DecorView.java:784)
   	at android.view.View.layout(View.java:22844)
   	at android.view.ViewGroup.layout(ViewGroup.java:6389)
   	at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:3475)
   	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2943)
   	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1948)
   	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8177)
   	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:972)
   	at android.view.Choreographer.doCallbacks(Choreographer.java:796)
   	at android.view.Choreographer.doFrame(Choreographer.java:731)
   	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:957)
   	at android.os.Handler.handleCallback(Handler.java:938)
   	at android.os.Handler.dispatchMessage(Handler.java:99)
   	at android.os.Looper.loop(Looper.java:223)
   	at android.app.ActivityThread.main(ActivityThread.java:7660)
   	at java.lang.reflect.Method.invoke(Native Method)
   	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
   	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
```

Hugh Daschbach created

cdec63d Do not include fallback quote on direct reply

Click to expand commit body
It may be too close to the preceeding message and confusing looking on clients
that use the fallback.

Stephen Paul Weber created

1a02bcb Allow files/images in replies

Stephen Paul Weber created

609f2d5 Include source message in a forked-off thread "show only" view

Stephen Paul Weber created

fbc7c4f Remove debug log

Stephen Paul Weber created

59a7af6 When cancel a reply, put threads back to default mode

Stephen Paul Weber created

2c1b89e Tweak swipe detector

Stephen Paul Weber created

124ea2f Tweak spacing on reply cancel button

Stephen Paul Weber created

4d145b1 Simulate incoming message/edit for incoming reactions

Click to expand commit body
Allow retracting older reaction messages, do not allow editing any of them

Stephen Paul Weber created

606d800 And emoji reply is a reaction

Click to expand commit body
Retracting an emoji reply retracts the reaction

Stephen Paul Weber created

2dd6db0 Save the body we generated

Stephen Paul Weber created

2d226d2 Swipe and reply menu should be the same

Stephen Paul Weber created

426d202 Actually fix swipe detector

Stephen Paul Weber created

efb29e4 Allow reply to images

Stephen Paul Weber created

598b240 Use prepareQuote to format /me and strip deep nesting

Stephen Paul Weber created

51fdb41 Tweak swipe sensitivity

Stephen Paul Weber created

b78d9fc Swipe to reply

Stephen Paul Weber created

d9b2d17 Rich reply from direct reply

Stephen Paul Weber created

65d0af8 Rename menu item

Stephen Paul Weber created

99625f2 Merge branch 'reply'

Click to expand commit body
* reply:
  UI for rich replies
  Reply to message instead of just quote
  Move quote code to quote helper

Stephen Paul Weber created

9aa5c13 UI for rich replies

Stephen Paul Weber created

c39b81a Reply to message instead of just quote

Click to expand commit body
If you want an editable quote you can still copy to clipboard + paste as quote.
This commit works at a protocol level, but there is no UI to show that you are
replying or to let you cancel a reply.

Stephen Paul Weber created

57b0ae8 Move quote code to quote helper

Stephen Paul Weber created

4924be1 Fix NPE

Stephen Paul Weber created

68d55da Sometimes the span isn't actually there? So don't crash

Stephen Paul Weber created

e0161ae Fix some copy

Stephen Paul Weber created