diff options
author | 2014-08-16 02:34:53 +0900 | |
---|---|---|
committer | 2014-08-16 03:37:54 +0900 | |
commit | fb74ab15c1343084740d65ef8744cad33a678e82 (patch) | |
tree | 8ada6232999c648986f24383c4a2b9c4af8026ed /java/src | |
parent | 3dbc3ece2614cb9d694e2f1d9607accd5eac7fc4 (diff) | |
download | latinime-fb74ab15c1343084740d65ef8744cad33a678e82.tar.gz latinime-fb74ab15c1343084740d65ef8744cad33a678e82.tar.xz latinime-fb74ab15c1343084740d65ef8744cad33a678e82.zip |
Abolish source code overlay and inroduce overridable src dir
This should make IDEs happy with appropriate source code directory
selection.
bug: 16829244
Change-Id: Ic734bd4d20aa050c688a3158b1a382ae0ac18991
Diffstat (limited to 'java/src')
15 files changed, 0 insertions, 585 deletions
diff --git a/java/src/com/android/inputmethod/compat/AppWorkaroundsHelper.java b/java/src/com/android/inputmethod/compat/AppWorkaroundsHelper.java deleted file mode 100644 index 21535e421..000000000 --- a/java/src/com/android/inputmethod/compat/AppWorkaroundsHelper.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2013 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.compat; - -import android.content.pm.PackageInfo; - -public class AppWorkaroundsHelper { - private AppWorkaroundsHelper() { - // This helper class is not publicly instantiable. - } - - public static boolean evaluateIsBrokenByRecorrection(final PackageInfo info) { - return false; - } -} diff --git a/java/src/com/android/inputmethod/dictionarypack/DictionaryPackConstants.java b/java/src/com/android/inputmethod/dictionarypack/DictionaryPackConstants.java deleted file mode 100644 index df0e3f0e1..000000000 --- a/java/src/com/android/inputmethod/dictionarypack/DictionaryPackConstants.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (C) 2013 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.dictionarypack; - -/** - * A class to group constants for dictionary pack usage. - * - * This class only defines constants. It should not make any references to outside code as far as - * possible, as it's used to separate cleanly the keyboard code from the dictionary pack code; this - * is needed in particular to cleanly compile regression tests. - */ -public class DictionaryPackConstants { - /** - * The root domain for the dictionary pack, upon which authorities and actions will append - * their own distinctive strings. - */ - private static final String DICTIONARY_DOMAIN = "com.android.inputmethod.dictionarypack.aosp"; - - /** - * Authority for the ContentProvider protocol. - */ - // TODO: find some way to factorize this string with the one in the resources - public static final String AUTHORITY = DICTIONARY_DOMAIN; - - /** - * The action of the intent for publishing that new dictionary data is available. - */ - // TODO: make this different across different packages. A suggested course of action is - // to use the package name inside this string. - // NOTE: The appended string should be uppercase like all other actions, but it's not for - // historical reasons. - public static final String NEW_DICTIONARY_INTENT_ACTION = DICTIONARY_DOMAIN + ".newdict"; - - /** - * The action of the intent sent by the dictionary pack to ask for a client to make - * itself known. This is used when the settings activity is brought up for a client the - * dictionary pack does not know about. - */ - public static final String UNKNOWN_DICTIONARY_PROVIDER_CLIENT = DICTIONARY_DOMAIN - + ".UNKNOWN_CLIENT"; - - // In the above intents, the name of the string extra that contains the name of the client - // we want information about. - public static final String DICTIONARY_PROVIDER_CLIENT_EXTRA = "client"; - - /** - * The action of the intent to tell the dictionary provider to update now. - */ - public static final String UPDATE_NOW_INTENT_ACTION = DICTIONARY_DOMAIN - + ".UPDATE_NOW"; -} diff --git a/java/src/com/android/inputmethod/dictionarypack/MetadataUriGetter.java b/java/src/com/android/inputmethod/dictionarypack/MetadataUriGetter.java deleted file mode 100644 index ed817658e..000000000 --- a/java/src/com/android/inputmethod/dictionarypack/MetadataUriGetter.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (C) 2013 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.dictionarypack; - -import android.content.Context; - -/** - * Helper to get the metadata URI from its base URI and the additional ID, if any. - */ -public class MetadataUriGetter { - private MetadataUriGetter() { - // This helper class is not instantiable. - } - - public static String getUri(final Context context, final String baseUri, - final String additionalId) { - return baseUri; - } -} diff --git a/java/src/com/android/inputmethod/latin/SpecialKeyDetector.java b/java/src/com/android/inputmethod/latin/SpecialKeyDetector.java deleted file mode 100644 index 27b2f5012..000000000 --- a/java/src/com/android/inputmethod/latin/SpecialKeyDetector.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (C) 2014, 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; - -import android.content.Context; -import android.view.KeyEvent; - -final class SpecialKeyDetector { - /** - * Special physical key detector - * @param context a context of this detector. - */ - public SpecialKeyDetector(final Context context) { - } - - /** - * Record a down key event. - * @param keyEvent a down key event. - */ - public void onKeyDown(final KeyEvent keyEvent) { - } - - /** - * Record an up key event. - * @param keyEvent an up key event. - */ - public void onKeyUp(final KeyEvent keyEvent) { - } -} diff --git a/java/src/com/android/inputmethod/latin/about/AboutPreferences.java b/java/src/com/android/inputmethod/latin/about/AboutPreferences.java deleted file mode 100644 index f60b189f1..000000000 --- a/java/src/com/android/inputmethod/latin/about/AboutPreferences.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (C) 2013 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.about; - -import android.app.Fragment; - -/** - * Dummy class of AboutPreferences. Never use this. - */ -public final class AboutPreferences extends Fragment { - private AboutPreferences() { - // Prevents this from being instantiated - } -} diff --git a/java/src/com/android/inputmethod/latin/define/DebugFlags.java b/java/src/com/android/inputmethod/latin/define/DebugFlags.java deleted file mode 100644 index c509e8322..000000000 --- a/java/src/com/android/inputmethod/latin/define/DebugFlags.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2014 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.define; - -import android.content.SharedPreferences; - -public final class DebugFlags { - public static final boolean DEBUG_ENABLED = false; - - private DebugFlags() { - // This class is not publicly instantiable. - } - - @SuppressWarnings("unused") - public static void init(final SharedPreferences prefs) { - } -} diff --git a/java/src/com/android/inputmethod/latin/define/JniLibName.java b/java/src/com/android/inputmethod/latin/define/JniLibName.java deleted file mode 100644 index abfc36d39..000000000 --- a/java/src/com/android/inputmethod/latin/define/JniLibName.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (C) 2011 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.define; - -public final class JniLibName { - private JniLibName() { - // This class is not publicly instantiable. - } - - public static final String JNI_LIB_NAME = "jni_latinime"; -} diff --git a/java/src/com/android/inputmethod/latin/define/ProductionFlags.java b/java/src/com/android/inputmethod/latin/define/ProductionFlags.java deleted file mode 100644 index 461c226a1..000000000 --- a/java/src/com/android/inputmethod/latin/define/ProductionFlags.java +++ /dev/null @@ -1,52 +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.define; - -public final class ProductionFlags { - private ProductionFlags() { - // This class is not publicly instantiable. - } - - public static final boolean IS_HARDWARE_KEYBOARD_SUPPORTED = false; - - /** - * When true, enable {@link InputMethodService#onUpdateCursorAnchorInfo} callback via - * {@link InputConnection#requestCursorAnchorInfo}. This flag has no effect in API Level 20 - * and prior. In general, this callback provides more detailed positional information, - * even though an explicit support is required by the editor. - */ - public static final boolean ENABLE_CURSOR_ANCHOR_INFO_CALLBACK = true; - - /** - * When true, enable {@link InputMethodService#onUpdateCursor} callback via - * {@link InputConnection#requestCursorAnchorInfo}. Although this callback has been available - * since API Level 3, the callback has never been used until API Level 20. Thus it may or may - * not work well as expected. Should rely on {@link InputMethodService#onUpdateCursorAnchorInfo} - * whenever possible since it is supposed to be more reliable and accurate. - */ - public static final boolean ENABLE_CURSOR_RECT_CALLBACK = false; - - /** - * Include all suggestions from all dictionaries in {@link SuggestedWords#mRawSuggestions}. - */ - public static final boolean INCLUDE_RAW_SUGGESTIONS = false; - - /** - * When false, the metrics logging is not yet ready to be enabled. - */ - public static final boolean IS_METRICS_LOGGING_SUPPORTED = false; -} diff --git a/java/src/com/android/inputmethod/latin/personalization/ContextualDictionaryUpdater.java b/java/src/com/android/inputmethod/latin/personalization/ContextualDictionaryUpdater.java deleted file mode 100644 index 7dc120e06..000000000 --- a/java/src/com/android/inputmethod/latin/personalization/ContextualDictionaryUpdater.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2014 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.personalization; - -import android.content.Context; - -import com.android.inputmethod.latin.DictionaryFacilitator; - -public class ContextualDictionaryUpdater { - public ContextualDictionaryUpdater(final Context context, - final DictionaryFacilitator dictionaryFacilitator, - final Runnable onUpdateRunnable) { - } - - public void onLoadSettings(final boolean usePersonalizedDicts) { - } - - public void onStartInputView(final String packageName) { - } - - public void onDestroy() { - } -} diff --git a/java/src/com/android/inputmethod/latin/personalization/PersonalizationDictionaryUpdater.java b/java/src/com/android/inputmethod/latin/personalization/PersonalizationDictionaryUpdater.java deleted file mode 100644 index c97a0d232..000000000 --- a/java/src/com/android/inputmethod/latin/personalization/PersonalizationDictionaryUpdater.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (C) 2014 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.personalization; - -import java.util.Locale; - -import android.content.Context; - -import com.android.inputmethod.latin.DictionaryFacilitator; - -public class PersonalizationDictionaryUpdater { - final Context mContext; - final DictionaryFacilitator mDictionaryFacilitator; - boolean mDictCleared = false; - - public PersonalizationDictionaryUpdater(final Context context, - final DictionaryFacilitator dictionaryFacilitator) { - mContext = context; - mDictionaryFacilitator = dictionaryFacilitator; - } - - public Locale getLocale() { - return null; - } - - public void onLoadSettings(final boolean usePersonalizedDicts, - final boolean isSystemLocaleSameAsLocaleOfAllEnabledSubtypesOfEnabledImes) { - if (!mDictCleared) { - // Clear and never update the personalization dictionary. - PersonalizationHelper.removeAllPersonalizationDictionaries(mContext); - mDictionaryFacilitator.clearPersonalizationDictionary(); - mDictCleared = true; - } - } - - public void onDestroy() { - } -} diff --git a/java/src/com/android/inputmethod/latin/settings/AdditionalFeaturesSettingUtils.java b/java/src/com/android/inputmethod/latin/settings/AdditionalFeaturesSettingUtils.java deleted file mode 100644 index 6543003e8..000000000 --- a/java/src/com/android/inputmethod/latin/settings/AdditionalFeaturesSettingUtils.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (C) 2013 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.settings; - -import android.content.Context; -import android.content.SharedPreferences; - -import com.android.inputmethodcommon.InputMethodSettingsFragment; - -/** - * Utility class for managing additional features settings. - */ -public class AdditionalFeaturesSettingUtils { - public static final int ADDITIONAL_FEATURES_SETTINGS_SIZE = 0; - - private AdditionalFeaturesSettingUtils() { - // This utility class is not publicly instantiable. - } - - public static void addAdditionalFeaturesPreferences( - final Context context, final InputMethodSettingsFragment settingsFragment) { - // do nothing. - } - - public static void readAdditionalFeaturesPreferencesIntoArray( - final SharedPreferences prefs, final int[] additionalFeaturesPreferences) { - // do nothing. - } -} diff --git a/java/src/com/android/inputmethod/latin/utils/FeedbackUtils.java b/java/src/com/android/inputmethod/latin/utils/FeedbackUtils.java deleted file mode 100644 index 0aed41ee4..000000000 --- a/java/src/com/android/inputmethod/latin/utils/FeedbackUtils.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (C) 2013 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.utils; - -import android.content.Context; -import android.content.Intent; - -public class FeedbackUtils { - public static boolean isHelpAndFeedbackFormSupported() { - return false; - } - - public static void showHelpAndFeedbackForm(Context context) { - } - - public static int getAboutKeyboardTitleResId() { - return 0; - } - - public static Intent getAboutKeyboardIntent(Context context) { - return null; - } -} diff --git a/java/src/com/android/inputmethod/latin/utils/FileTransforms.java b/java/src/com/android/inputmethod/latin/utils/FileTransforms.java deleted file mode 100644 index 9f4584ec9..000000000 --- a/java/src/com/android/inputmethod/latin/utils/FileTransforms.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2011 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.utils; - -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.util.zip.GZIPInputStream; - -public final class FileTransforms { - public static OutputStream getCryptedStream(OutputStream out) { - // Crypt the stream. - return out; - } - - public static InputStream getDecryptedStream(InputStream in) { - // Decrypt the stream. - return in; - } - - public static InputStream getUncompressedStream(InputStream in) throws IOException { - return new GZIPInputStream(in); - } -} diff --git a/java/src/com/android/inputmethod/latin/utils/MetadataFileUriGetter.java b/java/src/com/android/inputmethod/latin/utils/MetadataFileUriGetter.java deleted file mode 100644 index 9ad319da6..000000000 --- a/java/src/com/android/inputmethod/latin/utils/MetadataFileUriGetter.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2013 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.utils; - -import com.android.inputmethod.latin.R; - -import android.content.Context; - -/** - * Helper class to get the metadata URI and the additional ID. - */ -public class MetadataFileUriGetter { - private MetadataFileUriGetter() { - // This helper class is not instantiable. - } - - public static String getMetadataUri(final Context context) { - return context.getString(R.string.dictionary_pack_metadata_uri); - } - - public static String getMetadataAdditionalId(final Context context) { - return ""; - } -} diff --git a/java/src/com/android/inputmethod/latin/utils/StatsUtils.java b/java/src/com/android/inputmethod/latin/utils/StatsUtils.java deleted file mode 100644 index 79c19d077..000000000 --- a/java/src/com/android/inputmethod/latin/utils/StatsUtils.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (C) 2014 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.utils; - -import android.content.Context; -import com.android.inputmethod.latin.settings.SettingsValues; - -public final class StatsUtils { - public static void init(final Context context) { - } - - public static void onCreate(final SettingsValues settingsValues) { - } - - public static void onLoadSettings(final SettingsValues settingsValues) { - } - - public static void onDestroy() { - } -} |