Permalink
Browse files

Stop AutoLock service on LogOffActivity.

Also only update progress on notification if we have a Master Key.
  • Loading branch information...
1 parent acc7df2 commit 037d9fc29534324bdd316b88880d2700f2783380 @rmceoin rmceoin committed Dec 9, 2012
@@ -48,6 +48,10 @@ public void onClick(View arg0) {
Intent serviceIntent = new Intent();
serviceIntent.setClass(LogOffActivity.this, ServiceDispatchImpl.class );
stopService(serviceIntent);
+
+ Intent autoLockIntent = new Intent(getApplicationContext(), AutoLockService.class);
+ stopService(autoLockIntent);
+
CategoryList.setSignedOut();
/*
@@ -157,12 +157,13 @@ public void onTick(long millisUntilFinished) {
if (debug)
Log.d(TAG, "tick: " + millisUntilFinished + " this=" + this);
timeRemaining = millisUntilFinished;
- ServiceNotification.updateProgress(AutoLockService.this, (int)timeoutUntilStop,
- (int)timeRemaining);
if (Master.getMasterKey() == null) {
if (debug)
Log.d(TAG, "detected masterKey=null");
lockOut();
+ } else {
+ ServiceNotification.updateProgress(AutoLockService.this, (int)timeoutUntilStop,
+ (int)timeRemaining);
}
}

0 comments on commit 037d9fc

Please sign in to comment.