-<?xml version="1.0" encoding="UTF-8"?>\r
-<classpath>\r
- <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>\r
- <classpathentry kind="src" path="src"/>\r
- <classpathentry kind="src" path="gen"/>\r
- <classpathentry kind="output" path="bin"/>\r
-</classpath>\r
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="gen"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
android:value="@string/about_email" />\r
<activity class=".FrontDoor" android:name="FrontDoor" android:label="@string/app_name"\r
- android:theme="@android:style/Theme.Translucent.NoTitleBar" android:launchMode="singleTop">
+ android:theme="@android:style/Theme.Translucent.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />\r
</activity>
<activity class=".IntentHandler" android:name="IntentHandler" android:label="@string/app_name"
- android:permission="org.openintents.safe.ACCESS_INTENTS" android:launchMode="singleTop">
+ android:permission="org.openintents.safe.ACCESS_INTENTS">
<intent-filter android:label="@string/intent_encrypt">
<action android:name="org.openintents.action.ENCRYPT" />
<category android:name="android.intent.category.DEFAULT" />
<activity class=".PassEdit" android:name="PassEdit" android:label="@string/app_name" />
<activity class=".CategoryList" android:name="CategoryList" android:label="@string/app_name" />
<activity class=".Search" android:name="Search" android:label="@string/app_name" />
- <activity class=".AskPassword" android:name="AskPassword" android:label="@string/app_name" android:launchMode="singleTop"/>\r
+ <activity class=".AskPassword" android:name="AskPassword" android:label="@string/app_name"/>\r
<activity class=".Help" android:name="Help" android:label="@string/app_name" />
<activity class=".ChangePass" android:name="ChangePass" android:label="@string/app_name" />
<activity class=".Restore" android:name="Restore" android:label="@string/app_name" />
*/
public class PassView extends Activity implements View.OnClickListener {
- private static boolean debug = false;
+ private static boolean debug = true;
private static String TAG = "PassView";
public static final int EDIT_PASSWORD_INDEX = Menu.FIRST;
private long timeoutUntilStop = timeoutMinutes * 60000;
private BroadcastReceiver mIntentReceiver;
private boolean lockOnScreenLock=true;
+ public static long timeRemaining=0;
@Override
public IBinder onBind(Intent intent) {
super.onDestroy();
if (debug) Log.d( TAG,"onDestroy" );
+ unregisterReceiver(mIntentReceiver);
+ if (masterKey!=null) {
+ lockOut();
+ }
+ }
+
+ private void lockOut() {
masterKey = null;
ch = null;
- unregisterReceiver(mIntentReceiver);
ServiceNotification.clearNotification(ServiceDispatchImpl.this);
CategoryList.setSignedOut();
Intent intent = new Intent(CryptoIntents.ACTION_CRYPTO_LOGGED_OUT);
sendBroadcast(intent);
-
}
-
+
private void startTimer () {
if (debug) Log.d(TAG,"startTimer with timeoutUntilStop="+timeoutUntilStop);
t = new CountDownTimer(timeoutUntilStop, 10000) {
public void onTick(long millisUntilFinished) {
//doing nothing.
if (debug) Log.d(TAG, "tick: " + millisUntilFinished );
+ timeRemaining=millisUntilFinished;
}
public void onFinish() {
if (debug) Log.d(TAG,"onFinish()");
+ lockOut();
stopSelf(); // countdown is over, stop the service.
+ timeRemaining=0;
}
};
t.start();
+ timeRemaining=timeoutUntilStop;
if (debug) Log.d(TAG, "Timer started with: " + timeoutUntilStop );
}
- public void restartTimer () {
+ private void restartTimer () {
// must be started with startTimer first.
if (debug) Log.d(TAG,"timer restarted");
if (t != null) {