Create ProgressDialog early to include favourite related requests

Favorite-related requests are automatically granted. For
favourite-related requests, We always assume positive action and we
directly call onPositiveAction from onCreate. Hence progressDialog
should be created before onPositiveAction is called for favorite-related
requests.

Moved ProgressDialog creation before onPositiveAction method call. Also
added null check for dialog which can be null for favourite-related
requests that don't need user grants.

Bug: 160176062
Test: atest ExternalStorageHostTest#testMediaEscalation
Test: atest ExternalStorageHostTest#testMediaEscalation29
Test: atest ExternalStorageHostTest#testMediaEscalation28
Change-Id: I6ace88e3cf9bf72c2dad2630ea6b9ce2d0f189c6
1 file changed