You could add a global variable that keeps track of which phase is currently active and check against that. Or you could create two proximity managers and enable one during the initial phases and the other during the test phase:
Code:
manager1.setEnabled(viz.OFF)
manager2.setEnabled(viz.ON)
The event object passed to the callback function for the proximity event stores which manager was involved.