Switch from switch to if-else to be compatible with the new ADT

Change-Id: Idd1d803d3edc1eb0294a63480731b5d28a65c4e8
6 files changed