title: Chromebook : can't attach file to e-mail
body: <p>I have a (big) problem on chromebook with a functionnality working fine on &quot;classic&quot; android devices (phones, tablets).</p>
  <p>I try to send an e-mail with an attached file.</p>
  <p>Here's a portion of code (api&gt;=23).</p>
  <blockquote>
  <pre><code>        Intent email = new Intent(Intent.ACTION_SEND);
          String[] str = new String[1];
          str[0] = &quot;destination@yahoo.fr&quot;;
          email.putExtra(Intent.EXTRA_EMAIL, str);
  
          email.putExtra(Intent.EXTRA_TEXT, &quot;My text&quot;);
          email.putExtra(Intent.EXTRA_SUBJECT, &quot;My subject&quot;);
  
          Uri uri = FileProvider.getUriForFile(this, &quot;com.TTT.fileprovider&quot;, new File(dest));
  
          email.putExtra(android.content.Intent.EXTRA_STREAM, uri);
  
          email.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION
                  | Intent.FLAG_GRANT_WRITE_URI_PERMISSION
                  | Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION);
  
          email.setType(&quot;message/rfc822&quot;);
  
          startActivity(email);
  </code></pre>
  </blockquote>
  <p>On my Phone (android 9 api 28), gmail app is called, all text fields are filled with correct information and the file (myResume.pdf) is correctly attached.</p>
  <p>When sent then received, the e-mail contains a readable pdf file. that's cool.</p>
  <p>With my chromebook (PB 314 / v. 83.0.4103.119), gmail is called, all text fields are filled with correct information <strong>but no attached file</strong>.</p>
  <p>LogCat indicates :</p>
  <pre><code>2020-06-27 15:25:50.886 127-2348/? I/ActivityManager: START u0 {act=android.intent.action.SEND typ=message/rfc822 flg=0x43 cmp=org.chromium.arc.applauncher/.ChromeBrowserProxyActivity clip={message/rfc822 T:My text} (has extras)} from uid 10040
  2020-06-27 15:25:50.887 565-565/? D/ArcDummy: New intent received: Intent { act=android.intent.action.SEND typ=message/rfc822 flg=0x10000043 cmp=org.chromium.arc.applauncher/.ChromeBrowserProxyActivity clip={message/rfc822 T:My text} (has extras) }
  2020-06-27 15:25:50.887 565-565/? W/ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.startService:1531 android.content.ContextWrapper.startService:664 org.chromium.arc.applauncher.DummyActivity.forwardIntentIfNeeded:155 org.chromium.arc.applauncher.DummyActivity.onNewIntent:121 android.app.Activity.performNewIntent:7255 
  2020-06-27 15:25:50.892 127-2348/? W/WindowManagerInjector: Attempted to get menu state of app token with non existing window
  2020-06-27 15:25:50.896 780-842/? D/ArcMediaControllerManager: onTaskMovedToFront: 2
  2020-06-27 15:25:50.897 780-842/? I/ArcMediaControllerManager: onAppBecameActive: org.chromium.arc.applauncher
  2020-06-27 15:25:50.892 127-2348/? W/WindowManagerInjector: Attempted to get menu state of app token with non existing window
  2020-06-27 15:25:50.900 127-760/? W/ActivityManager: For security reasons, the system cannot issue a Uri permission grant to content://com.TTT.fileprovider/images/myResume.pdf [user 0]; use startActivityAsCaller() instead
  2020-06-27 15:25:50.901 127-760/? W/WindowManagerInjector: Attempted to get menu state of app token with non existing window   
  </code></pre>
  <p>when testing on android phones, this sentence never appears :</p>
  <pre><code>For security reasons, the system cannot issue a Uri permission grant to content://com.TTT.fileprovider/images/myResume.pdf [user 0]; use startActivityAsCaller() instead  
  </code></pre>
  <p>more information about previous code :</p>
  <pre><code>the file &quot;myResume.pdf&quot; is copied to a special directory for beeing shared with gmail.
      
  dest is a string (/storage/emulated/0/MyDir/myResume.pdf) obtained with
      
  Environment.getExternalStorageDirectory().toString() &gt; /storage/emulated/0/
  my sub directory, created and verified &gt; MyDir/
  the file &gt; myResume.pdf
      
  </code></pre>
  <p>the file AndroidManifest.xml includes</p>
  <pre><code>&lt;provider
          android:name=&quot;android.support.v4.content.FileProvider&quot;
          android:authorities=&quot;com.TTT.fileprovider&quot;
          android:exported=&quot;false&quot;
          android:grantUriPermissions=&quot;true&quot;&gt;
          &lt;meta-data
              android:name=&quot;android.support.FILE_PROVIDER_PATHS&quot;
              android:resource=&quot;@xml/provider_paths&quot;/&gt;
  &lt;/provider&gt;
  </code></pre>
  <p>the file @xml/provider_paths is :</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
      &lt;paths xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&gt;
      &lt;external-path name=&quot;images&quot;  path=&quot;myDir/&quot;/&gt;
      &lt;/paths&gt;
  </code></pre>
  <p>I hope I have explained my problem with all details,<br />
  Can anyone help me?
  Thank you very much!</p>