Fix text/plain mime
This commit is contained in:
		| @ -300,7 +300,7 @@ public class DownloadFragment extends Fragment { | |||||||
|  |  | ||||||
|         DownloadFile dl = (DownloadFile) DownloadFile.getFileById(id); |         DownloadFile dl = (DownloadFile) DownloadFile.getFileById(id); | ||||||
|  |  | ||||||
|         if(dl.type.equals("text/plain")) { |         if(dl.mime.equals("text/plain")) { | ||||||
|             String text = null; |             String text = null; | ||||||
|             try { |             try { | ||||||
|                 InputStream is = getActivity().getContentResolver().openInputStream(dl.uri); |                 InputStream is = getActivity().getContentResolver().openInputStream(dl.uri); | ||||||
| @ -321,7 +321,7 @@ public class DownloadFragment extends Fragment { | |||||||
|  |  | ||||||
|             try { |             try { | ||||||
|                 Intent intent = new Intent(Intent.ACTION_SEND); |                 Intent intent = new Intent(Intent.ACTION_SEND); | ||||||
|                 intent.setType(dl.type); |                 intent.setType(dl.mime); | ||||||
|                 intent.putExtra(Intent.EXTRA_TEXT, text); |                 intent.putExtra(Intent.EXTRA_TEXT, text); | ||||||
|                 startActivity(Intent.createChooser(intent, getString(R.string.share_title))); |                 startActivity(Intent.createChooser(intent, getString(R.string.share_title))); | ||||||
|             } catch (ActivityNotFoundException e) { |             } catch (ActivityNotFoundException e) { | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 lionel
					lionel