Fix crash on notification cancel.

This commit is contained in:
Brian Pellin committed 2015-05-17 15:30:49 -05:00
1 parent 4529c1751d
commit bf6fc2c204
1 file changed
+7 -1
+7 -1
View File
@@ -1,4 +1,5 @@
/*
*
* Copyright 2009-2015 Brian Pellin.
*
* This file is part of KeePassDroid.
@@ -214,7 +215,12 @@ public class EntryActivity extends LockCloseHideActivity {
}
if ( mNM != null ) {
mNM.cancelAll();
try {
mNM.cancelAll();
} catch (SecurityException e) {
// Some android devices give a SecurityException when trying to cancel notifications without the WAKE_LOCK permission,
// we'll ignore these.
}
}
super.onDestroy();