aboutsummaryrefslogtreecommitdiffstats
path: root/tools/dicttool/src
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-10-30 17:32:06 +0900
committerJean Chalard <jchalard@google.com>2012-10-30 17:44:39 +0900
commite44358d2eb94a8678aece7a5eb0ac388fdf40184 (patch)
tree7a830cbe6141ed3306afd8ca1ecc673503c1d565 /tools/dicttool/src
parentc7318bbc0b47662799d2f7a01e5b53edb43ebf2a (diff)
downloadlatinime-e44358d2eb94a8678aece7a5eb0ac388fdf40184.tar.gz
latinime-e44358d2eb94a8678aece7a5eb0ac388fdf40184.tar.xz
latinime-e44358d2eb94a8678aece7a5eb0ac388fdf40184.zip
Add an empty crypt command to aosp dicttool
This also makes the AdditionalCommandList useless, so let's remove it Bug: 7388852 Change-Id: I308f54ca6f778afe01c1233801a9cc22ebb3d1e9
Diffstat (limited to 'tools/dicttool/src')
-rw-r--r--tools/dicttool/src/com/android/inputmethod/latin/dicttool/AdditionalCommandList.java22
-rw-r--r--tools/dicttool/src/com/android/inputmethod/latin/dicttool/CommandList.java2
-rw-r--r--tools/dicttool/src/com/android/inputmethod/latin/dicttool/Crypt.java32
-rw-r--r--tools/dicttool/src/com/android/inputmethod/latin/dicttool/Dicttool.java1
4 files changed, 33 insertions, 24 deletions
diff --git a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/AdditionalCommandList.java b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/AdditionalCommandList.java
deleted file mode 100644
index 8d4eb751b..000000000
--- a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/AdditionalCommandList.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/**
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
-
-package com.android.inputmethod.latin.dicttool;
-
-public class AdditionalCommandList {
- public static void populate() {
- }
-}
diff --git a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/CommandList.java b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/CommandList.java
index 889dde685..66f871c10 100644
--- a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/CommandList.java
+++ b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/CommandList.java
@@ -22,6 +22,8 @@ public class CommandList {
Dicttool.addCommand("diff", Diff.class);
Dicttool.addCommand("compress", Compress.Compressor.class);
Dicttool.addCommand("uncompress", Compress.Uncompressor.class);
+ Dicttool.addCommand("encrypt", Crypt.Encrypter.class);
+ Dicttool.addCommand("decrypt", Crypt.Decrypter.class);
Dicttool.addCommand("makedict", Makedict.class);
}
}
diff --git a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Crypt.java b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Crypt.java
index 10a7301d7..036b617ef 100644
--- a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Crypt.java
+++ b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Crypt.java
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (C) 2012 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
@@ -29,4 +29,34 @@ public class Crypt {
// Decryption is not supported
return in;
}
+
+ static public class Encrypter extends Dicttool.Command {
+ public static final String COMMAND = "encrypt";
+
+ public Encrypter() {
+ }
+
+ public String getHelp() {
+ return COMMAND + " <src_filename> <dst_filename>: Encrypts a file";
+ }
+
+ public void run() {
+ throw new UnsupportedOperationException();
+ }
+ }
+
+ static public class Decrypter extends Dicttool.Command {
+ public static final String COMMAND = "decrypt";
+
+ public Decrypter() {
+ }
+
+ public String getHelp() {
+ return COMMAND + " <src_filename> <dst_filename>: Decrypts a file";
+ }
+
+ public void run() {
+ throw new UnsupportedOperationException();
+ }
+ }
}
diff --git a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Dicttool.java b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Dicttool.java
index 75ce104e0..7b311c3ec 100644
--- a/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Dicttool.java
+++ b/tools/dicttool/src/com/android/inputmethod/latin/dicttool/Dicttool.java
@@ -33,7 +33,6 @@ public class Dicttool {
new HashMap<String, Class<? extends Command>>();
static {
CommandList.populate();
- AdditionalCommandList.populate();
}
public static void addCommand(final String commandName, final Class<? extends Command> cls) {
sCommands.put(commandName, cls);