Links from about page open in external window.

This commit is contained in:
Dmitry Yunitsky 2014-07-23 17:49:28 +03:00 committed by Alex Zolotarev
parent 535beebc58
commit 0b23047ff5

View file

@ -9,6 +9,7 @@ import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.PackageManager.NameNotFoundException;
import android.net.MailTo;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.preference.CheckBoxPreference;
@ -255,21 +256,23 @@ public class SettingsActivity extends PreferenceActivity
{
MailTo parser = MailTo.parse(url);
Context ctx = v.getContext();
Intent mailIntent = CreateEmailIntent(ctx,
parser.getTo(),
Intent mailIntent = CreateEmailIntent(parser.getTo(),
parser.getSubject(),
parser.getBody(),
parser.getCc());
ctx.startActivity(mailIntent);
v.reload();
return true;
}
else
return false;
{
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(url));
SettingsActivity.this.startActivity(intent);
}
return true;
}
private Intent CreateEmailIntent(Context context,
String address,
private Intent CreateEmailIntent(String address,
String subject,
String body,
String cc)
@ -313,7 +316,6 @@ public class SettingsActivity extends PreferenceActivity
private native boolean isDownloadingActive();
// needed for soft keyboard to appear in alertdialog.
// check https://code.google.com/p/android/issues/detail?id=7189 for details
public static class MyWebView extends WebView