AlertDialog should not be instantiated in onResume()

The original code instantiates AlertDialog and shows it whenever the
activity is resumed, so a lot of instances of AlertDialog can be linked
with one activity. That can be avoided if we move the dialog related
code from onResume() to onCreate().

Bug: 63875731
Test: Confirmed that the leakage issue is solved in the manual test

Change-Id: I9a0ef5956a75e1958b5a36961f6a56d4272a18f6
1 file changed