@spand If you replace all the int constants with enums, then you'll see your app run slower because there are probably thousands of them (int constants), which all need to be allocated as soon as their classes are loaded, and as all enum are classes, you'd grow the apk size, which could be significant (remember 8GB/4GB devices are still a thing, and 1-2GB ones too) if all apps did the same. Anyway, I'm not here to rewrite Android, I'm just searching for a more concise way to deal with int constants "switches" using the
when
expression