diff options
Diffstat (limited to 'src/com/android/systemui/navigation/BaseNavigationBar.java')
| -rw-r--r-- | src/com/android/systemui/navigation/BaseNavigationBar.java | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/src/com/android/systemui/navigation/BaseNavigationBar.java b/src/com/android/systemui/navigation/BaseNavigationBar.java index 29eacd8..91e16e7 100644 --- a/src/com/android/systemui/navigation/BaseNavigationBar.java +++ b/src/com/android/systemui/navigation/BaseNavigationBar.java @@ -53,13 +53,11 @@ import android.graphics.Canvas; import android.graphics.Point; import android.graphics.Rect; import android.graphics.drawable.Drawable; -import android.hardware.SensorManager; import android.os.Handler; import android.os.Message; import android.util.AttributeSet; import android.util.Log; import android.view.Display; -import android.view.OrientationEventListener; import android.view.Surface; import android.view.View; import android.view.ViewGroup; @@ -92,9 +90,7 @@ public abstract class BaseNavigationBar extends LinearLayout implements Navigato protected View mCurrentView = null; protected FrameLayout mRot0, mRot90; protected int mDisabledFlags = 0; - private int mLastRotation = Surface.ROTATION_0; protected int mNavigationIconHints = 0; - private boolean isOrientationListenerEnabled; protected boolean mVertical; protected boolean mScreenOn; protected boolean mLeftInLandscape; @@ -102,7 +98,6 @@ public abstract class BaseNavigationBar extends LinearLayout implements Navigato protected boolean mWakeAndUnlocking; protected boolean mScreenPinningEnabled; protected OnVerticalChangedListener mOnVerticalChangedListener; - protected OrientationEventListener mOrientationEventListener; protected SmartObserver mSmartObserver; protected PulseController mPulse; protected PhoneStatusBar mBar; @@ -160,21 +155,6 @@ public abstract class BaseNavigationBar extends LinearLayout implements Navigato mSmartObserver = new SmartObserver(mHandler, context.getContentResolver()); mSpringSystem = SpringSystem.create(); sIsTablet = !DUActionUtils.navigationBarCanMove(); - mOrientationEventListener = new OrientationEventListener(mContext, - SensorManager.SENSOR_DELAY_NORMAL) { - @Override - public void onOrientationChanged(int orientation) { - int rotation = mDisplay.getRotation(); - if (rotation != mLastRotation) { - setLeftInLandscape(rotation == Surface.ROTATION_270); - } - mLastRotation = rotation; - } - }; - if (mOrientationEventListener.canDetectOrientation()) { - mOrientationEventListener.enable(); - isOrientationListenerEnabled = true; - } } // require implementation. Surely they have something to clean up @@ -331,14 +311,6 @@ public abstract class BaseNavigationBar extends LinearLayout implements Navigato if (mPulse != null) { mPulse.setKeyguardShowing(showing); } - if (mScreenOn && !mKeyguardShowing && !isOrientationListenerEnabled - && mOrientationEventListener.canDetectOrientation()) { - mOrientationEventListener.enable(); - isOrientationListenerEnabled = true; - } else if (isOrientationListenerEnabled) { - mOrientationEventListener.disable(); - isOrientationListenerEnabled = false; - } onKeyguardShowing(showing); } } @@ -424,14 +396,6 @@ public abstract class BaseNavigationBar extends LinearLayout implements Navigato if (mPulse != null) { mPulse.notifyScreenOn(screenOn); } - if (mScreenOn && !mKeyguardShowing && !isOrientationListenerEnabled - && mOrientationEventListener.canDetectOrientation()) { - mOrientationEventListener.enable(); - isOrientationListenerEnabled = true; - } else if (isOrientationListenerEnabled) { - mOrientationEventListener.disable(); - isOrientationListenerEnabled = false; - } setDisabledFlags(mDisabledFlags, true); } |
