Merge "Remove some direct usage of getDevicePrefs()" into main