title: intent.resolveActivity returns null in API 30
body: <p>Looking at <a href="https://stackoverflow.com/questions/22479211/intent-resolveactivity-null-but-launching-the-intent-throws-an-activitynotfou">intent.resolveActivity != null but launching the intent throws an ActivityNotFound exception</a> I wrote opening a browser or an application with Deep linking:</p>
  <pre><code>private fun openUrl(url: String) {
      val intent = Intent().apply {
          action = Intent.ACTION_VIEW
          data = Uri.parse(url)
  //        setDataAndType(Uri.parse(url), &quot;text/html&quot;)
  //        component = ComponentName(&quot;com.android.browser&quot;, &quot;com.android.browser.BrowserActivity&quot;)
  //        flags = Intent.FLAG_ACTIVITY_CLEAR_TOP + Intent.FLAG_GRANT_READ_URI_PERMISSION
      }
      val activityInfo = intent.resolveActivityInfo(packageManager, intent.flags)
      if (activityInfo?.exported == true) {
          startActivity(intent)
      } else {
          Toast.makeText(
              this,
              &quot;No application can handle the link&quot;,
              Toast.LENGTH_SHORT
          ).show()
      }
  }
  </code></pre>
  <p>It doesn't work. No browser found in API 30 emulator, while a common <a href="https://stackoverflow.com/questions/5882656/no-activity-found-to-handle-intent-android-intent-action-view/62531168">solution</a> works:</p>
  <pre><code>private fun openUrl(url: String) {
      val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
      try {
          startActivity(intent)
      } catch (e: ActivityNotFoundException) {
          Toast.makeText(
              this,
              &quot;No application can handle the link&quot;,
              Toast.LENGTH_SHORT
          ).show()
      }
  }
  </code></pre>
  <p>The first method doesn't work, because <code>intent.resolveActivityInfo</code> or <code>intent.resolveActivity</code> returns <code>null</code>. But for PDF-viewer it <a href="https://stackoverflow.com/a/59322760/2914140">works</a>.</p>
  <p>Should we dismiss <code>intent.resolveActivity</code>?</p>