[DF-5352] written bytes calculation fix for android