How can I block an app in Samsung DeX mode?

In the Knox SDK v3.1 and higher, there are Samsung DeX APIs such as DexManager.addPackageToDisableList(String packageName) to disable packages when connected to Samsung DeX.

In addition, the Knox SDK provides many allowlist and blocklist policies — for example, in the class ApplicationPolicy —  that apply while connected through DeX.