Skip to content

Commit

Permalink
Stop AutoLock service on LogOffActivity.
Browse files Browse the repository at this point in the history
Also only update progress on notification if we have a Master Key.
  • Loading branch information
rmceoin committed Dec 9, 2012
1 parent acc7df2 commit 037d9fc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Safe/src/org/openintents/safe/LogOffActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();

/*
Expand Down
5 changes: 3 additions & 2 deletions Safe/src/org/openintents/safe/service/AutoLockService.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 037d9fc

Please sign in to comment.