phhusson / treble_experimentations

Notes about tinkering with Android Project Treble
3.31k stars 655 forks source link

[Xiaomi Mi A2 Lite] Camera not run in "Do not disturb" mode / DnD #377

Open eremitein opened 5 years ago

eremitein commented 5 years ago

Hello!

Camera not work in DnD (do not disturb) mode in v109 build. But in Resurrection Remix 7.0 camera worked in DnD mode. Logs attached.

[info]

. daisy_camera_DND_AOSP_v109_9.6.4_stock.txt daisy_camera_RUN_AOSP_v109_9.6.4_stock.txt daisy_camera_worked_9.6.11.0stock_RR7.txt

penn5 commented 5 years ago

This issue has been resolved in telegram. The workaround was to setprop audio.camerasound.force true (lost at reboot). To fix this, a rw-system.sh check will be needed for daisy, and setprop that prop automatically. However, this is a workaround as after setting this prop, camera sounds will play even in DnD.

eremitein commented 5 years ago

yes, phhusson gave hot fix for camera in DnD mode.

just do it:

adb root ...(...wait 1-2sec...)... adb shell "echo audio.camerasound.force=true >> /data/local.prop" adb shell "chmod 0600 /data/local.prop"

then restart phone))

penn5 commented 5 years ago

Does this only happen on Pie vendor?

eremitein commented 5 years ago

hi, tested only on Oreo vendor

also phhusson's hotfix make a screenshot sound available in DnD mode. what is not good

penn5 commented 5 years ago

This is fixed. @phhusson it can be closed now.

eremitein commented 4 years ago

new info: fix presented another post-bugs

first it make sounds when taking screenshots or make photo (but in app sounds disabled)

and if at same time listening music in earphones then sound going to speaker. any sound notifications - music going from earphones to speaker

btw error with DnD have only AOSP. i tested Lineage, RR, Havoc and many other roms. but with that fix all roms affected to post-bugs

good news: in the v204 with manually disabled fix camera works fine in DnD mode

eremitein commented 4 years ago

i confirm

camera works fine in DnD mode without this fix in v204 and in v121 too

not need this fix for daisy anymore