improved comments

This commit is contained in:
Dominik 2012-09-12 13:51:48 +02:00
parent c7c5bfebbe
commit b9abe386cd
2 changed files with 8 additions and 8 deletions

View File

@ -53,14 +53,14 @@ public class PassphraseCacheService extends Service {
private BroadcastReceiver mIntentReceiver; private BroadcastReceiver mIntentReceiver;
// TODO: This is static to be easily retrieved by getCachedPassphrase() // This is static to be easily retrieved by getCachedPassphrase() without the need of callback
// To avoid static we would need a messenger from the service back to the activity? // functions
private static HashMap<Long, String> mPassphraseCache = new HashMap<Long, String>(); private static HashMap<Long, String> mPassphraseCache = new HashMap<Long, String>();
/** /**
* This caches a new passphrase by sending a new command to the service. An android service is * This caches a new passphrase by sending a new command to the service. An android service is
* only run once. Thus when it is already started new commands just add new BroadcastReceivers * only run once. Thus, when the service is already started, new commands just add new events to
* for cached passphrases * the alarm manager for new passphrases to let them timeout in the future.
* *
* @param context * @param context
* @param keyId * @param keyId
@ -113,8 +113,8 @@ public class PassphraseCacheService extends Service {
/** /**
* Register BroadcastReceiver that is unregistered when service is destroyed. This * Register BroadcastReceiver that is unregistered when service is destroyed. This
* BroadcastReceiver hears on intents with ACTION_PASSPHRASE_CACHE_SERVICE to timeout * BroadcastReceiver hears on intents with ACTION_PASSPHRASE_CACHE_SERVICE to then timeout
* passphrases in memory. * specific passphrases in memory.
*/ */
private void registerReceiver() { private void registerReceiver() {
if (mIntentReceiver == null) { if (mIntentReceiver == null) {
@ -139,7 +139,7 @@ public class PassphraseCacheService extends Service {
} }
/** /**
* Build pending intent that is executed by alarm manager when one passphrase times out * Build pending intent that is executed by alarm manager to time out a specific passphrase
* *
* @param context * @param context
* @param keyId * @param keyId

View File

@ -138,7 +138,7 @@ public class EditKeyActivity extends SherlockFragmentActivity {
mActionBar = getSupportActionBar(); mActionBar = getSupportActionBar();
mActionBar.setDisplayShowTitleEnabled(true); mActionBar.setDisplayShowTitleEnabled(true);
// set actionbar without home button if called from another app // set actionbar without home button if called from another app
OtherHelper.setActionBarBackButton(this); OtherHelper.setActionBarBackButton(this);
// find views // find views