1
0
mirror of https://github.com/danog/termux-api.git synced 2025-01-22 13:21:10 +01:00

Remove log spam

This commit is contained in:
Fredrik Fornwall 2015-07-31 03:10:23 +02:00
parent b23a68f669
commit f510b39d74

View File

@ -65,6 +65,7 @@ public class ShareAPI {
sendIntent.setType(contentTypeExtra == null ? "text/plain" : contentTypeExtra); sendIntent.setType(contentTypeExtra == null ? "text/plain" : contentTypeExtra);
context.startActivity(Intent.createChooser(sendIntent, context.getResources().getText(R.string.share_file_chooser_title)).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)); context.startActivity(Intent.createChooser(sendIntent, context.getResources().getText(R.string.share_file_chooser_title)).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
} }
}); });
} else { } else {
@ -74,7 +75,7 @@ public class ShareAPI {
public void writeResult(PrintWriter out) throws Exception { public void writeResult(PrintWriter out) throws Exception {
final File fileToShare = new File(fileExtra); final File fileToShare = new File(fileExtra);
if (!(fileToShare.isFile() && fileToShare.canRead())) { if (!(fileToShare.isFile() && fileToShare.canRead())) {
out.println("Not a readable file: '" + fileToShare.getAbsolutePath() + "'"); out.println("ERROR: Not a readable file: '" + fileToShare.getAbsolutePath() + "'");
return; return;
} }
@ -94,8 +95,6 @@ public class ShareAPI {
contentTypeToUse = contentTypeExtra; contentTypeToUse = contentTypeExtra;
} }
TermuxApiLogger.info("CONTENT: " + contentTypeToUse + ", default=" + defaultReceiverExtra + ", action=" + finalIntentAction);
if (titleExtra != null) sendIntent.putExtra(Intent.EXTRA_SUBJECT, titleExtra); if (titleExtra != null) sendIntent.putExtra(Intent.EXTRA_SUBJECT, titleExtra);
if (Intent.ACTION_SEND.equals(finalIntentAction)) { if (Intent.ACTION_SEND.equals(finalIntentAction)) {
@ -151,7 +150,6 @@ public class ShareAPI {
public ParcelFileDescriptor openFile(Uri uri, String mode) throws FileNotFoundException { public ParcelFileDescriptor openFile(Uri uri, String mode) throws FileNotFoundException {
String fileName = uri.getPath(); String fileName = uri.getPath();
File file = new File(uri.getPath()); File file = new File(uri.getPath());
TermuxApiLogger.info("...filepath=" + file.getAbsolutePath());
return ParcelFileDescriptor.open(file, ParcelFileDescriptor.MODE_READ_ONLY); return ParcelFileDescriptor.open(file, ParcelFileDescriptor.MODE_READ_ONLY);
} }
} }