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

Merge commit '92d29c66f5cb69627172d21057e672eaba2eb03f'

* commit '92d29c66f5cb69627172d21057e672eaba2eb03f':
  Fix NPE if there is no accelerometer.
This commit is contained in:
Dianne Hackborn
2010-10-08 12:39:14 -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) {