Retrieve max ANR dialog before dumping thread stacks

Dumping thread stacks can take >5s, after which the cause of the ANR
might have completed and there might not longer be a valid ANR
controller to cancel the dialog.

Test: Manual
Bug: 170486601

Fix comment from Idb9190a0e6014ce64bf1412c26f6ae03f97e922d

Test: m
Bug: 170486601
Change-Id: Ibb5699693fac054fd8a8237af7036e610d7af189
1 file changed