Merge "Added device state monitor"