Signal-Android icon indicating copy to clipboard operation
Signal-Android copied to clipboard

Launcher icon indicates 1 unread message although everything is marked as read

Open hebu opened this issue 11 years ago • 52 comments

Since the last update, the app icon is indicating 1 unread message (by displaying the red badge on the shortcut icon), although all messages are read. Also, when a new message is received, the badge remains "1". I did not test with 2 unread messages.

The interesting part in the log file seems to be this line:

W/ShortcutBadger( 5874): No support for: com.sec.android.app.launcher

Device info from the log file:

Device : samsung GT-I9305 (m3xx) Android: JSS15J.I9305XXUEMKC OS Host: SEP-108 App : TextSecure 2.4.1

hebu avatar Jan 15 '15 22:01 hebu

:) the log entry will always be there. see https://github.com/WhisperSystems/ShortcutBadger/blob/d4ee33747d09b6167907105d197bb42f33de13b6/ShortcutBadger/src/main/java/me/leolin/shortcutbadger/ShortcutBadger.java#L79

Do you have some more log file content?

McLoo avatar Jan 15 '15 22:01 McLoo

Sure. Attached is the latest log, after marking all as read from the context menu.

Am 15. Januar 2015 23:58:29 MEZ, schrieb McLoo [email protected]:

:) the log entry will always be there. see https://github.com/WhisperSystems/ShortcutBadger/blob/d4ee33747d09b6167907105d197bb42f33de13b6/ShortcutBadger/src/main/java/me/leolin/shortcutbadger/ShortcutBadger.java#L79

Do you have some more log file content?


Reply to this email directly or view it on GitHub: https://github.com/WhisperSystems/TextSecure/issues/2358#issuecomment-70178952 Device : samsung GT-I9305 (m3xx) Android: JSS15J.I9305XXUEMKC OS Host: SEP-108 App : TextSecure 2.4.1

--------- beginning of /dev/log/main W/KeyCachingService( 5874): Incrementing activity count... W/KeyCachingService( 5874): Decrementing activity count... D/AbsListView( 5874): Get MotionRecognitionManager W/DirectoryRefreshListener( 5874): Scheduling for: 1421366746729 D/AbsListView( 5874): onVisibilityChanged() is called, visibility : 4 D/AbsListView( 5874): unregisterIRListener() is called D/AbsListView( 5874): onVisibilityChanged() is called, visibility : 0 D/AbsListView( 5874): unregisterIRListener() is called W/KeyCachingService( 5874): Incrementing activity count... D/AbsListView( 5874): unregisterIRListener() is called D/AbsListView( 5874): unregisterIRListener() is called D/AbsListView( 5874): unregisterIRListener() is called D/AbsListView( 5874): Get MotionRecognitionManager D/AbsListView( 5874): unregisterIRListener() is called D/AbsListView( 5874): unregisterIRListener() is called D/AbsListView( 5874): unregisterIRListener() is called D/AbsListView( 5874): unregisterIRListener() is called D/AbsListView( 5874): onDetachedFromWindow D/AbsListView( 5874): unregisterIRListener() is called E/ViewRootImpl( 5874): sendUserActionEvent() mView == null W/KeyCachingService( 5874): Decrementing activity count... D/AbsListView( 5874): Get MotionRecognitionManager D/AbsListView( 5874): onVisibilityChanged() is called, visibility : 4 D/AbsListView( 5874): unregisterIRListener() is called D/AbsListView( 5874): onVisibilityChanged() is called, visibility : 0 D/AbsListView( 5874): unregisterIRListener() is called D/AbsListView( 5874): unregisterIRListener() is called W/KeyCachingService( 5874): Incrementing activity count... D/AbsListView( 5874): unregisterIRListener() is called D/AbsListView( 5874): unregisterIRListener() is called D/AbsListView( 5874): unregisterIRListener() is called D/AbsListView( 5874): onVisibilityChanged() is called, visibility : 4 D/AbsListView( 5874): unregisterIRListener() is called D/AbsListView( 5874): onDetachedFromWindow D/AbsListView( 5874): Get MotionRecognitionManager D/AbsListView( 5874): unregisterIRListener() is called D/AbsListView( 5874): unregisterIRListener() is called W/KeyCachingService( 5874): Decrementing activity count... D/AbsListView( 5874): unregisterIRListener() is called D/Scrubber( 5874): scrubbing input D/dalvikvm( 5874): JIT code cache reset in 10 ms (1048536 bytes 1/0) D/dalvikvm( 5874): GC_CONCURRENT freed 1332K, 10% free 26833K/29812K, paused 8ms+27ms, total 225ms D/AbsListView( 5874): [unregisterDoubleTapMotionListener] I/MotionRecognitionManager( 5874): .unregisterListener : / listener count = 0->0,
D/AbsListView( 5874): unregisterIRListener() is called D/AbsListView( 5874): onVisibilityChanged() is called, visibility : 4 D/AbsListView( 5874): unregisterIRListener() is called D/AbsListView( 5874): onVisibilityChanged() is called, visibility : 0 D/AbsListView( 5874): unregisterIRListener() is called W/KeyCachingService( 5874): Incrementing activity count... D/AbsListView( 5874): unregisterIRListener() is called D/AbsListView( 5874): onDetachedFromWindow D/AbsListView( 5874): Get MotionRecognitionManager D/AbsListView( 5874): unregisterIRListener() is called D/AbsListView( 5874): unregisterIRListener() is called W/KeyCachingService( 5874): Decrementing activity count... D/AbsListView( 5874): onVisibilityChanged() is called, visibility : 0 D/AbsListView( 5874): unregisterIRListener() is called W/KeyCachingService( 5874): Incrementing activity count... D/AbsListView( 5874): unregisterIRListener() is called D/AbsListView( 5874): unregisterIRListener() is called D/AbsListView( 5874): onDetachedFromWindow D/AbsListView( 5874): unregisterIRListener() is called D/AbsListView( 5874): unregisterIRListener() is called D/AbsListView( 5874): unregisterIRListener() is called D/AbsListView( 5874): unregisterIRListener() is called D/AbsListView( 5874): onDetachedFromWindow D/AbsListView( 5874): unregisterIRListener() is called E/ViewRootImpl( 5874): sendUserActionEvent() mView == null W/MmsSmsDatabase( 5874): Executing query: SELECT _id, body, read, type, address, address_device_id, subject, thread_id, status, date_sent, date_received, m_type, msg_box, part_count, ct_l, tr_id, m_size, exp, st, delivery_receipt_count, transport_type FROM (SELECT DISTINCT date_sent * 1 AS date_sent, date * 1 AS date_received, _id, body, read, thread_id, type, address, address_device_id, subject, NULL AS m_type, NULL AS msg_box, status, NULL AS part_count, NULL AS ct_l, NULL AS tr_id, NULL AS m_size, NULL AS exp, NULL AS st, delivery_receipt_count, 'sms' AS transport_type FROM sms WHERE (read = 0) UNION ALL SELECT DISTINCT date * 1000 AS date_sent, date_received * 1000 AS date_received, _id, body, read, thread_id, NULL AS type, address, address_device_id, NULL AS subject, m_type, msg_box, NULL AS status, part_count, ct_l, tr_id, m_size, exp, st, delivery_receipt_count, 'mms' AS transport_type FROM mms WHERE (read = 0) ORDER BY date_received ASC) W/ShortcutBadger( 5874): No support for: com.sec.android.app.launcher D/AbsListView( 5874): unregisterIRListener() is called D/AbsListView( 5874): unregisterIRListener() is called D/AbsListView( 5874): unregisterIRListener() is called D/AbsListView( 5874): unregisterIRListener() is called D/AbsListView( 5874): unregisterIRListener() is called D/AbsListView( 5874): onDetachedFromWindow D/AbsListView( 5874): unregisterIRListener() is called E/ViewRootImpl( 5874): sendUserActionEvent() mView == null W/KeyCachingService( 5874): Decrementing activity count... D/AbsListView( 5874): Get MotionRecognitionManager D/AbsListView( 5874): onVisibilityChanged() is called, visibility : 4 D/AbsListView( 5874): unregisterIRListener() is called D/AbsListView( 5874): onVisibilityChanged() is called, visibility : 0 D/AbsListView( 5874): unregisterIRListener() is called D/AbsListView( 5874): unregisterIRListener() is called W/KeyCachingService( 5874): Incrementing activity count... D/AbsListView( 5874): unregisterIRListener() is called D/AbsListView( 5874): unregisterIRListener() is called D/AbsListView( 5874): unregisterIRListener() is called D/AbsListView( 5874): onVisibilityChanged() is called, visibility : 4 D/AbsListView( 5874): unregisterIRListener() is called D/AbsListView( 5874): onDetachedFromWindow D/AbsListView( 5874): Get MotionRecognitionManager D/AbsListView( 5874): unregisterIRListener() is called D/AbsListView( 5874): unregisterIRListener() is called W/KeyCachingService( 5874): Decrementing activity count... D/AbsListView( 5874): unregisterIRListener() is called

hebu avatar Jan 15 '15 23:01 hebu

Latest version of Textsecure is 2.4.2 but you're running 2.4.1. Don't nt know if that matters for this issue though.

jeremymasters avatar Jan 16 '15 01:01 jeremymasters

I updated and rebooted the phone, but the issue is still there.

Device : samsung GT-I9305 (m3xx) Android: JSS15J.I9305XXUEMKC OS Host: SEP-108 App : TextSecure 2.4.2

--------- beginning of /dev/log/main W/PartProvider( 4822): Got master secret: null D/dalvikvm( 4822): GC_CONCURRENT freed 515K, 16% free 10311K/12260K, paused 6ms+22ms, total 55ms D/dalvikvm( 4822): GC_CONCURRENT freed 606K, 17% free 10724K/12768K, paused 3ms+2ms, total 57ms I/dalvikvm( 4822): Could not find method android.provider.Telephony$Sms.getDefaultSmsPackage, referenced from method org.thoughtcrime.securesms.util.Util.isDefaultSmsProvider W/dalvikvm( 4822): VFY: unable to resolve static method 1272: Landroid/provider/Telephony$Sms;.getDefaultSmsPackage (Landroid/content/Context;)Ljava/lang/String; D/dalvikvm( 4822): VFY: replacing opcode 0x71 at 0x000a W/DirectoryRefreshListener( 4822): Scheduling for: 1421409946792 W/KeyCachingService( 4822): Incrementing activity count... W/KeyCachingService( 4822): Decrementing activity count... D/dalvikvm( 4822): GC_FOR_ALLOC freed 646K, 16% free 11236K/13324K, paused 26ms, total 26ms D/libEGL ( 4822): loaded /system/lib/egl/libEGL_mali.so D/libEGL ( 4822): loaded /system/lib/egl/libGLESv1_CM_mali.so D/libEGL ( 4822): loaded /system/lib/egl/libGLESv2_mali.so E/ ( 4822): Device driver API match E/ ( 4822): Device driver API version: 23 E/ ( 4822): User space API version: 23 E/ ( 4822): mali: REVISION=Linux-r3p2-01rel3 BUILD_DATE=Wed Oct 30 09:36:10 KST 2013 D/OpenGLRenderer( 4822): Enabling debug mode 0 W/service ( 4822): Broadcasting new secret... D/dalvikvm( 4822): GC_EXPLICIT freed 288K, 14% free 12613K/14596K, paused 3ms+6ms, total 85ms W/MmsSmsDatabase( 4822): Executing query: SELECT _id, body, read, type, address, address_device_id, subject, thread_id, status, date_sent, date_received, m_type, msg_box, part_count, ct_l, tr_id, m_size, exp, st, delivery_receipt_count, transport_type FROM (SELECT DISTINCT date_sent * 1 AS date_sent, date * 1 AS date_received, _id, body, read, thread_id, type, address, address_device_id, subject, NULL AS m_type, NULL AS msg_box, status, NULL AS part_count, NULL AS ct_l, NULL AS tr_id, NULL AS m_size, NULL AS exp, NULL AS st, delivery_receipt_count, 'sms' AS transport_type FROM sms WHERE (read = 0) UNION ALL SELECT DISTINCT date * 1000 AS date_sent, date_received * 1000 AS date_received, _id, body, read, thread_id, NULL AS type, address, address_device_id, NULL AS subject, m_type, msg_box, NULL AS status, part_count, ct_l, tr_id, m_size, exp, st, delivery_receipt_count, 'mms' AS transport_type FROM mms WHERE (read = 0) ORDER BY date_received ASC) W/SendReceiveService( 4822): Got a MasterSecret broadcast... W/PartProvider( 4822): Got master secret: org.thoughtcrime.securesms.crypto.MasterSecret@42a478c8 W/ShortcutBadger( 4822): No support for: com.sec.android.app.launcher W/KeyCachingService( 4822): Incrementing activity count... W/KeyCachingService( 4822): Decrementing activity count... D/AbsListView( 4822): Get MotionRecognitionManager W/DirectoryRefreshListener( 4822): Scheduling for: 1421409946792 D/AbsListView( 4822): onVisibilityChanged() is called, visibility : 4 D/AbsListView( 4822): unregisterIRListener() is called D/AbsListView( 4822): onVisibilityChanged() is called, visibility : 0 D/AbsListView( 4822): unregisterIRListener() is called W/KeyCachingService( 4822): Incrementing activity count... D/AbsListView( 4822): unregisterIRListener() is called W/RecipientProvider( 4822): Cache miss [ASYNC]! D/dalvikvm( 4822): GC_CONCURRENT freed 264K, 12% free 13279K/15048K, paused 5ms+3ms, total 36ms D/dalvikvm( 4822): WAIT_FOR_CONCURRENT_GC blocked 20ms D/dalvikvm( 4822): WAIT_FOR_CONCURRENT_GC blocked 18ms W/CursorWrapperInner( 4822): Cursor finalized without prior close() W/RecipientProvider( 4822): Cache miss [ASYNC]! W/RecipientProvider( 4822): Cache miss [ASYNC]! W/RecipientProvider( 4822): Cache miss [ASYNC]! W/RecipientProvider( 4822): Cache miss [ASYNC]! D/AbsListView( 4822): unregisterIRListener() is called D/AbsListView( 4822): unregisterIRListener() is called D/AbsListView( 4822): unregisterIRListener() is called W/RecipientProvider( 4822): Cache miss [ASYNC]! W/RecipientProvider( 4822): Cache miss [ASYNC]! W/RecipientProvider( 4822): Cache miss [ASYNC]! W/RecipientProvider( 4822): Cache miss [ASYNC]! D/AbsListView( 4822): unregisterIRListener() is called W/BitmapUtil( 4822): creating scaled bitmap with scale 0.5625 => 1152x720 D/dalvikvm( 4822): GC_FOR_ALLOC freed 217K, 12% free 13519K/15244K, paused 42ms, total 43ms I/dalvikvm-heap( 4822): Grow heap (frag case) to 24.664MB for 10485776-byte allocation D/dalvikvm( 4822): GC_FOR_ALLOC freed 1K, 7% free 23758K/25488K, paused 34ms, total 34ms W/Emoji ( 4822): bitmap for this page was null W/Emoji ( 4822): bitmap for this page was null W/Emoji ( 4822): bitmap for this page was null D/dalvikvm( 4822): GC_CONCURRENT freed 19K, 7% free 23743K/25488K, paused 12ms+5ms, total 66ms D/AbsListView( 4822): unregisterIRListener() is called W/BitmapUtil( 4822): rough scale 2048x1280 => 2048x1280 W/BitmapUtil( 4822): fine scale 2048x1280 => 1152x720 D/AbsListView( 4822): unregisterIRListener() is called D/AbsListView( 4822): unregisterIRListener() is called D/AbsListView( 4822): unregisterIRListener() is called D/AbsListView( 4822): unregisterIRListener() is called D/AbsListView( 4822): unregisterIRListener() is called D/AbsListView( 4822): unregisterIRListener() is called D/dalvikvm( 4822): GC_FOR_ALLOC freed 10431K, 42% free 17221K/29276K, paused 33ms, total 33ms D/AbsListView( 4822): unregisterIRListener() is called D/AbsListView( 4822): unregisterIRListener() is called D/AbsListView( 4822): Get MotionRecognitionManager D/AbsListView( 4822): unregisterIRListener() is called D/AbsListView( 4822): unregisterIRListener() is called D/AbsListView( 4822): unregisterIRListener() is called D/AbsListView( 4822): unregisterIRListener() is called D/AbsListView( 4822): onDetachedFromWindow D/AbsListView( 4822): unregisterIRListener() is called E/ViewRootImpl( 4822): sendUserActionEvent() mView == null W/MmsSmsDatabase( 4822): Executing query: SELECT _id, body, read, type, address, address_device_id, subject, thread_id, status, date_sent, date_received, m_type, msg_box, part_count, ct_l, tr_id, m_size, exp, st, delivery_receipt_count, transport_type FROM (SELECT DISTINCT date_sent * 1 AS date_sent, date * 1 AS date_received, _id, body, read, thread_id, type, address, address_device_id, subject, NULL AS m_type, NULL AS msg_box, status, NULL AS part_count, NULL AS ct_l, NULL AS tr_id, NULL AS m_size, NULL AS exp, NULL AS st, delivery_receipt_count, 'sms' AS transport_type FROM sms WHERE (read = 0) UNION ALL SELECT DISTINCT date * 1000 AS date_sent, date_received * 1000 AS date_received, _id, body, read, thread_id, NULL AS type, address, address_device_id, NULL AS subject, m_type, msg_box, NULL AS status, part_count, ct_l, tr_id, m_size, exp, st, delivery_receipt_count, 'mms' AS transport_type FROM mms WHERE (read = 0) ORDER BY date_received ASC) W/ShortcutBadger( 4822): No support for: com.sec.android.app.launcher D/AbsListView( 4822): unregisterIRListener() is called D/AbsListView( 4822): unregisterIRListener() is called D/AbsListView( 4822): unregisterIRListener() is called D/AbsListView( 4822): unregisterIRListener() is called D/AbsListView( 4822): unregisterIRListener() is called D/AbsListView( 4822): onDetachedFromWindow D/AbsListView( 4822): unregisterIRListener() is called E/ViewRootImpl( 4822): sendUserActionEvent() mView == null W/KeyCachingService( 4822): Decrementing activity count... D/AbsListView( 4822): Get MotionRecognitionManager D/AbsListView( 4822): onVisibilityChanged() is called, visibility : 4 D/AbsListView( 4822): unregisterIRListener() is called D/AbsListView( 4822): onVisibilityChanged() is called, visibility : 0 D/AbsListView( 4822): unregisterIRListener() is called D/AbsListView( 4822): unregisterIRListener() is called W/KeyCachingService( 4822): Incrementing activity count... D/AbsListView( 4822): unregisterIRListener() is called D/AbsListView( 4822): unregisterIRListener() is called D/AbsListView( 4822): unregisterIRListener() is called D/AbsListView( 4822): onVisibilityChanged() is called, visibility : 4 D/AbsListView( 4822): unregisterIRListener() is called D/AbsListView( 4822): onDetachedFromWindow D/AbsListView( 4822): Get MotionRecognitionManager D/AbsListView( 4822): unregisterIRListener() is called D/AbsListView( 4822): unregisterIRListener() is called W/KeyCachingService( 4822): Decrementing activity count... D/AbsListView( 4822): unregisterIRListener() is called

hebu avatar Jan 16 '15 07:01 hebu

I can confirm the behavior on TS 2.4.2 running on a Galaxy Note 3. The log file is here: https://gist.github.com/anonymous/ed9a2f6d5943a91e87d0 Tried uninstalling, clearing data all the lot. No luck.

Wydarr avatar Jan 21 '15 16:01 Wydarr

Should it not be possible to show the true number of unread messages on the affected devices, it would already be helpful, if it just wouldn't show any number of unread messages.

hebu avatar Jan 22 '15 14:01 hebu

@mcginty as you have samungs devices around... could be vendor (-api) specific

McLoo avatar Jan 22 '15 15:01 McLoo

So, would it be an option to detect a Samsung device and just remove the badge from the icon?

hebu avatar Jan 22 '15 15:01 hebu

My Galaxy S4 behaves correctly with the unread messages count, so blanketing this as all samsung may not be completely correct.

jeremymasters avatar Jan 22 '15 15:01 jeremymasters

I can confirm the same behavior in Samsung Galxy SII (i900) with latest Cyanogenmod installed. Keeps indicating several new Messages from one of my contacts from time to time.

eX00r avatar Jan 27 '15 10:01 eX00r

i have the same issue with my moto g (lte), stock android. here is my log: https://gist.github.com/anonymous/b58842bf795566ef60cf

fabsmusicjunkie avatar Jan 27 '15 15:01 fabsmusicjunkie

The behavior is the same at version 2.5.1. Not to mention the fact that the "rebranding" is unfortunate to say the least. For example the main icon us blue, but when entering the unlocking password the icon is still green. So on one hand I have a bug that stands for 20 days now and instead of fixing it we have a... frigging rebranding. Oh well...

Wydarr avatar Feb 10 '15 16:02 Wydarr

@Wydarr please only leave comments in issues if they provide new information that can help identify the root cause of bugs.

If you want the issues fixed faster, we accept pull requests or productive diagnostic info.

mcginty avatar Feb 11 '15 00:02 mcginty

Off topic: By all means, apologies if I offended anyone. On the other hand my comment provided the (basic) info that the behavior still stands in the latest version, albeit spiced with a little bit of venting. The root cause (of the venting of course) is that I am a very early adopter of Text Secure, I have campaigned vigorously among my acquaintances for its exclusive use (in my phone it completely replaces the standard messaging app) and since the problems appeared, three weeks ago the app feels (at least from my point of view) less... composed. So once again apologies if egos were bruised.

On topic: Here is the updated log for the latest version: https://gist.github.com/anonymous/c6d877b6cf76a7eaa7d4

P.S. Alas I have no programming skills but let me know the ways in which I can help you with the bug and I by all means I shall.

Wydarr avatar Feb 11 '15 03:02 Wydarr

@eX00r you don't have the unread count on the app icon but as a notification, right? CM launcher has no support for icon badges. @hebu do you also have a notification fr unread messages? Or just the count on the icon?

McLoo avatar Feb 11 '15 08:02 McLoo

Yes, only in the notification bar of android. Am 11.02.2015 09:16 schrieb "McLoo" [email protected]:

@eX00r https://github.com/eX00r you don't have the unread count on the app icon but as a notification, right? CM launcher has no support for icon badges. @hebu https://github.com/hebu do you also have a notification fr unread messages? Or just the count on the icon?

— Reply to this email directly or view it on GitHub https://github.com/WhisperSystems/TextSecure/issues/2358#issuecomment-73846254 .

eX00r avatar Feb 11 '15 08:02 eX00r

I have the icon badge only, no notification.

hebu avatar Feb 11 '15 10:02 hebu

Hey guys, would you mind to answer how you mark the messages as unread?

  • by tapping the notification to open the conversation (or by opening TS from drawer or task list)
  • by expanding the notification and tap "Mark (all) as read"
  • by tapping "Mark all read" from the conversation list menu inside TS

The last method is the only thread and read-state independent and should set every message unread. The first two are are set by thread id and only if read != 0.

McLoo avatar Feb 19 '15 17:02 McLoo

for me, none of this options work. I already tried to delete the whole conversation, but this also doesn't make a difference.

to notifications: I get a led notification, but no sound or vibration.

fabsmusicjunkie avatar Feb 19 '15 17:02 fabsmusicjunkie

Hello!

Usually the first, sometimes the second option - and the last option only once for testing. Also, the counter stays at "1", no matter how many unread messages there are.

Greets, HeBu

hebu avatar Feb 19 '15 17:02 hebu