Use TileServiceCompat in androidx.core to fix it.
TileServiceCompat
androidx.core
See also: https://developer.android.com/reference/android/service/quicksettings/TileService#startActivityAndCollapse(android.content.Intent)