Merge "Move the setActiveDevice logic from Settings to SettingsLib (1/2)" into pi-dev