summaryrefslogtreecommitdiffstats
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
parent93b850ee96b9de69f64be5390b7c65a5a38de624 (diff)
downloadSoftKeys-3.04.zip
SoftKeys-3.04.tar.gz
SoftKeys-3.04.tar.bz2
Don't intialize the orientation listener until we've finished setting upv3.04
our views to eliminate force close race condition
-rw-r--r--AndroidManifest.xml4
-rw-r--r--src/net/hoopajoo/android/SoftKeys/SoftKeysService.java16
2 files changed, 10 insertions, 10 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index ca21b46..c833456 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="net.hoopajoo.android.SoftKeys"
- android:versionCode="17"
- android:versionName="3.03">
+ android:versionCode="18"
+ android:versionName="3.04">
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
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();
}