How to disable Toast Messages generated in Screen Pinning?

前端 未结 2 2170
梦谈多话
梦谈多话 2021-02-12 19:42

i\'m developing lockscreen application, and i want to disable home button,

my app is - Device Owner and Device Administrator

now i\'m usnig screen pinning for di

2条回答
  •  故里飘歌
    2021-02-12 20:17

    There seems to be no override or "whitelist" or policy that allows even a device owner to override this message.

    Here's the code that shows the toast: http://androidxref.com/6.0.1_r10/xref/frameworks/base/services/core/java/com/android/server/am/LockTaskNotify.java#74.

    Here's the code that calls this show method when a locked task is shown: http://androidxref.com/6.0.1_r10/xref/frameworks/base/services/core/java/com/android/server/am/ActivityStackSupervisor.java#3919.

    There are no flags or resources that can be overridden here as far as I have found. If you have access to source, you will need to comment out the line that invokes show.

提交回复
热议问题