These 2 lines should be moved up to `try{...}` code block, and `mDisplayList.put(d.getDisplayId(), d);` should be placed at the beginning of `notifyAndSaveConnectedDisplay`.