Use InputMethodSettingsActivity

Bug: 4979539
Change-Id: Ib721814bfe80822ded7b0d801f6bc0c854588da4
diff --git a/java/AndroidManifest.xml b/java/AndroidManifest.xml
index 5746639..cb0a9a2 100644
--- a/java/AndroidManifest.xml
+++ b/java/AndroidManifest.xml
@@ -21,7 +21,7 @@
             <meta-data android:name="android.view.im" android:resource="@xml/method" />
         </service>
 
-        <activity android:name="SettingsActivity" android:label="@string/english_ime_settings">
+        <activity android:name="Settings" android:label="@string/english_ime_settings">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN"/>
             </intent-filter>
diff --git a/java/res/xml/method.xml b/java/res/xml/method.xml
index 43e72ce..7aaf57b 100644
--- a/java/res/xml/method.xml
+++ b/java/res/xml/method.xml
@@ -28,7 +28,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.SettingsActivity"
+        android:settingsActivity="com.android.inputmethod.latin.Settings"
         android:isDefault="@bool/im_is_default">
     <subtype android:icon="@drawable/ic_subtype_keyboard"
             android:label="@string/subtype_mode_en_US_keyboard"
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 30eb83c..c41ff0e 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -2029,7 +2029,7 @@
     }
 
     protected void launchSettings() {
-        launchSettings(SettingsActivity.class);
+        launchSettings(Settings.class);
     }
 
     public void launchDebugSettings() {
diff --git a/java/src/com/android/inputmethod/latin/Settings.java b/java/src/com/android/inputmethod/latin/Settings.java
index 9b81997..33e9bc3 100644
--- a/java/src/com/android/inputmethod/latin/Settings.java
+++ b/java/src/com/android/inputmethod/latin/Settings.java
@@ -21,7 +21,7 @@
 import com.android.inputmethod.compat.InputMethodServiceCompatWrapper;
 import com.android.inputmethod.deprecated.VoiceProxy;
 import com.android.inputmethod.compat.VibratorCompatWrapper;
-import com.android.inputmethodcommon.InputMethodSettingsFragment;
+import com.android.inputmethodcommon.InputMethodSettingsActivity;
 
 import android.app.Activity;
 import android.app.AlertDialog;
@@ -38,7 +38,6 @@
 import android.preference.ListPreference;
 import android.preference.Preference;
 import android.preference.Preference.OnPreferenceClickListener;
-import android.preference.PreferenceActivity;
 import android.preference.PreferenceGroup;
 import android.preference.PreferenceScreen;
 import android.speech.SpeechRecognizer;
@@ -50,7 +49,7 @@
 import java.util.Arrays;
 import java.util.Locale;
 
-public class Settings extends InputMethodSettingsFragment
+public class Settings extends InputMethodSettingsActivity
         implements SharedPreferences.OnSharedPreferenceChangeListener,
         DialogInterface.OnDismissListener, OnPreferenceClickListener {
     private static final String TAG = "Settings";
diff --git a/java/src/com/android/inputmethod/latin/SettingsActivity.java b/java/src/com/android/inputmethod/latin/SettingsActivity.java
deleted file mode 100644
index 7a6c2ef..0000000
--- a/java/src/com/android/inputmethod/latin/SettingsActivity.java
+++ /dev/null
@@ -1,30 +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;
-
-import android.content.Intent;
-import android.preference.PreferenceActivity;
-
-public class SettingsActivity extends PreferenceActivity {
-    @Override
-    public Intent getIntent() {
-        final Intent modIntent = new Intent(super.getIntent());
-        modIntent.putExtra(EXTRA_SHOW_FRAGMENT, Settings.class.getName());
-        modIntent.putExtra(EXTRA_NO_HEADERS, true);
-        return modIntent;
-    }
-}