Update preference screen title.

- Add missing title to preference screen xml so that they will be used to
set the activity title when the fragment is launched.
- Also updated some incorrect preference screen titles.
- Overrides getTitle() in preference fragments that do not use the
preference screen xml.

Bug: 64564191
Test: blaze-bin/screenshots/android/i18nscreenshots/i18nscreenshots
Change-Id: Id72d5ddf18f0962bc484de8bbd847a2e55d6371e
This commit is contained in:
Doris Ling
2017-10-18 14:25:01 -07:00
parent 9d85cfe762
commit 03a3b518de
86 changed files with 838 additions and 93 deletions

View File

@@ -15,6 +15,7 @@
*/
package com.android.settings.applications;
import android.annotation.Nullable;
import android.app.Activity;
import android.content.Intent;
import android.content.res.Resources;
@@ -28,6 +29,7 @@ import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.settings.R;
import com.android.settings.SettingsActivity;
import com.android.settings.core.InstrumentedFragment;
import com.android.settings.core.InstrumentedPreferenceFragment;
import com.android.settings.password.ChooseLockSettingsHelper;
/* Class to prompt for conversion of userdata to file based encryption
@@ -44,6 +46,14 @@ public class ConvertToFbe extends InstrumentedFragment {
res.getText(R.string.convert_to_file_encryption));
}
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (InstrumentedPreferenceFragment.usePreferenceScreenTitle()) {
getActivity().setTitle(R.string.convert_to_file_encryption);
}
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {