Our company is receiving the Java.Lang.IllegalArgumentException as well but we believe it is due to some background processes which may/may not show an error dialog prior to navigating to a new activity. While this doesn't happen often, it can and does happen. As a result, attempting to show another dialog results in the view not being attached to a window via the Java.Lang.IllegalArgumentException. We need the software to tidy up the dialog and continue operating under a new "context".
The changes I introduced are really small. However, editor settings made them look big. Basically, I added an int member var to hold the hash key of a context. This last hash key is always checked against the most current context's hash key to see if the activity is the same. Only then will CurrentDialog.Dismiss( ) not generate the Java.Lang.IllegalArgumentException. If they are different, I simply let the code null out the CurrentDialog and force the GC to collect the data for good measure.
Our company is receiving the Java.Lang.IllegalArgumentException as well but we believe it is due to some background processes which may/may not show an error dialog prior to navigating to a new activity. While this doesn't happen often, it can and does happen. As a result, attempting to show another dialog results in the view not being attached to a window via the Java.Lang.IllegalArgumentException. We need the software to tidy up the dialog and continue operating under a new "context".
The changes I introduced are really small. However, editor settings made them look big. Basically, I added an int member var to hold the hash key of a context. This last hash key is always checked against the most current context's hash key to see if the activity is the same. Only then will CurrentDialog.Dismiss( ) not generate the Java.Lang.IllegalArgumentException. If they are different, I simply let the code null out the CurrentDialog and force the GC to collect the data for good measure.