does it differ from android implementation? looks like same as above, think it's better to simply remove ifdefs