am a2a0a98a: Merge "Fix NPE if there is no accelerometer." into gingerbread

Merge commit 'a2a0a98ac7ce53f282a9a4caac9d382a0eb01ef9' into gingerbread-plus-aosp

* commit 'a2a0a98ac7ce53f282a9a4caac9d382a0eb01ef9':
  Fix NPE if there is no accelerometer.
This commit is contained in:
Dianne Hackborn
2010-10-05 19:06:04 -07:00
committed by Android Git Automerger

View File

@@ -109,7 +109,9 @@ public abstract class WindowOrientationListener {
}
public void setAllow180Rotation(boolean allowed) {
mSensorEventListener.setAllow180Rotation(allowed);
if (mSensorEventListener != null) {
mSensorEventListener.setAllow180Rotation(allowed);
}
}
public int getCurrentRotation(int lastRotation) {