aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/thialfihar
diff options
context:
space:
mode:
authorMarkus Doits <markus.doits@gmail.com>2011-01-11 22:31:35 +0000
committerMarkus Doits <markus.doits@gmail.com>2011-01-11 22:31:35 +0000
commit8b352296503b555bc8d7e0fa7fff2f66ad5a8701 (patch)
tree93a1d9a3cf5455e99d0fcee85a134a8647074e3b /src/org/thialfihar
parent45e4897dc7f05f1f270f4993cc3060f654e2f3a9 (diff)
downloadopen-keychain-8b352296503b555bc8d7e0fa7fff2f66ad5a8701.tar.gz
open-keychain-8b352296503b555bc8d7e0fa7fff2f66ad5a8701.tar.bz2
open-keychain-8b352296503b555bc8d7e0fa7fff2f66ad5a8701.zip
Actually check for unknown args for function
Diffstat (limited to 'src/org/thialfihar')
-rw-r--r--src/org/thialfihar/android/apg/ApgService.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/org/thialfihar/android/apg/ApgService.java b/src/org/thialfihar/android/apg/ApgService.java
index ff2fb8ad8..a298cca8e 100644
--- a/src/org/thialfihar/android/apg/ApgService.java
+++ b/src/org/thialfihar/android/apg/ApgService.java
@@ -205,7 +205,10 @@ public class ApgService extends Service {
while (_iter.hasNext()) {
String _cur_key = _iter.next();
try {
- arg.valueOf(_cur_key);
+ arg _cur_arg = arg.valueOf(_cur_key);
+ if( !all_args.contains(_cur_arg)) {
+ pReturn.getStringArrayList(ret.WARNINGS.name()).add("Unknown argument: " + _cur_key);
+ }
} catch (Exception e) {
pReturn.getStringArrayList(ret.WARNINGS.name()).add("Unknown argument: " + _cur_key);
}