Merge "Pal: Add check of device count to skip restoreDevice for plugin devices"