android_device_lge_thunderc_common icon indicating copy to clipboard operation
android_device_lge_thunderc_common copied to clipboard

"Power button ends call" setting is broken

Open ProjectOpenCannibal opened this issue 13 years ago • 13 comments

I've been doing some toying around with this issue, and may have found a fix.

A workaround (which is half-assed, and DEFINITELY breaks the setting), is to switch the locked-in default to NOT hang up the call. Like so:

  1. In packages/apps/Phone/lsrc/com/android/phone/PhoneInterfaceManager.java
  2. Find "case CMD_END_CALL"
  3. Find the line that says "hungUp = PhoneUtils.hangupRingingAndActive(mPhone);"
  4. Change "PhoneUtils.hangupRingingAndActive(mPhone);" to "false;"
  5. The whole line then reads: "hungUp = false;"
  6. The power button will no longer hang up the call, but the actual setting is still broken.

As I said though, I may have found a fix that allows the setting to actually work as expected. Once it compiles and I test it, I'll update this issue.

ProjectOpenCannibal avatar Jul 26 '11 04:07 ProjectOpenCannibal

No fix yet, still working on it.

ProjectOpenCannibal avatar Jul 26 '11 15:07 ProjectOpenCannibal

If you find a fix I'd suggest submitting it to gerrit.

inferiorhumanorgans avatar Jul 27 '11 16:07 inferiorhumanorgans

It's not a CM bug, it's a keylayout problem: https://github.com/mik9/android_device_lge_thunderg/commit/0061b0c9b73f6ac9711270330d6d9ee101ac4328#diff-10

mik9 avatar Jul 30 '11 18:07 mik9

Thanks!

inferiorhumanorgans avatar Jul 30 '11 18:07 inferiorhumanorgans

Unfortunately this doesn't fix the problem for me. I needed to also (perhaps only) edit qwerty.kl which is a CM file. This /may/ be a kernel issue as I've taken all the key events out of ats_input, but I doubt it since other home/menu keymappings seem to work fine from the thunder keymap.

inferiorhumanorgans avatar Jul 30 '11 19:07 inferiorhumanorgans

Maybe you need make same patch for 7k_handset.kl (I forgot about it): https://github.com/mik9/android_device_lge_thunderg/commit/0061b0c9b73f6ac9711270330d6d9ee101ac4328#diff-4

mik9 avatar Jul 30 '11 19:07 mik9

Nope. I don't have that file installed at all (which might? create BT problems, but that's for another day).

$ adb ls /system/usr/keylayout 000041ed 00000800 4e345863 . 000041ed 00000800 4e31d95f .. 000081b6 00000655 4e3452c4 thunder_keypad.kl 000081b6 0000072a 4e34584d qwerty.kl 000081a4 000000f5 4892fac0 AVRCP.kl

inferiorhumanorgans avatar Jul 30 '11 19:07 inferiorhumanorgans

The following 7k_handset.kl fixes this issue and does not break BT. https://github.com/BobZhome/android_device_lge_thunderc/commit/eeb8933b95b9fb803dd7504fbd60320191147d35

BobZhome avatar Nov 29 '11 23:11 BobZhome

I don't see how that changes anything substantive regarding the power button. The problem, AFAIK, lies in one of the emulator keyboard files that CM pulls in regardless. Rather than fork a repository just for that, I've left it alone for now.

inferiorhumanorgans avatar Nov 30 '11 07:11 inferiorhumanorgans

@Bob: That fixes the headset button (mostly), I'm looking for the author to cite, will submit pull request asap.

JerryScript-duplicate avatar Nov 30 '11 08:11 JerryScript-duplicate

That commit only changes the whitespace on line for the power key. The problem that I had is that there's something else mapping 107 to "ENDCALL" and I didn't want to fork another repository to change one line.

inferiorhumanorgans avatar Dec 01 '11 21:12 inferiorhumanorgans

The problem is the 7k_handset.kl file is not being copied to the build...you need to pull https://github.com/JerryScript/android_device_lge_thunderc/commit/4cef647cad07e105d2ff655f3e7a1b50de3b760e

BobZhome avatar Dec 01 '11 23:12 BobZhome

Sorry, all my commits somehow where added to the pull request. I hate this git stuff.

JerryScript-duplicate avatar Dec 02 '11 01:12 JerryScript-duplicate