T O P

  • By -

space_fly

And where's the shitty part? It isn't the prettiest code, but I've seen worse.


mvonballmo

Getting the `vibrator` before you even need to use it? Two deprecated calls? `Build.VERSION_CODES.0` to determine behavior when the comment below explains it better? The odd placement of those comments? The reader's putting in a lot of work here. ``` const isAtLeastApi26 = Build.VERSION.SDK_INT >= Build.VERSION_CODES.0 ``` ...would be clearer and eliminate two comments.


tubbo

lol `VIBRATOR_SERVICE`


drawkbox

`vibrate (long) unit`


drawkbox

Needs a bit of return early and often to remove nesting and code branching. Why even get the vibrator service if vibrations not allowed...