mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-29 19:25:34 +00:00
Added open link logging
This commit is contained in:
parent
ea0483a842
commit
f5e294eeaf
1 changed files with 9 additions and 1 deletions
|
@ -461,12 +461,14 @@ public class FragmentDialogOpenLink extends FragmentDialogBase {
|
|||
|
||||
setMore(false);
|
||||
|
||||
Log.i("Open link dialog uri=" + uri);
|
||||
return new AlertDialog.Builder(context)
|
||||
.setView(dview)
|
||||
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
Uri uri = Uri.parse(etLink.getText().toString());
|
||||
Log.i("Open link uri=" + uri);
|
||||
Helper.view(context, uri, false);
|
||||
}
|
||||
})
|
||||
|
@ -475,6 +477,7 @@ public class FragmentDialogOpenLink extends FragmentDialogBase {
|
|||
public void onClick(DialogInterface dialog, int which) {
|
||||
// https://developer.android.com/training/basics/intents/sending#AppChooser
|
||||
Uri uri = Uri.parse(etLink.getText().toString());
|
||||
Log.i("Open link with uri=" + uri);
|
||||
Intent view = new Intent(Intent.ACTION_VIEW, uri);
|
||||
Intent chooser = Intent.createChooser(view, context.getString(R.string.title_select_app));
|
||||
try {
|
||||
|
@ -485,7 +488,12 @@ public class FragmentDialogOpenLink extends FragmentDialogBase {
|
|||
}
|
||||
}
|
||||
})
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
Log.i("Open link cancelled");
|
||||
}
|
||||
})
|
||||
.create();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue