Fix getSwitchState and others to check bitmasks.
Bug: 5149443

Removed some dead code and unnecessary checks, such as checks
for non-nullity of arrays that used to be dynamically allocated
once upon a time but are now part of the Device object itself.

Change-Id: I531116e816772d7c5030d22da0c8e1d7dcfba778
2 files changed