summaryrefslogtreecommitdiffstats
path: root/src/net
diff options
context:
space:
mode:
authorSteve Slaven <bpk@hoopajoo.net>2011-01-10 23:15:49 (GMT)
committerSteve Slaven <bpk@hoopajoo.net>2011-01-10 23:15:49 (GMT)
commitb63863af4481996d696e0898ca90a651f660dc1a (patch)
tree5845e1b93953a2d13d30b0d23070d1876b71493d /src/net
parent93b850ee96b9de69f64be5390b7c65a5a38de624 (diff)
downloadSoftKeys-b63863af4481996d696e0898ca90a651f660dc1a.zip
SoftKeys-b63863af4481996d696e0898ca90a651f660dc1a.tar.gz
SoftKeys-b63863af4481996d696e0898ca90a651f660dc1a.tar.bz2
Don't intialize the orientation listener until we've finished setting upv3.04
our views to eliminate force close race condition
Diffstat (limited to 'src/net')
-rw-r--r--src/net/hoopajoo/android/SoftKeys/SoftKeysService.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/net/hoopajoo/android/SoftKeys/SoftKeysService.java b/src/net/hoopajoo/android/SoftKeys/SoftKeysService.java
index fa23127..9371814 100644
--- a/src/net/hoopajoo/android/SoftKeys/SoftKeysService.java
+++ b/src/net/hoopajoo/android/SoftKeys/SoftKeysService.java
@@ -262,14 +262,6 @@ public class SoftKeysService extends Service {
// The main buttons
mView = l.inflate( R.layout.service, null );
-
- mOrientationListener = new OrientationEventListener( this, SensorManager.SENSOR_DELAY_NORMAL ) {
- @Override
- public void onOrientationChanged( int orientation ) {
- initOrientation();
- }
- };
- mOrientationListener.enable();
SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences( this );
@@ -472,6 +464,14 @@ public class SoftKeysService extends Service {
wm.addView( mView, makeOverlayParams() );
wm.addView( mExtraView, makeOverlayParams() );
+ mOrientationListener = new OrientationEventListener( this, SensorManager.SENSOR_DELAY_NORMAL ) {
+ @Override
+ public void onOrientationChanged( int orientation ) {
+ initOrientation();
+ }
+ };
+ mOrientationListener.enable();
+
initOrientation();
}