Here is stack trace (had to add printStackTrace() call to catch block)
in the example with ATPermission:
ava.lang.IllegalArgumentException: data
- com/oracle/dio/utils/Utils.verifyAndOrderActions(Utils.java:151)
- com/oracle/dio/utils/Utils.verifyAndOrderDeviceActions(Utils.java:180)
- jdk/dio/DevicePermission.<init>(DevicePermission.java:192)
- jdk/dio/LocalPermission.<init>(DevicePermission.java:372)
- jdk/dio/PeripheralPermissionCollection.implies(DevicePermission.java:415)
...
...
The problem is: when creating a LocalPermission (located in DevicePermission.java), only two actions are accepted:
open and powermanage, so legal actions "data" and "setdirection"
result in LocalPermission creation failure.
in the example with ATPermission:
ava.lang.IllegalArgumentException: data
- com/oracle/dio/utils/Utils.verifyAndOrderActions(Utils.java:151)
- com/oracle/dio/utils/Utils.verifyAndOrderDeviceActions(Utils.java:180)
- jdk/dio/DevicePermission.<init>(DevicePermission.java:192)
- jdk/dio/LocalPermission.<init>(DevicePermission.java:372)
- jdk/dio/PeripheralPermissionCollection.implies(DevicePermission.java:415)
...
...
The problem is: when creating a LocalPermission (located in DevicePermission.java), only two actions are accepted:
open and powermanage, so legal actions "data" and "setdirection"
result in LocalPermission creation failure.