Clam- / TraditionalT9

T9 English IME input for Android using hardware keypad. I am no longer updating this project. You may wish to try out sspanak's fork here: https://github.com/sspanak/tt9
Other
59 stars 46 forks source link

Add IME-like input submit functionality #22

Closed r44r1 closed 1 year ago

r44r1 commented 6 years ago

Hi,

I'm using Kyocera flip running Android 5.1 together with your keyboard.

The issue is that in some input areas text can be typed but don't accepted by application. I am facing it primarly with standard apps (inc. lock screen), but in some external too - mainly in Material-themed. The only workaround is to switch to native IME keyboard and confirm previously entered text. But this is very annoying because in android 5 keyboard can't be switched in-place.

Is it possible to add IME submit event action to layout, maybe as a variant for zero key (next to newline)?

Clam- commented 6 years ago

Hi,

By default, long pressing the pound/hash key should trigger the "default editor action": https://github.com/Clam-/TraditionalT9/blob/master/src/org/nyanya/android/traditionalt9/TraditionalT9.java#L645 https://developer.android.com/reference/android/inputmethodservice/InputMethodService.html#sendDefaultEditorAction(boolean)

Note that if the editor has special handling for enter (as in it's possible or even desired to put a new line), it will perform that action instead. But if there's no "special" action required for the enter key, the editor will perform it's default action (send, submit, run, etc). If the editor has not defined a default action, then there's not much I can do unless there's another API I need to check for it.

Please let me know how this goes and if there's any extra information that might be useful.

r44r1 commented 6 years ago

Longpress doesn't help, it just changes input mode to digits. I use non-T9 mode as default.

Based on info you provided, I suppose that iWnn IME (default keyboard) does some API call after pressing "done" in input field, and framework handles this call and transform it to submit action. I'll try to catch it by DDMS now.

r44r1 commented 6 years ago

So, I gather up some logs.

Scenario was the same for both keyboards: to click on button which opened text edit area, input some text and click on input submit

My logcat was too overflooded, so I apply filter:

tag:^(?!StatusBar.*|VM_BMS|SurfaceFlinger|TelephonyIcons|ImageView|ServiceManager|Connectivity*|PhoneApp|Location*|EmojiDrawable|QC_RIL*|Qcril*))

I don't think any of this could be tied with text input.

Logs itself. Sorry for long blocks, but I can't get them folded under spoilers with keep formatting sane.

T9 with email app, HASH as submit

05-06 18:14:59.161: D/onKeyDown(2836): Key: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_DPAD_CENTER, scanCode=28, metaState=0, flags=0x8, repeatCount=0, eventTime=42077660, downTime=42077660, deviceId=8, source=0x301 } repeat?: 0 long-time: false
05-06 18:14:59.171: V/PC mail(28074): [KcNfpActivity]notifyKeyCenter() Not override key event
05-06 18:14:59.251: I/Timeline(28074): Timeline: Activity_launch_request id:com.android.email time:42077757
05-06 18:14:59.251: I/ActivityManager(865): START u0 {cmp=com.android.email/com.android.mail.ui.InputTextActivity (has extras)} from uid 10049 on display 0
05-06 18:14:59.261: V/WindowManager(865): addAppToken: AppWindowToken{1c6a8276 token=Token{33857111 ActivityRecord{1230dd38 u0 com.android.email/com.android.mail.ui.InputTextActivity t34212}}} to stack=1 task=34212 at 2
05-06 18:14:59.311: V/PC mail(28074): [InputTextActivity]onCreate() IN inputType = 131153
05-06 18:14:59.311: I/ViewRootImpl(28074): CPU Rendering VSync enable = true
05-06 18:14:59.321: V/WindowManager(865): Adding window Window{8b294e4 u0 com.android.email/com.android.mail.ui.InputTextActivity} at 11 of 16 (after Window{1e03ea20 u0 com.android.email/com.android.email.activity.ComposeActivityEmail})
05-06 18:14:59.331: D/doLineRunnable(28074): do
05-06 18:14:59.331: D/doLineRunnable(28074): do
05-06 18:14:59.341: V/PhoneStatusBar(2705): setLightsOn(true)
05-06 18:14:59.391: I/Timeline(28074): Timeline: Activity_idle id: android.os.BinderProxy@3a21777d time:42077894
05-06 18:14:59.411: I/ActivityManager(865): Displayed com.android.email/com.android.mail.ui.InputTextActivity: +135ms
05-06 18:14:59.431: I/Timeline(865): Timeline: Activity_windows_visible id: ActivityRecord{1230dd38 u0 com.android.email/com.android.mail.ui.InputTextActivity t34212} time:42077938
05-06 18:14:59.451: D/T9.onEvaluateInputViewShown(2836): whatis
05-06 18:15:00.051: W/ResourceType(3169): Failure getting entry for 0x7f020120 (t=1 e=288) (error -75)
05-06 18:15:01.531: D/onKeyDown(2836): Key: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_5, scanCode=6, metaState=0, flags=0x8, repeatCount=0, eventTime=42080030, downTime=42080030, deviceId=8, source=0x301 } repeat?: 0 long-time: false
05-06 18:15:01.531: D/T9.onEvaluateInputViewShown(2836): whatis
05-06 18:15:01.541: I/ViewRootImpl(2836): CPU Rendering VSync enable = true
05-06 18:15:01.551: D/T9.onEvaluateInputViewShown(2836): whatis
05-06 18:15:01.551: D/doLineRunnable(2836): do
05-06 18:15:02.041: D/onKeyDown(2836): Key: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_6, scanCode=7, metaState=0, flags=0x8, repeatCount=0, eventTime=42080540, downTime=42080540, deviceId=8, source=0x301 } repeat?: 0 long-time: false
05-06 18:15:02.041: D/T9.onEvaluateInputViewShown(2836): whatis
05-06 18:15:02.041: D/T9.onEvaluateInputViewShown(2836): whatis
05-06 18:15:04.711: D/T9.onEvaluateInputViewShown(2836): whatis

**SUMBIT GOES NEXT - LONG-PRESS HASH KEY**

05-06 18:15:04.711: D/onKeyDown(2836): Key: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_POUND, scanCode=253, metaState=0, flags=0x8, repeatCount=0, eventTime=42083210, downTime=42083210, deviceId=8, source=0x301 } repeat?: 0 long-time: false
05-06 18:15:04.711: D/T9.onEvaluateInputViewShown(2836): whatis
05-06 18:15:05.211: D/T9.onEvaluateInputViewShown(2836): whatis
05-06 18:15:05.211: D/onKeyDown(2836): Key: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_POUND, scanCode=253, metaState=0, flags=0x88, repeatCount=1, eventTime=42083711, downTime=42083210, deviceId=8, source=0x301 } repeat?: 1 long-time: true
05-06 18:15:05.211: I/NotificationService(865): cancelToast pkg=org.nyanya.android.traditionalt9 callback=android.app.ITransientNotification$Stub$Proxy@19320468
05-06 18:15:05.221: I/ViewRootImpl(2836): CPU Rendering VSync enable = true
05-06 18:15:05.271: D/onKeyDown(2836): Key: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_POUND, scanCode=253, metaState=0, flags=0x8, repeatCount=2, eventTime=42083762, downTime=42083210, deviceId=8, source=0x301 } repeat?: 2 long-time: false
05-06 18:15:05.271: D/T9.onEvaluateInputViewShown(2836): whatis
05-06 18:15:05.311: D/T9.onEvaluateInputViewShown(2836): whatis
05-06 18:15:05.311: D/onKeyDown(2836): Key: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_POUND, scanCode=253, metaState=0, flags=0x8, repeatCount=3, eventTime=42083813, downTime=42083210, deviceId=8, source=0x301 } repeat?: 3 long-time: false
05-06 18:15:05.371: D/onKeyDown(2836): Key: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_POUND, scanCode=253, metaState=0, flags=0x8, repeatCount=4, eventTime=42083863, downTime=42083210, deviceId=8, source=0x301 } repeat?: 4 long-time: false
05-06 18:15:05.371: D/T9.onEvaluateInputViewShown(2836): whatis
05-06 18:15:05.421: D/onKeyDown(2836): Key: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_POUND, scanCode=253, metaState=0, flags=0x8, repeatCount=5, eventTime=42083913, downTime=42083210, deviceId=8, source=0x301 } repeat?: 5 long-time: false
05-06 18:15:05.421: D/T9.onEvaluateInputViewShown(2836): whatis
05-06 18:15:05.461: D/T9.onEvaluateInputViewShown(2836): whatis
05-06 18:15:05.461: D/onKeyDown(2836): Key: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_POUND, scanCode=253, metaState=0, flags=0x8, repeatCount=6, eventTime=42083963, downTime=42083210, deviceId=8, source=0x301 } repeat?: 6 long-time: false
05-06 18:15:05.521: D/T9.onEvaluateInputViewShown(2836): whatis
05-06 18:15:05.521: D/onKeyDown(2836): Key: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_POUND, scanCode=253, metaState=0, flags=0x8, repeatCount=7, eventTime=42084014, downTime=42083210, deviceId=8, source=0x301 } repeat?: 7 long-time: false
05-06 18:15:05.571: D/onKeyDown(2836): Key: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_POUND, scanCode=253, metaState=0, flags=0x8, repeatCount=8, eventTime=42084065, downTime=42083210, deviceId=8, source=0x301 } repeat?: 8 long-time: false
05-06 18:15:05.571: D/T9.onEvaluateInputViewShown(2836): whatis
05-06 18:15:05.611: D/T9.onEvaluateInputViewShown(2836): whatis
05-06 18:15:05.611: D/onKeyDown(2836): Key: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_POUND, scanCode=253, metaState=0, flags=0x8, repeatCount=9, eventTime=42084116, downTime=42083210, deviceId=8, source=0x301 } repeat?: 9 long-time: false
05-06 18:15:05.661: D/T9.onEvaluateInputViewShown(2836): whatis
05-06 18:15:05.671: D/onKeyDown(2836): Key: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_POUND, scanCode=253, metaState=0, flags=0x8, repeatCount=10, eventTime=42084167, downTime=42083210, deviceId=8, source=0x301 } repeat?: 10 long-time: false
05-06 18:15:05.721: D/onKeyDown(2836): Key: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_POUND, scanCode=253, metaState=0, flags=0x8, repeatCount=11, eventTime=42084218, downTime=42083210, deviceId=8, source=0x301 } repeat?: 11 long-time: false
05-06 18:15:05.721: D/T9.onEvaluateInputViewShown(2836): whatis
05-06 18:15:05.771: D/onKeyDown(2836): Key: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_POUND, scanCode=253, metaState=0, flags=0x8, repeatCount=12, eventTime=42084268, downTime=42083210, deviceId=8, source=0x301 } repeat?: 12 long-time: false
05-06 18:15:05.771: D/T9.onEvaluateInputViewShown(2836): whatis
05-06 18:15:05.821: D/T9.onEvaluateInputViewShown(2836): whatis
05-06 18:15:05.821: D/onKeyDown(2836): Key: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_POUND, scanCode=253, metaState=0, flags=0x8, repeatCount=13, eventTime=42084318, downTime=42083210, deviceId=8, source=0x301 } repeat?: 13 long-time: false
05-06 18:15:05.871: D/onKeyDown(2836): Key: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_POUND, scanCode=253, metaState=0, flags=0x8, repeatCount=14, eventTime=42084369, downTime=42083210, deviceId=8, source=0x301 } repeat?: 14 long-time: false
05-06 18:15:05.871: D/T9.onEvaluateInputViewShown(2836): whatis
05-06 18:15:05.921: D/onKeyDown(2836): Key: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_POUND, scanCode=253, metaState=0, flags=0x8, repeatCount=15, eventTime=42084419, downTime=42083210, deviceId=8, source=0x301 } repeat?: 15 long-time: false
05-06 18:15:05.921: D/T9.onEvaluateInputViewShown(2836): whatis
05-06 18:15:05.971: D/onKeyDown(2836): Key: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_POUND, scanCode=253, metaState=0, flags=0x8, repeatCount=16, eventTime=42084471, downTime=42083210, deviceId=8, source=0x301 } repeat?: 16 long-time: false
05-06 18:15:05.971: D/T9.onEvaluateInputViewShown(2836): whatis
05-06 18:15:06.031: D/onKeyDown(2836): Key: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_POUND, scanCode=253, metaState=0, flags=0x8, repeatCount=17, eventTime=42084521, downTime=42083210, deviceId=8, source=0x301 } repeat?: 17 long-time: false
05-06 18:15:06.031: D/T9.onEvaluateInputViewShown(2836): whatis

T9 with email app, DPAD CENTER as submit

05-06 18:08:49.501: D/onKeyDown(2836): Key: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_DPAD_CENTER, scanCode=28, metaState=0, flags=0x8, repeatCount=0, eventTime=41708000, downTime=41708000, deviceId=8, source=0x301 } repeat?: 0 long-time: false
05-06 18:08:49.511: V/PC mail(24469): [KcNfpActivity]notifyKeyCenter() Not override key event
05-06 18:08:49.591: I/Timeline(24469): Timeline: Activity_launch_request id:com.android.email time:41708096
05-06 18:08:49.591: I/ActivityManager(865): START u0 {cmp=com.android.email/com.android.mail.ui.InputTextActivity (has extras)} from uid 10049 on display 0
05-06 18:08:49.601: V/WindowManager(865): addAppToken: AppWindowToken{2f65ef22 token=Token{2dc534ed ActivityRecord{28201704 u0 com.android.email/com.android.mail.ui.InputTextActivity t34203}}} to stack=1 task=34203 at 2
05-06 18:08:49.641: V/PC mail(24469): [InputTextActivity]onCreate() IN inputType = 131153
05-06 18:08:49.651: I/ViewRootImpl(24469): CPU Rendering VSync enable = true
05-06 18:08:49.651: V/WindowManager(865): Adding window Window{2e099f70 u0 com.android.email/com.android.mail.ui.InputTextActivity} at 11 of 17 (after Window{1761666c u0 com.android.email/com.android.email.activity.ComposeActivityEmail})
05-06 18:08:49.671: D/doLineRunnable(24469): do
05-06 18:08:49.671: D/doLineRunnable(24469): do
05-06 18:08:49.681: V/PhoneStatusBar(2705): setLightsOn(true)
05-06 18:08:49.721: I/Timeline(24469): Timeline: Activity_idle id: android.os.BinderProxy@97c46d time:41708226
05-06 18:08:49.731: I/ActivityManager(865): Displayed com.android.email/com.android.mail.ui.InputTextActivity: +122ms
05-06 18:08:49.761: I/Timeline(865): Timeline: Activity_windows_visible id: ActivityRecord{28201704 u0 com.android.email/com.android.mail.ui.InputTextActivity t34203} time:41708268
05-06 18:08:49.791: D/T9.onEvaluateInputViewShown(2836): whatis
05-06 18:08:50.561: D/T9.onEvaluateInputViewShown(2836): whatis
05-06 18:08:50.561: D/onKeyDown(2836): Key: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_2, scanCode=3, metaState=0, flags=0x8, repeatCount=0, eventTime=41709060, downTime=41709060, deviceId=8, source=0x301 } repeat?: 0 long-time: false
05-06 18:08:50.561: D/T9.onEvaluateInputViewShown(2836): whatis
05-06 18:08:51.111: D/T9.onEvaluateInputViewShown(2836): whatis
05-06 18:08:51.111: D/onKeyDown(2836): Key: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_5, scanCode=6, metaState=0, flags=0x8, repeatCount=0, eventTime=41709610, downTime=41709610, deviceId=8, source=0x301 } repeat?: 0 long-time: false
05-06 18:08:51.111: D/T9.onEvaluateInputViewShown(2836): whatis
05-06 18:08:51.831: D/onKeyDown(2836): Key: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_6, scanCode=7, metaState=0, flags=0x8, repeatCount=0, eventTime=41710330, downTime=41710330, deviceId=8, source=0x301 } repeat?: 0 long-time: false
05-06 18:08:51.831: D/T9.onEvaluateInputViewShown(2836): whatis
05-06 18:08:51.841: D/T9.onEvaluateInputViewShown(2836): whatis

**SUMBIT GOES NEXT - SHORT-PRESS DPAD CENTER KEY**

05-06 18:08:54.181: D/onKeyDown(2836): Key: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_DPAD_CENTER, scanCode=28, metaState=0, flags=0x8, repeatCount=0, eventTime=41712680, downTime=41712680, deviceId=8, source=0x301 } repeat?: 0 long-time: false
05-06 18:08:54.181: W/onKeyDown(2836): Unhandled Key: 23(KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_DPAD_CENTER, scanCode=28, metaState=0, flags=0x8, repeatCount=0, eventTime=41712680, downTime=41712680, deviceId=8, source=0x301 })
05-06 18:08:54.191: V/PC mail(24469): [KcNfpActivity]notifyKeyCenter() Not override key event
05-06 18:08:54.271: W/onKeyUp(2836): Unhandled Key: 23(KeyEvent { action=ACTION_UP, keyCode=KEYCODE_DPAD_CENTER, scanCode=28, metaState=0, flags=0x8, repeatCount=0, eventTime=41712770, downTime=41712680, deviceId=8, source=0x301 })
05-06 18:08:54.271: D/T9.onEvaluateInputViewShown(2836): whatis

The most interesting part, iWNN for submit text already entered by T9 (double-press DPAD CENTER)

05-06 18:11:38.421: I/Timeline(3169): Timeline: Activity_launch_request id:com.android.email time:41876925
05-06 18:11:38.421: I/ActivityManager(865): START u0 {act=android.intent.action.MAIN flg=0x10200000 cmp=com.android.email/.activity.Welcome} from uid 10003 on display 0
05-06 18:11:38.441: W/WindowManager(865): Attempted to set focus to non-existing app token: Token{dbb885d ActivityRecord{115395d2 u0 com.android.email/.activity.Welcome t34208}}
05-06 18:11:38.471: V/PhoneStatusBar(2705): setLightsOn(true)
05-06 18:11:38.491: I/Timeline(27695): Timeline: Activity_idle id: android.os.BinderProxy@34089886 time:41876997
05-06 18:11:38.501: I/Timeline(865): Timeline: Activity_windows_visible id: ActivityRecord{9d60748 u0 com.android.email/com.android.mail.ui.InputTextActivity t34208} time:41877007
05-06 18:11:38.681: W/ResourcesManager(2705): Asset path '/system/framework/com.nextfp.android.util.jar' does not exist or contains no resources.
05-06 18:11:38.711: I/ViewRootImpl(22466): CPU Rendering VSync enable = true
05-06 18:11:38.721: D/doLineRunnable(22466): do

** SUBMIT KEY PRESSED HERE**

05-06 18:11:41.761: I/Email(27695): Body populated, len: 3, sig: true
05-06 18:11:41.771: D/PC mail(27695): [KcMDMUtility]isAttachmentLocked() CHECK ATTACH LOCK
05-06 18:11:41.781: D/PC mail(27695): [KcMDMUtility]isAttachmentLocked() IS ATTACH LOCKED? false
05-06 18:11:41.781: D/PC mail(27695): [KcMDMUtility]isMdmLocked() START CHECK MDM LOCKS
05-06 18:11:41.781: D/PC mail(27695): [KcMDMUtility]isMailLocked() CHECK MAIL LOCK
05-06 18:11:41.791: D/PC mail(27695): [KcMDMUtility]isMailLocked() IS MAIL LOCKED? false
05-06 18:11:41.791: D/PC mail(27695): [KcMDMUtility]isPCmailLocked() CHECK PCMAIL LOCK
05-06 18:11:41.791: D/PC mail(27695): [KcMDMUtility]isPCmailLocked() IS PCMAIL LOCKED? false
05-06 18:11:41.791: D/PC mail(27695): [KcMDMUtility]isSMailLocked() CHECK S!MAIL LOCK
05-06 18:11:41.801: D/PC mail(27695): [KcMDMUtility]isSMailLocked() IS S!MAIL LOCKED? false
05-06 18:11:41.801: D/PC mail(27695): [KcMDMUtility]isRoaming() START CHECK ROAMING STAT
05-06 18:11:41.801: D/PC mail(27695): [KcMDMUtility]isRoaming() NETWORK AVAILABLE, IS ROAMING? false
05-06 18:11:41.801: D/PC mail(27695): [KcMDMUtility]isRoamingLocked() NOT ROAMING, IGNORE ROAMING LOCKS
05-06 18:11:41.811: V/PhoneStatusBar(2705): setLightsOn(true)
05-06 18:11:41.861: I/Timeline(865): Timeline: Activity_windows_visible id: ActivityRecord{b587900 u0 com.android.email/.activity.ComposeActivityEmail t34208} time:41880365
05-06 18:11:41.881: I/Timeline(27695): Timeline: Activity_idle id: android.os.BinderProxy@1b5e978f time:41880384

iWNN with email app (both typing & submitting by double-click DPAD_CENTER)

05-06 18:10:10.431: I/Timeline(24469): Timeline: Activity_launch_request id:com.android.email time:41788934
05-06 18:10:10.431: I/ActivityManager(865): START u0 {cmp=com.android.email/com.android.mail.ui.InputTextActivity (has extras)} from uid 10049 on display 0
05-06 18:10:10.441: V/WindowManager(865): addAppToken: AppWindowToken{3e678072 token=Token{2c97f97d ActivityRecord{17c7d3d4 u0 com.android.email/com.android.mail.ui.InputTextActivity t34205}}} to stack=1 task=34205 at 2
05-06 18:10:10.501: V/PC mail(24469): [InputTextActivity]onCreate() IN inputType = 131153
05-06 18:10:10.501: I/ViewRootImpl(24469): CPU Rendering VSync enable = true
05-06 18:10:10.501: V/WindowManager(865): Adding window Window{1bb85940 u0 com.android.email/com.android.mail.ui.InputTextActivity} at 11 of 16 (after Window{29bf8f4b u0 com.android.email/com.android.email.activity.ComposeActivityEmail})
05-06 18:10:10.521: D/doLineRunnable(24469): do
05-06 18:10:10.521: D/doLineRunnable(24469): do
05-06 18:10:10.531: V/PhoneStatusBar(2705): setLightsOn(true)
05-06 18:10:10.571: I/Timeline(24469): Timeline: Activity_idle id: android.os.BinderProxy@84fb02 time:41789073
05-06 18:10:10.581: I/ActivityManager(865): Displayed com.android.email/com.android.mail.ui.InputTextActivity: +127ms
05-06 18:10:10.611: I/Timeline(865): Timeline: Activity_windows_visible id: ActivityRecord{17c7d3d4 u0 com.android.email/com.android.mail.ui.InputTextActivity t34205} time:41789110
05-06 18:10:10.861: W/ResourcesManager(2705): Asset path '/system/framework/com.nextfp.android.util.jar' does not exist or contains no resources.
05-06 18:10:10.891: I/ViewRootImpl(22466): CPU Rendering VSync enable = true
05-06 18:10:10.911: D/doLineRunnable(22466): do
05-06 18:10:15.681: I/Email(24469): Body populated, len: 3, sig: true
05-06 18:10:15.701: D/PC mail(24469): [KcMDMUtility]isAttachmentLocked() CHECK ATTACH LOCK
05-06 18:10:15.711: D/PC mail(24469): [KcMDMUtility]isAttachmentLocked() IS ATTACH LOCKED? false
05-06 18:10:15.711: D/PC mail(24469): [KcMDMUtility]isMdmLocked() START CHECK MDM LOCKS
05-06 18:10:15.711: D/PC mail(24469): [KcMDMUtility]isMailLocked() CHECK MAIL LOCK
05-06 18:10:15.711: D/PC mail(24469): [KcMDMUtility]isMailLocked() IS MAIL LOCKED? false
05-06 18:10:15.721: D/PC mail(24469): [KcMDMUtility]isPCmailLocked() CHECK PCMAIL LOCK
05-06 18:10:15.721: D/PC mail(24469): [KcMDMUtility]isPCmailLocked() IS PCMAIL LOCKED? false
05-06 18:10:15.721: D/PC mail(24469): [KcMDMUtility]isSMailLocked() CHECK S!MAIL LOCK
05-06 18:10:15.721: D/PC mail(24469): [KcMDMUtility]isSMailLocked() IS S!MAIL LOCKED? false
05-06 18:10:15.721: D/PC mail(24469): [KcMDMUtility]isRoaming() START CHECK ROAMING STAT
05-06 18:10:15.721: D/PC mail(24469): [KcMDMUtility]isRoaming() NETWORK AVAILABLE, IS ROAMING? false
05-06 18:10:15.721: D/PC mail(24469): [KcMDMUtility]isRoamingLocked() NOT ROAMING, IGNORE ROAMING LOCKS
05-06 18:10:15.731: V/PhoneStatusBar(2705): setLightsOn(true)
05-06 18:10:15.791: I/Timeline(865): Timeline: Activity_windows_visible id: ActivityRecord{30e7330d u0 com.android.email/.activity.ComposeActivityEmail t34205} time:41794291
05-06 18:10:15.821: I/Timeline(24469): Timeline: Activity_idle id: android.os.BinderProxy@3aaf9251 time:41794321

Set PIN LOCK by T9 - text can be entered, but don't accepted

05-06 18:07:17.831: D/onKeyDown(2836): Key: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_DPAD_CENTER, scanCode=28, metaState=0, flags=0x8, repeatCount=0, eventTime=41616330, downTime=41616330, deviceId=8, source=0x301 } repeat?: 0 long-time: false
05-06 18:07:17.891: I/Timeline(26198): Timeline: Activity_launch_request id:com.android.settings time:41616395
05-06 18:07:17.891: I/ActivityManager(865): START u0 {flg=0x2000000 cmp=com.android.settings/.ChooseLockPassword (has extras)} from uid 1000 on display 0
05-06 18:07:17.901: V/WindowManager(865): addAppToken: AppWindowToken{6b6b16d token=Token{252fb584 ActivityRecord{184e6f97 u0 com.android.settings/.ChooseLockPassword t34202}}} to stack=1 task=34202 at 3
05-06 18:07:18.041: E/SettingsPreferenceFragment(26198): Don't set pagescroll.java.lang.RuntimeException: Content has view with id attribute 'android.R.id.list' that is not a ListView class
05-06 18:07:18.041: I/ViewRootImpl(26198): CPU Rendering VSync enable = true
05-06 18:07:18.051: V/WindowManager(865): Adding window Window{227912fa u0 com.android.settings/com.android.settings.ChooseLockPassword} at 12 of 17 (after Window{391620b5 u0 com.android.settings/com.android.settings.SubSettings$SubSettingsEx})
05-06 18:07:18.061: D/doLineRunnable(26198): do
05-06 18:07:18.061: D/doLineRunnable(26198): do
05-06 18:07:18.121: D/doLineRunnable(26198): do
05-06 18:07:18.161: D/T9.onEvaluateInputViewShown(2836): whatis
05-06 18:07:18.161: I/ActivityManager(865): Displayed com.android.settings/.ChooseLockPassword: +252ms
05-06 18:07:18.171: I/Timeline(865): Timeline: Activity_windows_visible id: ActivityRecord{184e6f97 u0 com.android.settings/.ChooseLockPassword t34202} time:41616675
05-06 18:07:18.201: D/OpenGLRenderer(26198): endAllStagingAnimators on 0xb7fa7190 (RippleDrawable) with handle 0xb7eacbc8
05-06 18:07:18.211: I/Timeline(26198): Timeline: Activity_idle id: android.os.BinderProxy@521e188 time:41616715
05-06 18:07:19.411: D/T9.onEvaluateInputViewShown(2836): whatis
05-06 18:07:19.411: D/onKeyDown(2836): Key: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_1, scanCode=2, metaState=0, flags=0x8, repeatCount=0, eventTime=41617910, downTime=41617910, deviceId=8, source=0x301 } repeat?: 0 long-time: false
05-06 18:07:19.411: D/T9.onEvaluateInputViewShown(2836): whatis
05-06 18:07:19.421: I/ViewRootImpl(2836): CPU Rendering VSync enable = true
05-06 18:07:19.441: D/doLineRunnable(2836): do
05-06 18:07:19.971: D/T9.onEvaluateInputViewShown(2836): whatis
05-06 18:07:19.971: D/onKeyDown(2836): Key: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_2, scanCode=3, metaState=0, flags=0x8, repeatCount=0, eventTime=41618470, downTime=41618470, deviceId=8, source=0x301 } repeat?: 0 long-time: false
05-06 18:07:19.971: D/T9.onEvaluateInputViewShown(2836): whatis
05-06 18:07:20.431: D/T9.onEvaluateInputViewShown(2836): whatis
05-06 18:07:20.431: D/onKeyDown(2836): Key: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_3, scanCode=4, metaState=0, flags=0x8, repeatCount=0, eventTime=41618930, downTime=41618930, deviceId=8, source=0x301 } repeat?: 0 long-time: false
05-06 18:07:20.431: D/T9.onEvaluateInputViewShown(2836): whatis
05-06 18:07:21.061: D/T9.onEvaluateInputViewShown(2836): whatis
05-06 18:07:21.061: D/onKeyDown(2836): Key: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_4, scanCode=5, metaState=0, flags=0x8, repeatCount=0, eventTime=41619560, downTime=41619560, deviceId=8, source=0x301 } repeat?: 0 long-time: false
05-06 18:07:21.061: D/T9.onEvaluateInputViewShown(2836): whatis
05-06 18:07:22.901: D/onKeyDown(2836): Key: KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_DPAD_CENTER, scanCode=28, metaState=0, flags=0x8, repeatCount=0, eventTime=41621400, downTime=41621400, deviceId=8, source=0x301 } repeat?: 0 long-time: false
05-06 18:07:22.901: W/onKeyDown(2836): Unhandled Key: 23(KeyEvent { action=ACTION_DOWN, keyCode=KEYCODE_DPAD_CENTER, scanCode=28, metaState=0, flags=0x8, repeatCount=0, eventTime=41621400, downTime=41621400, deviceId=8, source=0x301 })
05-06 18:07:22.991: W/onKeyUp(2836): Unhandled Key: 23(KeyEvent { action=ACTION_UP, keyCode=KEYCODE_DPAD_CENTER, scanCode=28, metaState=0, flags=0x8, repeatCount=0, eventTime=41621490, downTime=41621400, deviceId=8, source=0x301 })
05-06 18:07:22.991: D/T9.onEvaluateInputViewShown(2836): whatis

Set PIN LOCK by iWNN - regardless of error in between, text entered is accepted after click on DPAD_CENTER

05-06 18:05:59.711: I/Timeline(26198): Timeline: Activity_launch_request id:com.android.settings time:41538218
05-06 18:05:59.721: I/ActivityManager(865): START u0 {flg=0x2000000 cmp=com.android.settings/.ChooseLockPassword (has extras)} from uid 1000 on display 0
05-06 18:05:59.721: V/WindowManager(865): addAppToken: AppWindowToken{335ad67f token=Token{35fbdb9e ActivityRecord{149d55d9 u0 com.android.settings/.ChooseLockPassword t34202}}} to stack=1 task=34202 at 3
05-06 18:05:59.861: E/SettingsPreferenceFragment(26198): Don't set pagescroll.java.lang.RuntimeException: Content has view with id attribute 'android.R.id.list' that is not a ListView class
05-06 18:05:59.861: I/ViewRootImpl(26198): CPU Rendering VSync enable = true
05-06 18:05:59.861: V/WindowManager(865): Adding window Window{68f02e4 u0 com.android.settings/com.android.settings.ChooseLockPassword} at 12 of 18 (after Window{f61bd87 u0 com.android.settings/com.android.settings.SubSettings$SubSettingsEx})
05-06 18:05:59.871: D/doLineRunnable(26198): do
05-06 18:05:59.871: D/doLineRunnable(26198): do
05-06 18:05:59.921: D/doLineRunnable(26198): do
05-06 18:05:59.991: I/ActivityManager(865): Displayed com.android.settings/.ChooseLockPassword: +242ms
05-06 18:05:59.991: I/Timeline(865): Timeline: Activity_windows_visible id: ActivityRecord{149d55d9 u0 com.android.settings/.ChooseLockPassword t34202} time:41538492
05-06 18:06:00.041: D/OpenGLRenderer(26198): endAllStagingAnimators on 0xb80a20c8 (RippleDrawable) with handle 0xb80acc50
05-06 18:06:00.051: W/System.err(22466): java.lang.NullPointerException: Attempt to invoke virtual method 'void android.inputmethodservice.ExtractEditText.setHintTextColor(int)' on a null object reference
05-06 18:06:00.051: W/System.err(22466):    at jp.co.omronsoft.iwnnime.ml.OpenWnn.getExtractEditText(OpenWnn.java:1366)
05-06 18:06:00.051: W/System.err(22466):    at jp.co.omronsoft.iwnnime.ml.OpenWnn.onStartInputView(OpenWnn.java:794)
05-06 18:06:00.051: W/System.err(22466):    at jp.co.omronsoft.iwnnime.ml.standardcommon.IWnnLanguageSwitcher.onStartInputViewOpenWnn(IWnnLanguageSwitcher.java:438)
05-06 18:06:00.051: W/System.err(22466):    at jp.co.omronsoft.iwnnime.ml.IWnnImeBase.onStartInputViewOpenWnn(IWnnImeBase.java:313)
05-06 18:06:00.051: W/System.err(22466):    at jp.co.omronsoft.iwnnime.ml.jajp.IWnnImeJaJp.onStartInputView(IWnnImeJaJp.java:1165)
05-06 18:06:00.051: W/System.err(22466):    at jp.co.omronsoft.iwnnime.ml.standardcommon.IWnnLanguageSwitcher.onStartInputView(IWnnLanguageSwitcher.java:392)
05-06 18:06:00.051: W/System.err(22466):    at android.inputmethodservice.InputMethodService.showWindowInner(InputMethodService.java:1496)
05-06 18:06:00.051: W/System.err(22466):    at android.inputmethodservice.InputMethodService.showWindow(InputMethodService.java:1454)
05-06 18:06:00.051: W/System.err(22466):    at android.inputmethodservice.InputMethodService$InputMethodImpl.showSoftInput(InputMethodService.java:446)
05-06 18:06:00.051: W/System.err(22466):    at android.inputmethodservice.IInputMethodWrapper.executeMessage(IInputMethodWrapper.java:203)
05-06 18:06:00.051: W/System.err(22466):    at com.android.internal.os.HandlerCaller$MyHandler.handleMessage(HandlerCaller.java:37)
05-06 18:06:00.051: W/System.err(22466):    at android.os.Handler.dispatchMessage(Handler.java:102)
05-06 18:06:00.051: W/System.err(22466):    at android.os.Looper.loop(Looper.java:135)
05-06 18:06:00.051: W/System.err(22466):    at android.app.ActivityThread.main(ActivityThread.java:5276)
05-06 18:06:00.051: W/System.err(22466):    at java.lang.reflect.Method.invoke(Native Method)
05-06 18:06:00.051: W/System.err(22466):    at java.lang.reflect.Method.invoke(Method.java:372)
05-06 18:06:00.051: W/System.err(22466):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:941)
05-06 18:06:00.051: W/System.err(22466):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:736)
05-06 18:06:00.051: I/Timeline(26198): Timeline: Activity_idle id: android.os.BinderProxy@274fec2 time:41538552
05-06 18:06:00.071: W/ResourceType(3169): Failure getting entry for 0x7f020120 (t=1 e=288) (error -75)
05-06 18:06:02.831: W/ActivityManager(865): getTasks: caller 10022 is using old GET_TASKS but privileged; allowing
05-06 18:06:05.121: W/IInputConnectionWrapper(26198): endBatchEdit on inactive InputConnection
05-06 18:06:05.121: W/IInputConnectionWrapper(26198): performPrivateCommand on inactive InputConnection
05-06 18:06:05.121: W/IInputConnectionWrapper(26198): performPrivateCommand on inactive InputConnection
05-06 18:06:05.121: W/IInputConnectionWrapper(26198): beginBatchEdit on inactive InputConnection
05-06 18:06:05.121: W/IInputConnectionWrapper(26198): endBatchEdit on inactive InputConnection

Hope any of this could help figure problem out.

Clam- commented 6 years ago

Long press Pound should not change the input mode to digits, it either inputs return, or it does editor action. The editor might be handling it weird. I'm afraid the logs don't help. Can you provide screenshots of the interfaces you are talking about? Specifically the iWNN "submit". Maybe a video would make it more clear.

Sorry I cannot help with the work you have done so far.

r44r1 commented 6 years ago

For hash is my miss, long press changes language. Input mode is changed by double press.

Upd: I try to disable secondary language to bypass that, but the things just got weirder - from now longpress shows a smiley selection window in mail app until I add language back. For lock window, it still does nothing.
Not a problem, I've maked a bunch of gifs instead: https://imgur.com/a/MDdvg12

I don't make a separate gif for t9+lock+hash as is acts same as t9+lock+center

Clam- commented 6 years ago

Smiley long press is Star, not Pound. Are you using keyremap by any chance or have mislabelled keys?

r44r1 commented 6 years ago

I've checked project wiki and seems you're right about remaps. My hash key acts like star except for (*) input.

Hash/Pound (#): Short press: Space Long press: New line.

and this is assigned to zero [space - 0 - newline]. I do not remember where I get APK but seems it was sufficiently altered.

However, long pressing zero has no effect. Is this tied to a certain scancode?

Clam- commented 6 years ago

Wow, your buttons are producing very weird actions. You can see what each of the long press actions is supposed to do here: https://github.com/Clam-/TraditionalT9/blob/4b995fa58261d7561daaf0950a797386702e79ec/src/org/nyanya/android/traditionalt9/TraditionalT9.java#L633 (Note: Soft Left and Soft Right should be the button above the camera and the speaker button on your phone)

Okay, after looking at the GIFs I think there's something different going on. The submit button in the GIF looks like it's encouraging you to press DPAD center. When T9 input is active, there is supposed to be a input UI that displays. On your device it doesn't seem to show. DPAD Center is supposed to turn the input UI off, and allow you to send DPAD Center actions back to the application.

When you don't see the T9 UI, DPAD Center should be sent directly to the application, but that might not be occurring in your case. Hard to say how to debug this one. You could try a version before key remapping was implemented but I don't think that will help: https://nyanya.org/android/old/TraditionalT9-git-1b15cd0.apk Note this is an old version and is missing features and bug fixes.

r44r1 commented 6 years ago

But with this one, submit starts to work! Many thanks.

Softkeys does not, but if I get you right - it's just enough to change scancode expected and rebuild app?

UPD: Unfortunately, but not everywhere. It works perfectly with email now, but on lock screen pressing dpad just closes input UI. Pressing hash for a long or pressing dpad another time cause to window reopen, but sumbit action still not performed. And there is nothing in log at this time.

Clam- commented 6 years ago

So you do see input UI? Can you please show a GIF of the UPD scenario?

Can I also confirm what exact file you installed previously?

Thanks.

r44r1 commented 6 years ago

Yes, UI starts to show. But text still isn't submitted in some apps. Tried both CENTER (closes UI) and LONG HASH (prints newline)

Works: email, phonebook Not works: everything else tried - especially lock screen and sms

GIF for sms app: https://imgur.com/a/zfNaoNt

I don't remember from where I get previous APK, will try to look for file itself on old PC.

Clam- commented 6 years ago

Can you please show a GIF of what the SMS app looks like when it works correctly?

You can get the details of the APKs you have if you look at the details of the installed App in the "Installed" or "downloaded" section of your application manager on your device. I think you may have been using old or custom modified APKs.

r44r1 commented 6 years ago

It's shown on the last gif from my first link. Direct: https://i.imgur.com/q9K96ZF.gif

Unfortunately, I've uninstalled old APK prior to installing your. I can't definitely say there I get it, but most probably I use this link

Also, I found that on build you provided input UI starts to show after selecting phone no. from contact in phonebook, making it unable to call via DPAD press. I do not face it earlier.

Clam- commented 6 years ago

I don't have any time to work on T9 in the near future, but you could possibly "turn off" input UI by changing the code to keep mEditing as EDITING_NOSHOW https://github.com/Clam-/TraditionalT9/blob/4b995fa58261d7561daaf0950a797386702e79ec/src/org/nyanya/android/traditionalt9/TraditionalT9.java#L42

If mEditing is EDITING_NOSHOW, DPAD inputs will never get processed and will always be sent to the underlying application. Failing that, you could specifically setup a longpress DPAD_CENTER event that just manually sent a DPAD_CENTER to the underlying application.

r44r1 commented 6 years ago

Anyway, thanks for help. I'll try it.