Fixed
Status Update
Comments
ja...@gmail.com <ja...@gmail.com> #2
This appears to have regressed between alpha09 and alpha10.
vi...@google.com <vi...@google.com>
es...@google.com <es...@google.com>
tn...@google.com <tn...@google.com>
tn...@google.com <tn...@google.com>
tn...@google.com <tn...@google.com> #3
This is (finally) fixed by Change-Id: Ibac406149b0360dc0490cbd6c2f699265b1b1f48 for Studio 4.2. I'm also cherrypicking it back to 4.1. Thanks for the report!
Description
The offending code is:
class UpdateService : Service() {
override fun onStartCommand(intent: Intent, flags: Int, startId: Int): Int {
val config = intent.getParcelableExtra<UpdateConfig>(KEY_CONFIG)
if (config == null) {
Timber.warn { "No config present in intent." }
return START_NOT_STICKY
}
And the error is:
UpdateService.kt:52: Error: Must be one of: Service.START_STICKY_COMPATIBILITY, Service.START_STICKY, Service.START_NOT_STICKY, Service.START_REDELIVER_INTENT [WrongConstant]
Timber.warn { "No config present in intent." }
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The `Timber.warn` function is defined as:
inline fun Timber.warn(throwable: Throwable? = null, message: () -> String) {
log(WARNING, throwable, message)
}
inline fun Timber.log(priority: Int, throwable: Throwable? = null, message: () -> String) {
if (isLoggable(priority, null)) {
rawLog(priority, null, throwable, message())
}
}