I could be mistaken, but isn't the Policy object just a string? If I use the following task, I get the attached result. Is that what you were looking for?
Test (72)
A1: Java Function
Return: (NotificationManager) nmgr
Class Or Object: CONTEXT
Function: getSystemService
{Object} (String)
Param: notification
A2: Java Function
Return: %policy
Class Or Object: nmgr
Function: getNotificationPolicy
{android.app.NotificationManager$Policy} ()
A3: AutoTools Dialog
Dialog Type: Ok
Title Alignment: Left
Text: %policy
Text Size: 20
Dim Background: true
Top Margin: 16
Bottom Margin: 16
Bottom Buttons Top Margin: 16
Bottom Buttons Bottom Margin: 16
Cancelable: true
Turn Screen On: true
Timeout (Seconds): 60
--
You received this message because you are subscribed to a topic in the Google Groups "Tasker" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tasker/_2shHTJp1KE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tasker+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/tasker.
For more options, visit https://groups.google.com/d/optout.
Oh, I see. To get the value of the field you can use the standard Java way of object.field as shown in step A3 below. Hope this helps.
Test (72)
A1: Java Function
Return: (NotificationManager) nmgr
Class Or Object: CONTEXT
Function: getSystemService
{Object} (String)
Param: notification
A2: Java Function
Return: policy
Class Or Object: nmgr
Function: getNotificationPolicy
{android.app.NotificationManager$Policy} ()
A3: Java Function
Return: %val
Class Or Object: policy.priorityCategories
Function: assign
{int} ()
A4: Flash
Text: %val
Long: Off
--