package Ġcom . github . trip let . gradle . play . internal Ċ Ċ import Ġcom . google . api . client . googleapis . media . Media Http Uploader Ċ import Ġcom . google . api . services . android publisher . Android Publisher Request Ċ import Ġorg . gradle . internal . logging . progress . Progress Logger Ċ import Ġkotlin . math . round ToInt Ċ Ċ internal Ġfun Ġ< T > ĠAndroid Publisher Request < T >. track Upload Progress ( ĊĠĠĠĠĠĠĠ Ġlogger : ĠProgress Logger , ĊĠĠĠĠĠĠĠ Ġthing : ĠString Ċ ): ĠAndroid Publisher Request < T > Ġ{ ĊĠĠĠ Ġval Ġup loader Ġ= Ġmedia Http Uploader Ġ?: Ġreturn Ġthis ĊĠĠĠ Ġup loader . chunk Size Ġ= Ġ 4 Ġ* ĠMedia Http Uploader . MIN IMUM _ CHUNK _ SIZE ĊĠĠĠ Ġup loader . set Progress Listener Ġ{ ĊĠĠĠĠĠĠĠ Ġ@ Suppress (" NON _ EX HA UST IVE _ WHEN ") ĊĠĠĠĠĠĠĠ Ġwhen Ġ( it . upload State ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠMedia Http Uploader . Upload State . MEDIA _ IN _ PROGRESS Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġlogger . progress (" Up loading Ġ$ thing : Ġ${ ( it . progress Ġ* Ġ 1 0 0 ). round ToInt ()} % Ġcomplete ") ĊĠĠĠĠĠĠĠĠĠĠĠ ĠMedia Http Uploader . Upload State . MEDIA _ COMPLETE Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġlogger . progress ("${ thing . capitalize ()} Ġupload Ġcomplete ") ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĠĠĠ Ġreturn Ġthis Ċ } Ċ