public static final int MODE_DETAILS = 0;\r
public static final int MODE_PREVIEW = 1;\r
\r
- private static final String KEY_WAITING_TO_PREVIEW = "WAITING_TO_PREVIEW";\r
+ public static final String KEY_WAITING_TO_PREVIEW = "WAITING_TO_PREVIEW";\r
\r
private boolean mConfigurationChangedToLandscape = false;\r
private FileDownloaderBinder mDownloaderBinder = null;\r
}\r
\r
@Override\r
- public void notifySuccessfulDownload(OCFile file) {\r
- if (mWaitingToPreview) {\r
- FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();\r
- transaction.replace(R.id.fragment, new FilePreviewFragment(file, mAccount), FileDetailFragment.FTAG); \r
- transaction.commit();\r
- mWaitingToPreview = false;\r
+ public void notifySuccessfulDownload(OCFile file, Intent intent, boolean success) {\r
+ if (success) {\r
+ if (mWaitingToPreview) {\r
+ FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();\r
+ transaction.replace(R.id.fragment, new FilePreviewFragment(file, mAccount), FileDetailFragment.FTAG); \r
+ transaction.commit();\r
+ mWaitingToPreview = false;\r
+ }\r
}\r
}\r
\r