crosswalk-project/crosswalk — pull request #1989 by shaochangbin (2014-05-23 05:33:40+00:00)
Title: [Tizen] Fix Sensor provider initialization issue.

On platforms without acceleration and gyroscope sensors, the
TizenPlatformSensor intialization costs more than 200ms and returns
NULL, due to Tizen framework keeps trying to connect the sensors
until timeout.

As a result, currently SensorProvider::GetInstance() will always call
above function and waste plenty of time.

To fix the issue, this PR connects to the sensors only once, if it
fails, it returns NULL when getting the SensorProvider instance.