|
@@ -183,7 +183,7 @@ public class PreviewTextFragment extends FileFragment {
|
|
|
}
|
|
|
|
|
|
private void loadAndShowTextPreview() {
|
|
|
- mTextLoadTask = new TextLoadAsyncTask(new WeakReference<TextView>(mTextPreview));
|
|
|
+ mTextLoadTask = new TextLoadAsyncTask(new WeakReference<>(mTextPreview));
|
|
|
mTextLoadTask.execute(getFile().getStoragePath());
|
|
|
}
|
|
|
|
|
@@ -192,14 +192,12 @@ public class PreviewTextFragment extends FileFragment {
|
|
|
* Reads the file to preview and shows its contents. Too critical to be anonymous.
|
|
|
*/
|
|
|
private class TextLoadAsyncTask extends AsyncTask<Object, Void, StringWriter> {
|
|
|
- private static final String DIALOG_WAIT_TAG = "DIALOG_WAIT";
|
|
|
private final WeakReference<TextView> mTextViewReference;
|
|
|
|
|
|
private TextLoadAsyncTask(WeakReference<TextView> textView) {
|
|
|
mTextViewReference = textView;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
@Override
|
|
|
protected void onPreExecute() {
|
|
|
// not used at the moment
|
|
@@ -454,7 +452,7 @@ public class PreviewTextFragment extends FileFragment {
|
|
|
* @return 'True' if the file can be handled by the fragment.
|
|
|
*/
|
|
|
public static boolean canBePreviewed(OCFile file) {
|
|
|
- final List<String> unsupportedTypes = new LinkedList<String>();
|
|
|
+ final List<String> unsupportedTypes = new LinkedList<>();
|
|
|
unsupportedTypes.add("text/richtext");
|
|
|
unsupportedTypes.add("text/rtf");
|
|
|
unsupportedTypes.add("text/vnd.abc");
|