I have:
The compose hint and send button text don't match in landscape after changing transport mode.


Related #3623
fixed by #5063?
Just tested, unfortunately not :crying_cat_face:


After a quick attempt, I was unable to reproduce, so I'll look into it more tonight.
@2-4601: I do have a question:
- Open a Signal conversation
- Turn device landscape
- Change transport mode to SMS
Does the compose hint in the conversation window change to accurately reflect the transport change at this time, before the IME takes over in the next step?
4 Tap compose box
Does the compose hint in the conversation window change to accurately reflect the transport change at this time, before the IME takes over in the next step?
Yes. (edited the steps to say that explicitly)
@2-4601: Unfortunately, I haven't been able to reproduce the issue on my device (Nexus 5, Android 6.0.1).
Your report indicates that in landscape, the IME action label is reflecting the correct state, and matches what was shown on the conversation screen's compose hint (before tapping on it to bring up the fullscreen IME), yet the fullscreen IME's hint reflects an incorrect (perhaps previous?) state.
The code in current master assigns the same string to both the IME action label and the hint, within the same method. There is no separate IME hint, so it would take some deeper digging to find out why this is happening.
What IME are you using? Stock Google Keyboard, or another? Does this issue still rear its ugly mug if you change IME's?
@agrajaghh: were you able to reproduce?
Stock keyboard. I don't think I have other IMEs, or do different language inputs count?
There has been some issues with orientation/rotating before (and still is). Dunno if that could be related.
I can reproduce it constantly on my two devices. Even tried setting all preferences to default (language, theme), rebooting phone and still reproducable.
Different language keyboards are usually separate IME's (separate entries in Settings), so yes, they count.
The issues I've seen on orientation change have been mainly with dynamic language, really difficult to isolate and reproduce, though.
I'll try more tomorrow. Once I can reproduce, there will be light. :sunny:
Also, if you have a build environment set up, I can add logging in a commit... that might be quicker. Please let me know.
I tried bunch of languages with Google Keyboard. All had the issue.
Also tried Google Korean Input which did not have the issue. I guess mainly because it never goes to the full screen input mode in landscape.
And I tried Google Pinyin Input which does go to full screen in landscape and consequently has the bug.
Also, if you have a build environment set up, I can add logging in a commit... that might be quicker. Please let me know.
Sounds like a plan! :)
Cannot reproduce with Signal 3.13.1, Nexus 5, Android 6.0.1, SwiftKey and Google keyboards.
Reproduced today with Signal 3.13.1 on Samsung Galaxy S6 with android 5.1.1, I use default samsung keyboard. Seems like bug.
@2-4601:
Also, if you have a build environment set up, I can add logging in a commit... that might be quicker. Please let me know.
Sounds like a plan! :)
In a new directory...
git clone https://github.com/unrulygnu/Signal-Android.git
cd Signal-Android
git checkout issue-5294-compose-hint-send-button-mismatch
...then build, deploy, reproduce, and post the log. The new log entries are all tagged ComposeText, so they're easy to find. Hopefully this will point us in the right direction. Thanks!
Affected
Huawei U8800, Android 4.0.4, Signal 3.11.1
Nexus 4, stock Android 5.1.1, Signal 3.13.0
Signal 3.13.1 on Samsung Galaxy S6 with android 5.1.1
Unaffected
Nexus 5, Android 6.0.1
Signal 3.13.1, Nexus 5, Android 6.0.1
This may be related to the platform, fixed in Marshmallow. If I can make time this weekend, I'll downgrade and confirm.
Here's a log while going through the steps laid out in the first post:
I/WindowManager( 292): SCREENLAYOUT_SIZE (1:small, 2:normal, 3:large, 4:xlarge) 2
I/ActivityManager( 292): Config changed: {1.0 0mcc0mnc en_US layoutdir=0 sw320dp w533dp h294dp nrml long land finger -keyb/v/h -nav/h s.10}
W/ConversationActivity( 9773): onConfigurationChanged(2)
D/ComposeText( 9773): setTransport() called with: transport = [org.thoughtcrime.securesms.TransportOption@421bea80]
D/ComposeText( 9773): setTransport: isLandscape()=true, setting IME action label=Send Signal message
D/ComposeText( 9773): setTransport: setting compose hint=Send Signal message
D/ComposeText( 9773): setHint() called with: hint = [Send Signal message], subHint = [null]
D/ComposeText( 9773): setHint: calling super.setHint() with ellipsized hint=Send Signal message
W/QuickAttachmentDrawer( 9773): updateControlsView()
W/KeyboardAwareLinearLayout( 9773): rotation changed
W/KeyboardAwareLinearLayout( 9773): onKeyboardClose()
W/CameraView( 9773): skipping layout due to zero-width/height preview size
W/dalvikvm( 9773): VFY: unable to resolve virtual method 12197: Landroid/widget/PopupWindow;.showAsDropDown (Landroid/view/View;III)V
D/ComposeText( 9773): setTransport() called with: transport = [org.thoughtcrime.securesms.TransportOption@421bea00]
D/ComposeText( 9773): setTransport: isLandscape()=true, setting IME action label=Send unsecured SMS
D/ComposeText( 9773): setTransport: setting compose hint=Send unsecured SMS
D/ComposeText( 9773): setHint() called with: hint = [Send unsecured SMS], subHint = [null]
D/ComposeText( 9773): setHint: calling super.setHint() with ellipsized hint=Send unsecured SMS
W/InputManagerService( 292): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@41c141f8
D/KeyboardTheme( 487): No property defined for ro.com.google.ime.theme_id
W/RichInputMethodSubtype( 487): Can't find emoji subtype
W/RichInputMethodSubtype( 487): No input method subtype found; returning dummy subtype: Multi-lingual subtype: android.view.inputmethod.InputMethodSubtype@d78b2ed0, zz
I/EmojiCategory( 487): Last Emoji category id is 6
W/ViewPager( 487): Requested offscreen page limit 0 too small; defaulting to 1
I/Keyboard.Facilitator( 487): onStartInput()
D/KeyboardTheme( 487): No property defined for ro.com.google.ime.theme_id
I/LatinIME( 487): Starting input. Cursor position = 0,0
I/Keyboard.Facilitator( 487): resetDictionaries() : no-op
I/StatsUtilsManager( 487): onLoadSettings()
D/ComposeText( 9773): setTransport() called with: transport = [org.thoughtcrime.securesms.TransportOption@421bea80]
D/ComposeText( 9773): setTransport: isLandscape()=true, setting IME action label=Send Signal message
D/ComposeText( 9773): setTransport: setting compose hint=Send Signal message
D/ComposeText( 9773): setHint() called with: hint = [Send Signal message], subHint = [null]
D/ComposeText( 9773): setHint: calling super.setHint() with ellipsized hint=Send Signal message
W/InputManagerService( 292): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@41c02a30
I/Keyboard.Facilitator( 487): onStartInput()
D/KeyboardTheme( 487): No property defined for ro.com.google.ime.theme_id
I/LatinIME( 487): Starting input. Cursor position = 0,0
I/Keyboard.Facilitator( 487): resetDictionaries() : no-op
I/StatsUtilsManager( 487): onLoadSettings()
Huawei U8800, Android 4.0.4, stock keyboard
Reproduced on a Samsung Galaxy J SC-02F, Android 5.0 LRX21V, Signal 3.13.0
@2-4601, thanks for the log. I'm following up.
I was able to reproduce the behavior in Marshmallow by copying, pasting, and tweaking ComposeText#setTransport(TransportOption) code into a new test project. Note, however, that I haven't yet isolated what in Signal keeps this behavior from appearing in Marshmallow.
In the test project, calling setHint(CharSequence) before setInputType(int) seems to resolve the issue, at least in Marshmallow. I've tested the same change in Signal with no ill effects so far.
@2-4601: I pushed a new commit to my issue-5294-compose-hint-send-button-mismatch branch. Could you test it when you have time and let me know if there is any change? Also, I added a couple of log statements that output the values of inputType and imeOptions for comparison with other devices. Thanks!
let me know if there is any change?
I don't experience the bug any more with your latest changes. :clap:
Tested on Huawei U8800, Android 4.0.4
Here's the log anyway:
[TURN DEVICE LANDSCAPE]
I/WindowManager( 292): SCREENLAYOUT_SIZE (1:small, 2:normal, 3:large, 4:xlarge) 2
I/ActivityManager( 292): Config changed: {1.0 0mcc0mnc en_US layoutdir=0 sw320dp w533dp h294dp nrml long land finger -keyb/v/h -nav/h s.30}
W/ConversationActivity(14635): onConfigurationChanged(2)
D/ComposeText(14635): setTransport() called with: transport = [org.thoughtcrime.securesms.TransportOption@41b8e818]
D/ComposeText(14635): setTransport: isLandscape()=true, setting IME action label=Send Signal message
D/ComposeText(14635): setTransport: setting imeOptions=1073741828
D/ComposeText(14635): setTransport: setting compose hint=Send Signal message
D/ComposeText(14635): setHint() called with: hint = [Send Signal message], subHint = [null]
D/ComposeText(14635): setHint: calling super.setHint() with ellipsized hint=Send Signal message
D/ComposeText(14635): setTransport: setting inputType=180225
W/QuickAttachmentDrawer(14635): updateControlsView()
W/KeyboardAwareLinearLayout(14635): rotation changed
W/KeyboardAwareLinearLayout(14635): onKeyboardClose()
W/CameraView(14635): skipping layout due to zero-width/height preview size
[LONG-PRESS SEND BUTTON]
[TAP "INSECURE SMS"]
D/ComposeText(14635): setTransport() called with: transport = [org.thoughtcrime.securesms.TransportOption@41b8ea38]
D/ComposeText(14635): setTransport: isLandscape()=true, setting IME action label=Send unsecured SMS
D/ComposeText(14635): setTransport: setting imeOptions=1073741828
D/ComposeText(14635): setTransport: setting compose hint=Send unsecured SMS
D/ComposeText(14635): setHint() called with: hint = [Send unsecured SMS], subHint = [null]
D/ComposeText(14635): setHint: calling super.setHint() with ellipsized hint=Send unsecured SMS
D/ComposeText(14635): setTransport: setting inputType=180225
W/InputManagerService( 292): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@41b082f0
[TAP COMPOSE FIELD]
D/KeyboardTheme( 487): No property defined for ro.com.google.ime.theme_id
W/RichInputMethodSubtype( 487): Can't find emoji subtype
W/RichInputMethodSubtype( 487): No input method subtype found; returning dummy subtype: Multi-lingual subtype: android.view.inputmethod.InputMethodSubtype@d78b2ed0, zz
I/EmojiCategory( 487): Last Emoji category id is 6
W/ViewPager( 487): Requested offscreen page limit 0 too small; defaulting to 1
I/Keyboard.Facilitator( 487): onStartInput()
D/KeyboardTheme( 487): No property defined for ro.com.google.ime.theme_id
I/LatinIME( 487): Starting input. Cursor position = 0,0
I/Keyboard.Facilitator( 487): resetDictionaries() : no-op
I/StatsUtilsManager( 487): onLoadSettings()
[DISMISS KEYBOARD]
[LONG-PRESS SEND BUTTON]
[TAP "SIGNAL"]
D/ComposeText(14635): setTransport() called with: transport = [org.thoughtcrime.securesms.TransportOption@41b8e818]
D/ComposeText(14635): setTransport: isLandscape()=true, setting IME action label=Send Signal message
D/ComposeText(14635): setTransport: setting imeOptions=1073741828
D/ComposeText(14635): setTransport: setting compose hint=Send Signal message
D/ComposeText(14635): setHint() called with: hint = [Send Signal message], subHint = [null]
D/ComposeText(14635): setHint: calling super.setHint() with ellipsized hint=Send Signal message
D/ComposeText(14635): setTransport: setting inputType=180225
W/InputManagerService( 292): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@4197ff00
[TAP COMPOSE FIELD]
I/Keyboard.Facilitator( 487): onStartInput()
D/KeyboardTheme( 487): No property defined for ro.com.google.ime.theme_id
I/LatinIME( 487): Starting input. Cursor position = 0,0
I/Keyboard.Facilitator( 487): resetDictionaries() : no-op
I/StatsUtilsManager( 487): onLoadSettings()
GitHub Issue Cleanup:
See #7598 for more information.