fix encrypt activity layout

This commit is contained in:
Vincent Breitmoser
2015-04-24 19:16:15 +02:00
parent ca9ab02b7b
commit 6de403c21a
2 changed files with 4 additions and 3 deletions

View File

@@ -108,9 +108,8 @@ public class EncryptKeyCompletionView extends TokenCompleteTextView
protected void onAttachedToWindow() {
super.onAttachedToWindow();
mLoaderManager = ((FragmentActivity) getContext()).getSupportLoaderManager();
if (getContext() instanceof FragmentActivity) {
mLoaderManager = ((FragmentActivity) getContext()).getSupportLoaderManager();
mLoaderManager.initLoader(hashCode(), null, this);
} else {
Log.e(Constants.TAG, "EncryptKeyCompletionView must be attached to a FragmentActivity, this is " + getContext().getClass());