This is what probably was seen by the reviewers:
If they use the rendered view they only see some single spaces being removed. As reviewers in the suggested-edit queue are not known for spending a lot of time on each review they will reject such edits.
In the markdown view it isn't much better to see exactly how much you changed to edit the code in the question into shape.
You would probably have had more luck to get the edit past the reviewers if you not only edited the whitespace but also took on the title and the paragraph of text. For example:
On motoX why do I get the error Sensor Event is null for sensor
I have build an application to check the latency and jitter in sensor events. It runs successfully on a Nexus 5.
But when I try to execute the same application on motoX, I get the following error:
"Sensor event is null for sensor"
What is the root cause for this problem and how should I fix that?
I don't think reviewers would have rejected that suggested edit and with that they would have also accepted your whitespace only fix of the code.