Loading java/AndroidManifest.xml +2 −2 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ <meta-data android:name="android.view.textservice.scs" android:resource="@xml/spellchecker" /> </service> <activity android:name="Settings" android:label="@string/english_ime_settings"> <activity android:name="SettingsActivity" android:label="@string/english_ime_settings"> <intent-filter> <action android:name="android.intent.action.MAIN"/> </intent-filter> Loading @@ -43,7 +43,7 @@ </intent-filter> </activity> <activity android:name="DebugSettings" android:label="@string/english_ime_debug_settings"> <activity android:name="DebugSettingsActivity" android:label="@string/english_ime_debug_settings"> <intent-filter> <action android:name="android.intent.action.MAIN"/> </intent-filter> Loading java/res/xml/method.xml +1 −1 Original line number Diff line number Diff line Loading @@ -68,7 +68,7 @@ <!-- If IME doesn't have an applicable subtype, the first subtype will be used as a default subtype.--> <input-method xmlns:android="http://schemas.android.com/apk/res/android" android:settingsActivity="com.android.inputmethod.latin.Settings" android:settingsActivity="com.android.inputmethod.latin.SettingsActivity" android:isDefault="@bool/im_is_default"> <subtype android:icon="@drawable/ic_subtype_keyboard" android:label="@string/subtype_en_US" Loading java/src/com/android/inputmethod/latin/DebugSettings.java +8 −5 Original line number Diff line number Diff line Loading @@ -16,18 +16,19 @@ package com.android.inputmethod.latin; import android.content.Context; import android.content.SharedPreferences; import android.content.pm.PackageInfo; import android.content.pm.PackageManager.NameNotFoundException; import android.os.Bundle; import android.os.Process; import android.preference.CheckBoxPreference; import android.preference.PreferenceActivity; import android.preference.PreferenceFragment; import android.util.Log; import com.android.inputmethod.keyboard.KeyboardSwitcher; public class DebugSettings extends PreferenceActivity public class DebugSettings extends PreferenceFragment implements SharedPreferences.OnSharedPreferenceChangeListener { private static final String TAG = DebugSettings.class.getSimpleName(); Loading @@ -38,7 +39,7 @@ public class DebugSettings extends PreferenceActivity private CheckBoxPreference mDebugMode; @Override protected void onCreate(Bundle icicle) { public void onCreate(Bundle icicle) { super.onCreate(icicle); addPreferencesFromResource(R.xml.prefs_for_debug); SharedPreferences prefs = getPreferenceManager().getSharedPreferences(); Loading @@ -50,7 +51,7 @@ public class DebugSettings extends PreferenceActivity } @Override protected void onStop() { public void onStop() { super.onStop(); if (mServiceNeedsRestart) Process.killProcess(Process.myPid()); } Loading @@ -76,7 +77,9 @@ public class DebugSettings extends PreferenceActivity boolean isDebugMode = mDebugMode.isChecked(); String version = ""; try { PackageInfo info = getPackageManager().getPackageInfo(getPackageName(), 0); final Context context = getActivity(); final String packageName = context.getPackageName(); PackageInfo info = context.getPackageManager().getPackageInfo(packageName, 0); version = "Version " + info.versionName; } catch (NameNotFoundException e) { Log.e(TAG, "Could not find version info."); Loading java/src/com/android/inputmethod/latin/DebugSettingsActivity.java 0 → 100644 +36 −0 Original line number Diff line number Diff line /* * 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; import android.content.Intent; import android.os.Bundle; import android.preference.PreferenceActivity; public class DebugSettingsActivity extends PreferenceActivity { @Override public Intent getIntent() { final Intent modIntent = new Intent(super.getIntent()); modIntent.putExtra(EXTRA_SHOW_FRAGMENT, DebugSettings.class.getName()); return modIntent; } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setTitle(R.string.english_ime_debug_settings); } } java/src/com/android/inputmethod/latin/LatinIME.java +4 −4 Original line number Diff line number Diff line Loading @@ -2226,15 +2226,15 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen } } protected void launchSettings() { launchSettingsClass(Settings.class); private void launchSettings() { launchSettingsClass(SettingsActivity.class); } public void launchDebugSettings() { launchSettingsClass(DebugSettings.class); launchSettingsClass(DebugSettingsActivity.class); } protected void launchSettingsClass(Class<? extends PreferenceActivity> settingsClass) { private void launchSettingsClass(Class<? extends PreferenceActivity> settingsClass) { handleClose(); Intent intent = new Intent(); intent.setClass(LatinIME.this, settingsClass); Loading Loading
java/AndroidManifest.xml +2 −2 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ <meta-data android:name="android.view.textservice.scs" android:resource="@xml/spellchecker" /> </service> <activity android:name="Settings" android:label="@string/english_ime_settings"> <activity android:name="SettingsActivity" android:label="@string/english_ime_settings"> <intent-filter> <action android:name="android.intent.action.MAIN"/> </intent-filter> Loading @@ -43,7 +43,7 @@ </intent-filter> </activity> <activity android:name="DebugSettings" android:label="@string/english_ime_debug_settings"> <activity android:name="DebugSettingsActivity" android:label="@string/english_ime_debug_settings"> <intent-filter> <action android:name="android.intent.action.MAIN"/> </intent-filter> Loading
java/res/xml/method.xml +1 −1 Original line number Diff line number Diff line Loading @@ -68,7 +68,7 @@ <!-- If IME doesn't have an applicable subtype, the first subtype will be used as a default subtype.--> <input-method xmlns:android="http://schemas.android.com/apk/res/android" android:settingsActivity="com.android.inputmethod.latin.Settings" android:settingsActivity="com.android.inputmethod.latin.SettingsActivity" android:isDefault="@bool/im_is_default"> <subtype android:icon="@drawable/ic_subtype_keyboard" android:label="@string/subtype_en_US" Loading
java/src/com/android/inputmethod/latin/DebugSettings.java +8 −5 Original line number Diff line number Diff line Loading @@ -16,18 +16,19 @@ package com.android.inputmethod.latin; import android.content.Context; import android.content.SharedPreferences; import android.content.pm.PackageInfo; import android.content.pm.PackageManager.NameNotFoundException; import android.os.Bundle; import android.os.Process; import android.preference.CheckBoxPreference; import android.preference.PreferenceActivity; import android.preference.PreferenceFragment; import android.util.Log; import com.android.inputmethod.keyboard.KeyboardSwitcher; public class DebugSettings extends PreferenceActivity public class DebugSettings extends PreferenceFragment implements SharedPreferences.OnSharedPreferenceChangeListener { private static final String TAG = DebugSettings.class.getSimpleName(); Loading @@ -38,7 +39,7 @@ public class DebugSettings extends PreferenceActivity private CheckBoxPreference mDebugMode; @Override protected void onCreate(Bundle icicle) { public void onCreate(Bundle icicle) { super.onCreate(icicle); addPreferencesFromResource(R.xml.prefs_for_debug); SharedPreferences prefs = getPreferenceManager().getSharedPreferences(); Loading @@ -50,7 +51,7 @@ public class DebugSettings extends PreferenceActivity } @Override protected void onStop() { public void onStop() { super.onStop(); if (mServiceNeedsRestart) Process.killProcess(Process.myPid()); } Loading @@ -76,7 +77,9 @@ public class DebugSettings extends PreferenceActivity boolean isDebugMode = mDebugMode.isChecked(); String version = ""; try { PackageInfo info = getPackageManager().getPackageInfo(getPackageName(), 0); final Context context = getActivity(); final String packageName = context.getPackageName(); PackageInfo info = context.getPackageManager().getPackageInfo(packageName, 0); version = "Version " + info.versionName; } catch (NameNotFoundException e) { Log.e(TAG, "Could not find version info."); Loading
java/src/com/android/inputmethod/latin/DebugSettingsActivity.java 0 → 100644 +36 −0 Original line number Diff line number Diff line /* * 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; import android.content.Intent; import android.os.Bundle; import android.preference.PreferenceActivity; public class DebugSettingsActivity extends PreferenceActivity { @Override public Intent getIntent() { final Intent modIntent = new Intent(super.getIntent()); modIntent.putExtra(EXTRA_SHOW_FRAGMENT, DebugSettings.class.getName()); return modIntent; } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setTitle(R.string.english_ime_debug_settings); } }
java/src/com/android/inputmethod/latin/LatinIME.java +4 −4 Original line number Diff line number Diff line Loading @@ -2226,15 +2226,15 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen } } protected void launchSettings() { launchSettingsClass(Settings.class); private void launchSettings() { launchSettingsClass(SettingsActivity.class); } public void launchDebugSettings() { launchSettingsClass(DebugSettings.class); launchSettingsClass(DebugSettingsActivity.class); } protected void launchSettingsClass(Class<? extends PreferenceActivity> settingsClass) { private void launchSettingsClass(Class<? extends PreferenceActivity> settingsClass) { handleClose(); Intent intent = new Intent(); intent.setClass(LatinIME.this, settingsClass); Loading