private boolean initDefaultSensor(){
  if (proximitySensor != null) {
    return true;
  }
  proximitySensor=sensorManager.getDefaultSensor(Sensor.TYPE_PROXIMITY);
  if (proximitySensor == null) {
    return false;
  }
  logProximitySensorInfo();
  return true;
}

private boolean initDefaultSensor ( ) { if ( proximitySensor != null ) { return true ; } proximitySensor = sensorManager . getDefaultSensor ( Sensor . TYPE_PROXIMITY ) ; if ( proximitySensor == null ) { return false ; } logProximitySensorInfo ( ) ; return true ; }
get default proximity sensor if it exists . tablet devices ( e . g . nexus 7 ) does not support this type of sensor and false will be returned in such cases .
