blob: ad68f8c37d1419c90ec7045d3604e482f9b58ea0 [file] [log] [blame]
Tadashi G. Takaokac206d042012-04-13 19:53:44 +09001/*
2 * Copyright (C) 2012 The Android Open Source Project
3 *
Tadashi G. Takaoka8aa99632013-01-21 21:52:57 +09004 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
Tadashi G. Takaokac206d042012-04-13 19:53:44 +09007 *
Tadashi G. Takaoka8aa99632013-01-21 21:52:57 +09008 * http://www.apache.org/licenses/LICENSE-2.0
Tadashi G. Takaokac206d042012-04-13 19:53:44 +09009 *
10 * Unless required by applicable law or agreed to in writing, software
Tadashi G. Takaoka8aa99632013-01-21 21:52:57 +090011 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
Tadashi G. Takaokac206d042012-04-13 19:53:44 +090015 */
16
Ken Wakasaa7d2fc62013-07-22 12:43:37 +090017package com.android.inputmethod.latin.settings;
Tadashi G. Takaokac206d042012-04-13 19:53:44 +090018
19import android.content.Intent;
Tadashi G. Takaokac206d042012-04-13 19:53:44 +090020import android.preference.PreferenceActivity;
21
Tadashi G. Takaokaa28a05e2012-09-27 18:16:16 +090022public final class SettingsActivity extends PreferenceActivity {
Tadashi G. Takaokacbee8a32013-01-08 15:41:46 +090023 private static final String DEFAULT_FRAGMENT = SettingsFragment.class.getName();
Tadashi G. Takaokac27fe622012-04-13 16:41:24 +090024
Tadashi G. Takaokac206d042012-04-13 19:53:44 +090025 @Override
26 public Intent getIntent() {
Tadashi G. Takaokac27fe622012-04-13 16:41:24 +090027 final Intent intent = super.getIntent();
Tadashi G. Takaoka262d5bd2013-04-10 16:21:20 +090028 final String fragment = intent.getStringExtra(EXTRA_SHOW_FRAGMENT);
29 if (fragment == null) {
30 intent.putExtra(EXTRA_SHOW_FRAGMENT, DEFAULT_FRAGMENT);
31 }
Tadashi G. Takaokac27fe622012-04-13 16:41:24 +090032 intent.putExtra(EXTRA_NO_HEADERS, true);
33 return intent;
Tadashi G. Takaokac206d042012-04-13 19:53:44 +090034 }
Satoshi Kataokac5182c92013-10-02 15:39:25 +090035
36 // TODO: Uncomment the override annotation once we start using SDK version 19.
37 // @Override
38 public boolean isValidFragment(String fragmentName) {
39 return fragmentName.equals(DEFAULT_FRAGMENT);
40 }
Tadashi G. Takaokac206d042012-04-13 19:53:44 +090041}