Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c5182c9a authored by Satoshi Kataoka's avatar Satoshi Kataoka
Browse files

Correspond to the security related API change for PreferenceActivity

Bug: 10118761
Change-Id: Ia7d1c6c526dae849f447c26387e96a4fb4d6042f
parent a8b838b4
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -24,6 +24,8 @@ import android.preference.PreferenceActivity;
 * Preference screen.
 */
public final class DictionarySettingsActivity extends PreferenceActivity {
    private static final String DEFAULT_FRAGMENT = DictionarySettingsFragment.class.getName();

    @Override
    protected void onCreate(final Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
@@ -32,11 +34,17 @@ public final class DictionarySettingsActivity extends PreferenceActivity {
    @Override
    public Intent getIntent() {
        final Intent modIntent = new Intent(super.getIntent());
        modIntent.putExtra(EXTRA_SHOW_FRAGMENT, DictionarySettingsFragment.class.getName());
        modIntent.putExtra(EXTRA_SHOW_FRAGMENT, DEFAULT_FRAGMENT);
        modIntent.putExtra(EXTRA_NO_HEADERS, true);
        // Important note : the original intent should contain a String extra with the key
        // DictionarySettingsFragment.DICT_SETTINGS_FRAGMENT_CLIENT_ID_ARGUMENT so that the
        // fragment can know who the client is.
        return modIntent;
    }

    // TODO: Uncomment the override annotation once we start using SDK version 19.
    // @Override
    public boolean isValidFragment(String fragmentName) {
        return fragmentName.equals(DEFAULT_FRAGMENT);
    }
}
+6 −0
Original line number Diff line number Diff line
@@ -38,4 +38,10 @@ public final class DebugSettingsActivity extends PreferenceActivity {
        super.onCreate(savedInstanceState);
        setTitle(R.string.english_ime_debug_settings);
    }

    // TODO: Uncomment the override annotation once we start using SDK version 19.
    // @Override
    public boolean isValidFragment(String fragmentName) {
        return fragmentName.equals(DEFAULT_FRAGMENT);
    }
}
+6 −0
Original line number Diff line number Diff line
@@ -32,4 +32,10 @@ public final class SettingsActivity extends PreferenceActivity {
        intent.putExtra(EXTRA_NO_HEADERS, true);
        return intent;
    }

    // TODO: Uncomment the override annotation once we start using SDK version 19.
    // @Override
    public boolean isValidFragment(String fragmentName) {
        return fragmentName.equals(DEFAULT_FRAGMENT);
    }
}
+9 −1
Original line number Diff line number Diff line
@@ -24,6 +24,8 @@ import android.preference.PreferenceActivity;
 * Spell checker preference screen.
 */
public final class SpellCheckerSettingsActivity extends PreferenceActivity {
    private static final String DEFAULT_FRAGMENT = SpellCheckerSettingsFragment.class.getName();

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
@@ -32,8 +34,14 @@ public final class SpellCheckerSettingsActivity extends PreferenceActivity {
    @Override
    public Intent getIntent() {
        final Intent modIntent = new Intent(super.getIntent());
        modIntent.putExtra(EXTRA_SHOW_FRAGMENT, SpellCheckerSettingsFragment.class.getName());
        modIntent.putExtra(EXTRA_SHOW_FRAGMENT, DEFAULT_FRAGMENT);
        modIntent.putExtra(EXTRA_NO_HEADERS, true);
        return modIntent;
    }

    // TODO: Uncomment the override annotation once we start using SDK version 19.
    // @Override
    public boolean isValidFragment(String fragmentName) {
        return fragmentName.equals(DEFAULT_FRAGMENT);
    }
}