public void clearUserColor(final long userId) { if (userId < 0) return; mUserColors.remove(userId); final SharedPreferences.Editor editor = mColorPreferences.edit(); editor.remove(Long.toString(userId)); editor.apply(); }
/** Called when one specific passphrase for keyId timed out. */ private void removeTimeoutedPassphrase(long keyId) { CachedPassphrase cPass = mPassphraseCache.get(keyId); if (cPass != null) { if (cPass.mPassphrase != null) { // clean internal char[] from memory! cPass.mPassphrase.removeFromMemory(); } // remove passphrase object mPassphraseCache.remove(keyId); } Log.d( Constants.TAG, "PassphraseCacheService Timeout of keyId " + keyId + ", removed from memory!"); updateService(); }