forked from organicmaps/organicmaps
Links from about page open in external window.
This commit is contained in:
parent
535beebc58
commit
0b23047ff5
1 changed files with 9 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue