HallMonitor icon indicating copy to clipboard operation
HallMonitor copied to clipboard

Support for CM13

Open habeIchVergessen opened this issue 10 years ago • 12 comments

not yet: FLAG_TURN_SCREEN_ON needs to be implemented

habeIchVergessen avatar Dec 23 '15 09:12 habeIchVergessen

I just installed on SM-G900F running CM13 (20160114 Build) and can confirm it works for me

bradhawkins85 avatar Jan 15 '16 23:01 bradhawkins85

can you post a debug output (incl. cover actions)?

habeIchVergessen avatar Jan 16 '16 09:01 habeIchVergessen

I closed and opened the cover 5 times in this log. Log_2016-01-16_21-28-18.txt

I am having a random issue with the screen coming on when the cover is closed and not turning back off. I will attach the log when I can get one.

bradhawkins85 avatar Jan 16 '16 11:01 bradhawkins85

thx for logs. it seems not to be my fork of the project. can you post a link of used apk file? accept/reject/hangup calls works?

habeIchVergessen avatar Jan 16 '16 12:01 habeIchVergessen

Here's the link https://github.com/durka/HallMonitor/blob/0.4.1/bin/HallMonitor-debug.apk?raw=true

Haven't tried calls yet, sorry, will let you know when I dodo.

Will give your fork a go tomorrow.

bradhawkins85 avatar Jan 16 '16 13:01 bradhawkins85

habeIchVergessen here is the log from your fork and a screenshot. screenshot_20160117-123629 Log_2016-01-17_12-58-43.txt

Haven't had a chance to test the calls yet but none of the shortcuts work in either build but the other one does not have the display issues, also the battery percentage doesn't change in your build

bradhawkins85 avatar Jan 17 '16 03:01 bradhawkins85

I can take a log on sm-n910c cm13 if you want.

It doesn't work too reliable, if you close the lid very gently the s view doesn't kick in. Your fork maybe slightly less reliable than durka's apk and I may have a crash in your fork overnight but I didn't take a log.

As for the shortcuts, I need to do more testing but the issue is that high sensitivity for the screen (glove mode, not sure how it is actually called) is not activated. You can do it manually and then the shortcuts seem to sort of work (though sometimes Google now or something starts and that uses full screen). Not really a solution though as the glove mode gets deactivated when opening the lid again.

As for the camera, it gives me a tiny preview venster but the actual picture taking does not work (only tried on durka's apk).

I could silence an alarm with glove mode activated, haven't tested calls yet.

Guess biggest issue for now is the glove mode not getting activated (maybe I can do it with tasker?) and the actual picture taking not working.

Guess I need to mod it myself a bit for the larger s view venster on the note 4.

pressh avatar Jan 17 '16 08:01 pressh

debug my fork:

  • press seven times About ("debug enabled" messages appears)
  • do some cover actionsi
  • check the sd-card option
  • press seven times About ("debug disabled" message)
  • new file should be written to Download

changing touch sensivity requires root privileges. do you checked the option?

the screenshots looks terrible. seems to be a general problem. the layout uses only the visible area under the cover. surrounding area is window background.

habeIchVergessen avatar Jan 17 '16 09:01 habeIchVergessen

Yes root enabled but seems it doesn't kick in tot handel the screen sensitiviteit. It just worked for a minuten or so after I reinstalled tour fork but stoppen now.

I attached a regular logcat, debugging output is saved to a nog existing location I don't have /storage/sdcard0

Anyway, dit soms fast closes of the lid at which hallmonitor kicks in and a few slow ones where it doesn't. After that I manually enabled glove mode and pushed some of the buttons. Picture preview for camera shows up, taking a picture causes a crash according to the logcat. Also in camera preview mode the screen times out. On touchwiz camera preview keeps the screen awake so you have more time to take a picture. Maybe it is an idea to increase the screen time out when the camera is activated.

Let me know if I need to do more tests.

Cheers, logcat.txt

pressh avatar Jan 17 '16 13:01 pressh

try to enable the glove mode manually

S4

  • on: echo clear_cover_mode,1 > /sys/class/sec/tsp/cmd && cat /sys/class/sec/tsp/cmd_result
  • off: echo clear_cover_mode,0 > /sys/class/sec/tsp/cmd && cat /sys/class/sec/tsp/cmd_result

S4 mini

  • on: echo module_on_master > /sys/class/sec/tsp/cmd && cat /sys/class/sec/tsp/cmd_result ; echo clear_cover_mode,3 > /sys/class/sec/tsp/cmd && cat /sys/class/sec/tsp/cmd_result
  • off: echo module_on_master > /sys/class/sec/tsp/cmd && cat /sys/class/sec/tsp/cmd_result ; echo clear_cover_mode,0 > /sys/class/sec/tsp/cmd && cat /sys/class/sec/tsp/cmd_result

habeIchVergessen avatar Jan 17 '16 13:01 habeIchVergessen

The s4 commands seem to work on the note4 as well, although not 100% reliable. Somehow the camera also started to take pictures, albeit sideways (preview has correct orientation). Guess I'll need to take another logcat to find out why at is going on and why it sometimes works and sometimes causes a crash.

pressh avatar Jan 17 '16 16:01 pressh

Seems that finally google provided a fix for this issue, please take a look here: https://github.com/AOSP-JF-MM/platform_frameworks_base/commit/39d533c5d8c4e16baed4f1d8b3a309622a5fb918

This is a better solution than force FLAG_TURN_SCREEN_ON when the device tries to go to sleep

Can be simply enabled with an overlay in the device tree (see here: https://github.com/AOSP-JF-MM/platform_device_samsung_jflte/commit/7b27428c887c554b1fc649db9a9ee0b19cade256 )

Tested with my old Hallmonitor fork and it's working fine without any issue! Well, timeout does not work, and a lot of things must be updated but... It's working now! ;)

Ps: can be easily merged on cm-13.0 too, but the rom must be compiled with the different overlay

EDIT: This has been merged on AOSP master branch a few days ago: https://android.googlesource.com/platform/frameworks/base/+/7def60daa049271c0d595d2ff566965693ee88cd

B--B avatar Feb 09 '16 17:02 B--B