Refactor another big method in ViewEntityAction

Change-Id: I6a707f14aaff690cdd344dce3a0117e2404ee041
Merge "Refactor another big method in ViewEntityAction"