Show "up navigate" icon in input method subtype enabler

Since API 16 (and API 14 with support library) and later, we started
supporting "up navigation" model.
http://developer.android.com/training/implementing-navigation/ancestral.html

As a part of Settings app and a part of an IME's settings activity,
the input method subtype enabler should have a "up navigate icon on
its action bar.

Bug: 16595009
Change-Id: Iaaadd970395b9c9254ab60b2e8fee22dffb8c7f6
diff --git a/src/com/android/settings/inputmethod/InputMethodAndSubtypeEnablerActivity.java b/src/com/android/settings/inputmethod/InputMethodAndSubtypeEnablerActivity.java
index b664540..bafae2b 100644
--- a/src/com/android/settings/inputmethod/InputMethodAndSubtypeEnablerActivity.java
+++ b/src/com/android/settings/inputmethod/InputMethodAndSubtypeEnablerActivity.java
@@ -15,7 +15,9 @@
  */
 package com.android.settings.inputmethod;
 
+import android.app.ActionBar;
 import android.content.Intent;
+import android.os.Bundle;
 
 import com.android.settings.SettingsActivity;
 
@@ -23,6 +25,22 @@
     private static final String FRAGMENT_NAME = InputMethodAndSubtypeEnabler.class.getName();
 
     @Override
+    protected void onCreate(final Bundle savedState) {
+        super.onCreate(savedState);
+        final ActionBar actionBar = getActionBar();
+        if (actionBar != null) {
+            actionBar.setDisplayHomeAsUpEnabled(true);
+            actionBar.setHomeButtonEnabled(true);
+        }
+    }
+
+    @Override
+    public boolean onNavigateUp() {
+        finish();
+        return true;
+    }
+
+    @Override
     public Intent getIntent() {
         final Intent modIntent = new Intent(super.getIntent());
         if (!modIntent.hasExtra(EXTRA_SHOW_FRAGMENT)) {