title: black screen appears when come back from an external application
body: <p>I have an application that open an external application to read PDF files. here is the code to open the external app.</p>
  
  <pre><code>        if(file!=null){
              PackageManager packageManager = getPackageManager();
              Intent testIntent = new Intent(Intent.ACTION_VIEW);
              testIntent.setType("application/pdf");
              List list = packageManager.queryIntentActivities(testIntent, PackageManager.MATCH_DEFAULT_ONLY);
              if (list.size() &gt; 0 &amp;&amp; file.isFile()) {
                  Intent intent = new Intent();
                  intent.setAction(Intent.ACTION_VIEW);
                  Uri uri = Uri.fromFile(file);
                  intent.setDataAndType(uri, "application/pdf");
  
                  startActivity(intent);
              }else{
              Toast.makeText(this, "problem loading file", Toast.LENGTH_LONG).show();
          }
          }
  </code></pre>
  
  <p>The problem is when I come back from my pdf application (adobe reader or any pdf reader app), in the first click of my back button I get a black screen and in second I can reach my activity? How could I possibly solve this problem?</p>