From fb74ab15c1343084740d65ef8744cad33a678e82 Mon Sep 17 00:00:00 2001 From: Ken Wakasa Date: Sat, 16 Aug 2014 02:34:53 +0900 Subject: 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 --- .../inputmethod/compat/AppWorkaroundsHelper.java | 29 ++++++++++ .../dictionarypack/DictionaryPackConstants.java | 65 ++++++++++++++++++++++ .../dictionarypack/MetadataUriGetter.java | 33 +++++++++++ .../inputmethod/latin/SpecialKeyDetector.java | 43 ++++++++++++++ .../inputmethod/latin/about/AboutPreferences.java | 28 ++++++++++ .../inputmethod/latin/define/DebugFlags.java | 31 +++++++++++ .../inputmethod/latin/define/JniLibName.java | 25 +++++++++ .../inputmethod/latin/define/ProductionFlags.java | 52 +++++++++++++++++ .../ContextualDictionaryUpdater.java | 37 ++++++++++++ .../PersonalizationDictionaryUpdater.java | 52 +++++++++++++++++ .../settings/AdditionalFeaturesSettingUtils.java | 43 ++++++++++++++ .../inputmethod/latin/utils/FeedbackUtils.java | 37 ++++++++++++ .../inputmethod/latin/utils/FileTransforms.java | 38 +++++++++++++ .../latin/utils/MetadataFileUriGetter.java | 38 +++++++++++++ .../inputmethod/latin/utils/StatsUtils.java | 34 +++++++++++ 15 files changed, 585 insertions(+) create mode 100644 java-overridable/src/com/android/inputmethod/compat/AppWorkaroundsHelper.java create mode 100644 java-overridable/src/com/android/inputmethod/dictionarypack/DictionaryPackConstants.java create mode 100644 java-overridable/src/com/android/inputmethod/dictionarypack/MetadataUriGetter.java create mode 100644 java-overridable/src/com/android/inputmethod/latin/SpecialKeyDetector.java create mode 100644 java-overridable/src/com/android/inputmethod/latin/about/AboutPreferences.java create mode 100644 java-overridable/src/com/android/inputmethod/latin/define/DebugFlags.java create mode 100644 java-overridable/src/com/android/inputmethod/latin/define/JniLibName.java create mode 100644 java-overridable/src/com/android/inputmethod/latin/define/ProductionFlags.java create mode 100644 java-overridable/src/com/android/inputmethod/latin/personalization/ContextualDictionaryUpdater.java create mode 100644 java-overridable/src/com/android/inputmethod/latin/personalization/PersonalizationDictionaryUpdater.java create mode 100644 java-overridable/src/com/android/inputmethod/latin/settings/AdditionalFeaturesSettingUtils.java create mode 100644 java-overridable/src/com/android/inputmethod/latin/utils/FeedbackUtils.java create mode 100644 java-overridable/src/com/android/inputmethod/latin/utils/FileTransforms.java create mode 100644 java-overridable/src/com/android/inputmethod/latin/utils/MetadataFileUriGetter.java create mode 100644 java-overridable/src/com/android/inputmethod/latin/utils/StatsUtils.java (limited to 'java-overridable/src/com/android/inputmethod') diff --git a/java-overridable/src/com/android/inputmethod/compat/AppWorkaroundsHelper.java b/java-overridable/src/com/android/inputmethod/compat/AppWorkaroundsHelper.java new file mode 100644 index 000000000..21535e421 --- /dev/null +++ b/java-overridable/src/com/android/inputmethod/compat/AppWorkaroundsHelper.java @@ -0,0 +1,29 @@ +/* + * 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-overridable/src/com/android/inputmethod/dictionarypack/DictionaryPackConstants.java b/java-overridable/src/com/android/inputmethod/dictionarypack/DictionaryPackConstants.java new file mode 100644 index 000000000..df0e3f0e1 --- /dev/null +++ b/java-overridable/src/com/android/inputmethod/dictionarypack/DictionaryPackConstants.java @@ -0,0 +1,65 @@ +/* + * 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-overridable/src/com/android/inputmethod/dictionarypack/MetadataUriGetter.java b/java-overridable/src/com/android/inputmethod/dictionarypack/MetadataUriGetter.java new file mode 100644 index 000000000..ed817658e --- /dev/null +++ b/java-overridable/src/com/android/inputmethod/dictionarypack/MetadataUriGetter.java @@ -0,0 +1,33 @@ +/* + * 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-overridable/src/com/android/inputmethod/latin/SpecialKeyDetector.java b/java-overridable/src/com/android/inputmethod/latin/SpecialKeyDetector.java new file mode 100644 index 000000000..27b2f5012 --- /dev/null +++ b/java-overridable/src/com/android/inputmethod/latin/SpecialKeyDetector.java @@ -0,0 +1,43 @@ +/* + * 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-overridable/src/com/android/inputmethod/latin/about/AboutPreferences.java b/java-overridable/src/com/android/inputmethod/latin/about/AboutPreferences.java new file mode 100644 index 000000000..f60b189f1 --- /dev/null +++ b/java-overridable/src/com/android/inputmethod/latin/about/AboutPreferences.java @@ -0,0 +1,28 @@ +/* + * 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-overridable/src/com/android/inputmethod/latin/define/DebugFlags.java b/java-overridable/src/com/android/inputmethod/latin/define/DebugFlags.java new file mode 100644 index 000000000..c509e8322 --- /dev/null +++ b/java-overridable/src/com/android/inputmethod/latin/define/DebugFlags.java @@ -0,0 +1,31 @@ +/* + * 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-overridable/src/com/android/inputmethod/latin/define/JniLibName.java b/java-overridable/src/com/android/inputmethod/latin/define/JniLibName.java new file mode 100644 index 000000000..abfc36d39 --- /dev/null +++ b/java-overridable/src/com/android/inputmethod/latin/define/JniLibName.java @@ -0,0 +1,25 @@ +/* + * 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-overridable/src/com/android/inputmethod/latin/define/ProductionFlags.java b/java-overridable/src/com/android/inputmethod/latin/define/ProductionFlags.java new file mode 100644 index 000000000..461c226a1 --- /dev/null +++ b/java-overridable/src/com/android/inputmethod/latin/define/ProductionFlags.java @@ -0,0 +1,52 @@ +/* + * 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-overridable/src/com/android/inputmethod/latin/personalization/ContextualDictionaryUpdater.java b/java-overridable/src/com/android/inputmethod/latin/personalization/ContextualDictionaryUpdater.java new file mode 100644 index 000000000..7dc120e06 --- /dev/null +++ b/java-overridable/src/com/android/inputmethod/latin/personalization/ContextualDictionaryUpdater.java @@ -0,0 +1,37 @@ +/* + * 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-overridable/src/com/android/inputmethod/latin/personalization/PersonalizationDictionaryUpdater.java b/java-overridable/src/com/android/inputmethod/latin/personalization/PersonalizationDictionaryUpdater.java new file mode 100644 index 000000000..c97a0d232 --- /dev/null +++ b/java-overridable/src/com/android/inputmethod/latin/personalization/PersonalizationDictionaryUpdater.java @@ -0,0 +1,52 @@ +/* + * 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-overridable/src/com/android/inputmethod/latin/settings/AdditionalFeaturesSettingUtils.java b/java-overridable/src/com/android/inputmethod/latin/settings/AdditionalFeaturesSettingUtils.java new file mode 100644 index 000000000..6543003e8 --- /dev/null +++ b/java-overridable/src/com/android/inputmethod/latin/settings/AdditionalFeaturesSettingUtils.java @@ -0,0 +1,43 @@ +/* + * 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-overridable/src/com/android/inputmethod/latin/utils/FeedbackUtils.java b/java-overridable/src/com/android/inputmethod/latin/utils/FeedbackUtils.java new file mode 100644 index 000000000..0aed41ee4 --- /dev/null +++ b/java-overridable/src/com/android/inputmethod/latin/utils/FeedbackUtils.java @@ -0,0 +1,37 @@ +/* + * 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-overridable/src/com/android/inputmethod/latin/utils/FileTransforms.java b/java-overridable/src/com/android/inputmethod/latin/utils/FileTransforms.java new file mode 100644 index 000000000..9f4584ec9 --- /dev/null +++ b/java-overridable/src/com/android/inputmethod/latin/utils/FileTransforms.java @@ -0,0 +1,38 @@ +/* + * 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-overridable/src/com/android/inputmethod/latin/utils/MetadataFileUriGetter.java b/java-overridable/src/com/android/inputmethod/latin/utils/MetadataFileUriGetter.java new file mode 100644 index 000000000..9ad319da6 --- /dev/null +++ b/java-overridable/src/com/android/inputmethod/latin/utils/MetadataFileUriGetter.java @@ -0,0 +1,38 @@ +/* + * 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-overridable/src/com/android/inputmethod/latin/utils/StatsUtils.java b/java-overridable/src/com/android/inputmethod/latin/utils/StatsUtils.java new file mode 100644 index 000000000..79c19d077 --- /dev/null +++ b/java-overridable/src/com/android/inputmethod/latin/utils/StatsUtils.java @@ -0,0 +1,34 @@ +/* + * 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() { + } +} -- cgit v1.2.3-83-g751a