jjzjj

setUpdateCurrent

全部标签

android - 澄清 OneOffTask 上的 setUpdateCurrent

我正在努力研究GcmNetworkManager工具中OneoffTask的setTag和setUpdateCurrent的行为。ThedocumentationofsetUpdateCurrent是这样说的:Optionalsettertospecifywhetherthistaskshouldoverrideanypreexistingtaskswiththesametag.Thisdefaultstofalse,whichmeansthatanewtaskwillnotoverrideanexistingone.很公平,但它没有说明任务会发生什么,它只说明了一件不会发生的事情——