Resolved a rare race condition on dialog display

App would crash if a dialog was trying to display while MainActivity
was attempting to finish.
Replace getPackageInfo calls with BuildConfig