summaryrefslogtreecommitdiffstats
path: root/src/net/hoopajoo
diff options
context:
space:
mode:
authorSteve Slaven <bpk@hoopajoo.net>2011-01-03 16:43:24 (GMT)
committerSteve Slaven <bpk@hoopajoo.net>2011-01-03 16:43:24 (GMT)
commit92bea9162959c4b5af21bcd8299233bfe9078508 (patch)
treece8601d7ca550406fa41b48dadf5be11fcb52983 /src/net/hoopajoo
parent0b0c843d291b82a260cc5d11b1146932caf48236 (diff)
downloadSoftKeys-92bea9162959c4b5af21bcd8299233bfe9078508.zip
SoftKeys-92bea9162959c4b5af21bcd8299233bfe9078508.tar.gz
SoftKeys-92bea9162959c4b5af21bcd8299233bfe9078508.tar.bz2
On first run show the home service like normal, allowing the popup to run
and the view to assemble correctly
Diffstat (limited to 'src/net/hoopajoo')
-rw-r--r--src/net/hoopajoo/android/SoftKeys/Globals.java1
-rw-r--r--src/net/hoopajoo/android/SoftKeys/Keys.java36
2 files changed, 12 insertions, 25 deletions
diff --git a/src/net/hoopajoo/android/SoftKeys/Globals.java b/src/net/hoopajoo/android/SoftKeys/Globals.java
index 3bc25a2..de6c76b 100644
--- a/src/net/hoopajoo/android/SoftKeys/Globals.java
+++ b/src/net/hoopajoo/android/SoftKeys/Globals.java
@@ -34,6 +34,7 @@ public class Globals extends Application {
public boolean restartKeys = false;
public int homeCounter = 0;
public boolean didInitNotifications = false;
+ public boolean firstRun = true;
public CommandShell getCommandShell() throws Exception {
if( cmd == null ) {
diff --git a/src/net/hoopajoo/android/SoftKeys/Keys.java b/src/net/hoopajoo/android/SoftKeys/Keys.java
index 3a158f4..1bf0edd 100644
--- a/src/net/hoopajoo/android/SoftKeys/Keys.java
+++ b/src/net/hoopajoo/android/SoftKeys/Keys.java
@@ -195,7 +195,7 @@ public class Keys extends Activity implements OnClickListener, OnLongClickListen
Toast.makeText( this, "Failed to find file: " + name + ", SoftKeys may not function", Toast.LENGTH_LONG ).show();
}
}catch( Exception e ) {
- Toast.makeText( this, "Failed to check for file: " + name, Toast.LENGTH_LONG ).show();
+ Toast.makeText( this, "Unable to check for file: " + name, Toast.LENGTH_LONG ).show();
}
}
@@ -406,6 +406,14 @@ public class Keys extends Activity implements OnClickListener, OnLongClickListen
public void onNewIntent( Intent i ) {
Globals app = (Globals)getApplication();
+ // if first run and intent is home then don't run normal home stuff
+ if( app.firstRun ) {
+ if( i.hasCategory( Intent.CATEGORY_HOME ) ) {
+ app.firstRun = false;
+ return;
+ }
+ }
+
///////// TODO: remove null junk
// handle real actions
@@ -461,29 +469,7 @@ public class Keys extends Activity implements OnClickListener, OnLongClickListen
this.finish();
}
}
- }
-
-
- /*
- // old home counter stuff
- //d( "homecounter: " + app.homeCounter );
- if( app.homeCounter != 0 ) {
- // they whacked home again
-
- // if 2clicker waiting then do 2clicker action
- if( app.homeCounter > 1 ) {
- SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences( this );
- clear_delayed_home();
- home_key_action( settings.getString( "homebuttonmulti", "launcher" ) );
- }else{
- // queue up an exit, if this timer doesn't finish before we come up again we'll run double-click instead
- SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences( this );
- post_delayed_home( settings.getString( "homebutton", "exit" ) );
- }
- }
- */
-
-
+ }
}
// calling this will run the desired home action in the specified time unless canceled by
@@ -686,4 +672,4 @@ public class Keys extends Activity implements OnClickListener, OnLongClickListen
startActivity( new Intent( this, Keys.class ) );
}
-} \ No newline at end of file
+}