title: Worker is not getting triggered upon switching networks on Android Q
body: <p>I have been using workmanager in my Android app for scheduling the jobs. Workers have internet constraints so that workers will only get triggered when the constraint is met. Everything works fine even when I switch the network from wifi to mobile data and vice-versa. All good until I tested the above scenario on Android Q(tested on nexus). On Android Q I have observed that when we try to enqueue the worker with EnqueueUniqueWork delay by 10 secs and just after this we disconnect the WIFI and network switches to MOBILE Data. But after 10 secs worker doesn't kick in.
  But if connect WIFI again or disconnect and reconnect MOBILE data again Worker kicks in.</p>
  <p>This the way I am triggering my worker</p>
  <pre><code>  private fun workerTest() {
      val constraints = Constraints.Builder()
          .setRequiredNetworkType(NetworkType.CONNECTED)
          .build()
  
      val compressionWork = OneTimeWorkRequest.Builder(CompressWorker::class.java)
          .setInitialDelay(10, TimeUnit.SECONDS)
          .setConstraints(constraints).build()
  
      val operation = WorkManager.getInstance(this)
          .enqueueUniqueWork(&quot;mytest&quot;, ExistingWorkPolicy.REPLACE, compressionWork)
  
     
  }
  </code></pre>
  <p>WorkManager version : androidx.work:work-runtime-ktx:2.2.0</p>
  <p>I have also raised a <a href="https://issuetracker.google.com/issues/146458530" rel="nofollow noreferrer">google issue</a> on google tracker but they closed it saying intended behavior.</p>
  <p>Is anyone else also facing the same problem? If yes then what is the fix?</p>