Physical Switch stops working when in LockTaskMode

0

After calling StartLockTaskMode() the power switch on my device no longer responds.

Usually i get something along the lines of

18:31:56.462 488-488/? I/ActivityStackSupervisor: START u0 {act=android.intent.action.ACTION_REQUEST_SHUTDOWN flg=0x10000000 cmp=android/com.android.internal.app.ShutdownActivity (has extras)} from uid 1000 on display 0

08-16 18:31:56.575 488-576/? D/WindowManagerService: Window{11b13539 u0 Power off}  ==========setInputFocusLw ==========  =======
08-16 18:31:56.579 488-2353/? I/ShutdownThread: Sending shutdown broadcast...

/? V/WiredAccessoryManager: Headset UEVENT: {SUBSYSTEM=switch, SEQNUM=1589, ACTION=change, SWITCH_STATE=0, SWITCH_NAME=dc_det, DEVPATH=/devices/virtual/switch/dc_det}
08-16 19:04:43.824 488-626/? V/WiredAccessoryManager: newName=dc_det newState=0 headsetState=0 prev headsetState=256
08-16 19:04:43.825 488-626/? E/WiredAccessoryManager: Could not parse extcon state from event {SUBSYSTEM=switch, SEQNUM=1589, ACTION=change, SWITCH_STATE=0, SWITCH_NAME=dc_det, DEVPATH=/devices/virtual/switch/dc_det}
08-16 19:04:43.825 488-488/? V/WiredAccessoryManager: device dc_det disconnected
08-16 19:04:43.825 488-488/? D/WiredAccessoryManager: --- max-chen dc_det disconnect 

from what i gather when the switch is toggled in WiredAccessoryManager an event is registered and that triggers a broadcast to shutdown. It appears like WiredAccessoryManager is being blocked when in LockTaskMode, i see nothing in my console when the power switch is toggled.

Any Suggestions ?

android
asked on Stack Overflow Aug 16, 2019 by Raymie • edited Aug 17, 2019 by Raymie

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0