Check for Microsoft apps

This commit is contained in:
M66B 2019-03-02 18:45:03 +00:00
parent 127a8b214a
commit 80961b64e6
2 changed files with 5 additions and 1 deletions

View File

@ -216,6 +216,9 @@ public class AdapterAttachment extends RecyclerView.Adapter<AdapterAttachment.Vi
for (ResolveInfo ri : ris) {
if ("com.adobe.reader".equals(ri.activityInfo.packageName))
Toast.makeText(context, R.string.title_no_adobe, Toast.LENGTH_LONG).show();
if (ri.activityInfo.packageName.startsWith("com.microsoft.office."))
Toast.makeText(context, R.string.title_no_microsoft, Toast.LENGTH_LONG).show();
Log.i("Target=" + ri);
context.grantUriPermission(ri.activityInfo.packageName, uri, Intent.FLAG_GRANT_READ_URI_PERMISSION);
targets.add(new NameResolveInfo(

View File

@ -530,7 +530,8 @@
<string name="title_fix">Fix</string>
<string name="title_enable">Enable</string>
<string name="title_no_ask_again">Do not ask this again</string>
<string name="title_no_adobe">Adobe Acrobat reader cannot open safely shared files, see the FAQ for more information</string>
<string name="title_no_adobe">Adobe Acrobat reader cannot safely open shared files, see the FAQ for more information</string>
<string name="title_no_microsoft">Microsoft apps cannot safely open shared files, see the FAQ for more information</string>
<string name="title_no_body">No message text found</string>
<string name="title_no_charset">Unsupported encoding: %1$s</string>
<string name="title_via">Via: %1$s</string>