From: peli0101 Date: Sun, 15 Mar 2009 03:39:07 +0000 (+0000) Subject: OI Safe: Revert modification for now (could be used later after 1.1.0 is released). X-Git-Url: https://hydra-www.ietfng.org/gitweb/?a=commitdiff_plain;h=95ed869b50afd77bd91985945d821bf931ba553c;p=android-vcpass-oisafe OI Safe: Revert modification for now (could be used later after 1.1.0 is released). git-svn-id: http://openintents.googlecode.com/svn/trunk/Safe@1994 72b678ce-9140-0410-bee8-679b907dd61a --- diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 8797381..7262ba2 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -36,7 +36,7 @@ android:theme="@android:style/Theme.Translucent.NoTitleBar"> - + @@ -65,12 +65,7 @@ - - - - - - + diff --git a/src/org/openintents/safe/CategoryList.java b/src/org/openintents/safe/CategoryList.java index f6c0f86..6150113 100644 --- a/src/org/openintents/safe/CategoryList.java +++ b/src/org/openintents/safe/CategoryList.java @@ -90,7 +90,6 @@ public class CategoryList extends ListActivity { public static final int REQUEST_ADD_CATEGORY = 2; public static final int REQUEST_OPEN_CATEGORY = 3; public static final int REQUEST_RESTORE = 4; - public static final int REQUEST_ASK_PASSWORD = 5; protected static final int MSG_IMPORT = 0x101; protected static final int MSG_FILLDATA = MSG_IMPORT + 1; @@ -134,7 +133,6 @@ public class CategoryList extends ListActivity { } } }; - boolean mIntentReceiverRegistered = false; public Handler myViewUpdateHandler = new Handler(){ // @Override @@ -198,9 +196,9 @@ public class CategoryList extends ListActivity { if (isSignedIn()==false) { Intent frontdoor = new Intent(this, FrontDoor.class); - startActivityForResult(frontdoor, REQUEST_ASK_PASSWORD); - //finish(); - //return; + startActivity(frontdoor); + finish(); + return; } try { @@ -226,7 +224,6 @@ public class CategoryList extends ListActivity { filter.addAction(Intent.ACTION_SCREEN_OFF); filter.addAction (CryptoIntents.ACTION_CRYPTO_LOGGED_OUT); registerReceiver(mIntentReceiver, filter); - mIntentReceiverRegistered = true; fillData(); @@ -244,13 +241,12 @@ public class CategoryList extends ListActivity { if (isSignedIn()==false) { Intent frontdoor = new Intent(this, FrontDoor.class); - startActivityForResult(frontdoor, REQUEST_ASK_PASSWORD); - //finish(); - //return; - } else { - - showFirstTimeWarningDialog(); + startActivity(frontdoor); + finish(); + return; } + + showFirstTimeWarningDialog(); } /** @@ -302,10 +298,7 @@ public class CategoryList extends ListActivity { @Override public void onDestroy() { super.onDestroy(); - if (mIntentReceiverRegistered) { - unregisterReceiver(mIntentReceiver); - mIntentReceiverRegistered = false; - } + unregisterReceiver(mIntentReceiver); if (debug) Log.d(TAG,"onDestroy()"); } @Override @@ -585,8 +578,8 @@ public class CategoryList extends ListActivity { masterKey=null; Intent frontdoor = new Intent(this, FrontDoor.class); frontdoor.setAction(Intent.ACTION_MAIN); - startActivityForResult(frontdoor, REQUEST_ASK_PASSWORD); - //finish(); + startActivity(frontdoor); + finish(); } /** @@ -633,34 +626,12 @@ public class CategoryList extends ListActivity { protected void onActivityResult(int requestCode, int resultCode, Intent i) { super.onActivityResult(requestCode, resultCode, i); - switch (requestCode) { - case REQUEST_ADD_CATEGORY: - case REQUEST_OPEN_CATEGORY: - case REQUEST_RESTORE: - if (resultCode == RESULT_OK) { - fillData(); - } - break; - case REQUEST_EDIT_CATEGORY: - if (resultCode == RESULT_OK) { - fillData(); - setSelection(lastPosition); - } - break; - case REQUEST_ASK_PASSWORD: - if (isSignedIn()==false) { - finish(); - } - break; - } - /* if (resultCode == RESULT_OK) { fillData(); if (requestCode==REQUEST_EDIT_CATEGORY) { setSelection(lastPosition); } } - */ } private void prePopulate() { diff --git a/src/org/openintents/safe/IntentHandler.java b/src/org/openintents/safe/IntentHandler.java index 7f8a2a9..529e230 100644 --- a/src/org/openintents/safe/IntentHandler.java +++ b/src/org/openintents/safe/IntentHandler.java @@ -419,7 +419,7 @@ public class IntentHandler extends Activity { @Override protected void onResume() { - super.onResume(); + super.onPause(); if (debug) Log.d(TAG, "onResume()"); diff --git a/src/org/openintents/safe/Passwords.java b/src/org/openintents/safe/Passwords.java index a70829d..231317e 100644 --- a/src/org/openintents/safe/Passwords.java +++ b/src/org/openintents/safe/Passwords.java @@ -104,11 +104,7 @@ public class Passwords { } public static boolean getPrePopulate() { - if (dbHelper != null) { - return dbHelper.getPrePopulate(); - } else { - return false; - } + return dbHelper.getPrePopulate(); } public static void clearPrePopulate() {