[T-Mobile Samsung Galaxy S II SGH-T989] hayn_pryde46:
Possible Fixes...

Hey Man I Ws Looking Around In Android Policy.jar/Android/Phonewindowsmanager.smali And There A Lot Of Rotation And Sensor Code In There You Might Wanna Check That Out Too...

const-string v11, "accelerometer_rotation"

const/4 v13, 0x0

invoke-static {v8, v11, v13}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

move-result v0

if-nez v0, :cond_109

const/4 v11, 0x1

:goto_28
iput v11, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mUserRotationMode:I

const-string v11, "user_rotation"

const/4 v13, 0x0

invoke-static {v8, v11, v13}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

move-result v11

iput v11, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mUserRotation:I

iget v11, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mAccelerometerDefault:I

if-eq v11, v0, :cond_3c

iput v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mAccelerometerDefault:I

invoke-virtual {p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->updateOrientationListenerLp()V

:cond_3c
iget-object v13, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mOrientationListener:Lcom/android/internal/policy/impl/PhoneWindowManager$MyOrientationListener;

const-string v11, "window_orientation_listener_log"

const/4 v14, 0x0

invoke-static {v8, v11, v14}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

move-result v11

if-eqz v11, :cond_10c

const/4 v11, 0x1

:goto_48

iput v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mLandscapeRotation:I

iput v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSeascapeRotation:I

iput v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mPortraitRotation:I

iput v1, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mUpsideDownRotation:I

const-string v0, "mLandscapeRotation="

invoke-virtual {p3, v0}, Ljava/io/PrintWriter;->print(Ljava/lang/String;)V

iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mLandscapeRotation:I

invoke-virtual {p3, v0}, Ljava/io/PrintWriter;->print(I)V

const-string v0, " mSeascapeRotation="

invoke-virtual {p3, v0}, Ljava/io/PrintWriter;->print(Ljava/lang/String;)V

iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mSeascapeRotation:I

invoke-virtual {p3, v0}, Ljava/io/PrintWriter;->println(I)V

invoke-virtual {p3, p1}, Ljava/io/PrintWriter;->print(Ljava/lang/String;)V

const-string v0, "mPortraitRotation="

invoke-virtual {p3, v0}, Ljava/io/PrintWriter;->print(Ljava/lang/String;)V

iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mPortraitRotation:I

invoke-virtual {p3, v0}, Ljava/io/PrintWriter;->print(I)V

const-string v0, " mUpsideDownRotation="

invoke-virtual {p3, v0}, Ljava/io/PrintWriter;->print(Ljava/lang/String;)V

iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mUpsideDownRotation:I

invoke-virtual {p3, v0}, Ljava/io/PrintWriter;->println(I)V

return-void
.end method]

const-string v6, "/sys/power/rotation_booster"

Maybe For Shutdown Issues

const-string v5, "SHOULD_SHUT_DOWN"

const/4 v6, 0x0

invoke-static {v4, v5, v6}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

move-result v4

const/4 v5, 0x1

if-ne v4, v5, :cond_3b

Maybe For Call Echo

const-string v0, "mEndcallBehavior="

invoke-virtual {p3, v0}, Ljava/io/PrintWriter;->print(Ljava/lang/String;)V

iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mEndcallBehavior:I

invoke-virtual {p3, v0}, Ljava/io/PrintWriter;->print(I)V

const-string v0, " mIncallPowerBehavior="

invoke-virtual {p3, v0}, Ljava/io/PrintWriter;->print(Ljava/lang/String;)V

iget v0, p0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mIncallPowerBehavior:I

invoke-virtual {p3, v0}, Ljava/io/PrintWriter;->print(I)V

Hope These Help To Give An Idea Of What It Looks Like...