Merge "Fix NPE on a device having no sensor" into pi-dev