From a4e0b6efdd9ab266683da8d28362266b314fd92f Mon Sep 17 00:00:00 2001 From: Sandeep Siddhartha Date: Tue, 16 Sep 2014 14:56:34 -0700 Subject: Add Accounts & privacy settings in LatinIME Also start showing the logging preference on this screen too. This settings screen will be the container for all account management, sync and privacy related settings Bug: 17464068 Change-Id: Ie0806f6e8a542e9dea2834445ff7b38805207bda --- .../android/inputmethod/latin/settings/SubScreenFragment.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'java/src/com/android/inputmethod/latin/settings/SubScreenFragment.java') diff --git a/java/src/com/android/inputmethod/latin/settings/SubScreenFragment.java b/java/src/com/android/inputmethod/latin/settings/SubScreenFragment.java index ca5b395ce..240f8f89b 100644 --- a/java/src/com/android/inputmethod/latin/settings/SubScreenFragment.java +++ b/java/src/com/android/inputmethod/latin/settings/SubScreenFragment.java @@ -20,6 +20,7 @@ import android.app.backup.BackupManager; import android.content.Context; import android.content.SharedPreferences; import android.content.SharedPreferences.OnSharedPreferenceChangeListener; +import android.content.res.Resources; import android.os.Bundle; import android.preference.ListPreference; import android.preference.Preference; @@ -79,6 +80,16 @@ abstract class SubScreenFragment extends PreferenceFragment return getPreferenceManager().getSharedPreferences(); } + /** + * Gets the application name to display on the UI. + */ + final String getApplicationName() { + final Context context = getActivity(); + final Resources res = getResources(); + final int applicationLabelRes = context.getApplicationInfo().labelRes; + return res.getString(applicationLabelRes); + } + @Override public void addPreferencesFromResource(final int preferencesResId) { super.addPreferencesFromResource(preferencesResId); -- cgit v1.2.3-83-g751a