What ProgressDialog's getContext is not what I pass into
<pre><code>public AsyncSyncWithCloud(HistoryFragmentActivity historyFragmentActivity) {
    this.historyFragmentActivity = historyFragmentActivity;
    progressDialog = new ProgressDialog(historyFragmentActivity);

    // ???
    // java.lang.ClassCastException: android.view.ContextThemeWrapper cannot be cast to xxx.charting.HistoryFragmentActivity
    HistoryFragmentActivity test = ((HistoryFragmentActivity)progressDialog.getContext());
}
</code></pre>

<p>I was wondering, why I pass in my own <code>Activity</code> as context to <code>ProgressDialog</code>. When I perform <code>getContext</code> from progressDialog, I do not get what I passed in previously?</p>
