The Android Open Source Project | afc4ab2 | 2009-03-03 19:32:34 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2008 The Android Open Source Project |
| 3 | * |
| 4 | * 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 |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * 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. |
| 15 | */ |
| 16 | |
| 17 | package com.android.settings; |
| 18 | |
Amith Yamasani | b810a0d | 2012-03-25 10:12:26 -0700 | [diff] [blame] | 19 | import com.android.internal.util.ArrayUtils; |
Gilles Debunne | cd8e524 | 2011-07-25 11:36:15 -0700 | [diff] [blame] | 20 | import com.android.settings.accounts.AccountSyncSettings; |
Adam Powell | faba7e4 | 2012-03-26 17:28:38 -0700 | [diff] [blame] | 21 | import com.android.settings.applications.ManageApplications; |
Gilles Debunne | cd8e524 | 2011-07-25 11:36:15 -0700 | [diff] [blame] | 22 | import com.android.settings.bluetooth.BluetoothEnabler; |
Jeff Sharkey | 11d3012 | 2012-03-19 16:54:07 -0700 | [diff] [blame] | 23 | import com.android.settings.deviceinfo.Memory; |
Gilles Debunne | cd8e524 | 2011-07-25 11:36:15 -0700 | [diff] [blame] | 24 | import com.android.settings.fuelgauge.PowerUsageSummary; |
| 25 | import com.android.settings.wifi.WifiEnabler; |
| 26 | |
Amith Yamasani | c9fdfa8 | 2010-12-14 14:38:16 -0800 | [diff] [blame] | 27 | import android.content.ComponentName; |
Gilles Debunne | e78c187 | 2011-06-20 15:00:07 -0700 | [diff] [blame] | 28 | import android.content.Context; |
Amith Yamasani | 379d9b0 | 2010-09-27 12:03:59 -0700 | [diff] [blame] | 29 | import android.content.Intent; |
Amith Yamasani | 5203bdf | 2010-11-04 09:59:44 -0700 | [diff] [blame] | 30 | import android.content.pm.ActivityInfo; |
| 31 | import android.content.pm.PackageManager; |
| 32 | import android.content.pm.PackageManager.NameNotFoundException; |
Dianne Hackborn | f4eb85b | 2010-10-29 16:53:04 -0700 | [diff] [blame] | 33 | import android.os.Bundle; |
Jeff Sharkey | 34e964d | 2012-04-21 15:41:48 -0700 | [diff] [blame] | 34 | import android.os.INetworkManagementService; |
| 35 | import android.os.RemoteException; |
| 36 | import android.os.ServiceManager; |
Amith Yamasani | b810a0d | 2012-03-25 10:12:26 -0700 | [diff] [blame] | 37 | import android.os.UserId; |
Amith Yamasani | a4379d6 | 2011-07-22 10:34:58 -0700 | [diff] [blame] | 38 | import android.preference.Preference; |
Amith Yamasani | 02cf71a | 2010-09-21 15:48:52 -0700 | [diff] [blame] | 39 | import android.preference.PreferenceActivity; |
Amith Yamasani | a4379d6 | 2011-07-22 10:34:58 -0700 | [diff] [blame] | 40 | import android.preference.PreferenceFragment; |
Gilles Debunne | e78c187 | 2011-06-20 15:00:07 -0700 | [diff] [blame] | 41 | import android.text.TextUtils; |
Amith Yamasani | c9fdfa8 | 2010-12-14 14:38:16 -0800 | [diff] [blame] | 42 | import android.util.Log; |
Gilles Debunne | e78c187 | 2011-06-20 15:00:07 -0700 | [diff] [blame] | 43 | import android.view.LayoutInflater; |
Amith Yamasani | c9fdfa8 | 2010-12-14 14:38:16 -0800 | [diff] [blame] | 44 | import android.view.View; |
| 45 | import android.view.View.OnClickListener; |
Gilles Debunne | e78c187 | 2011-06-20 15:00:07 -0700 | [diff] [blame] | 46 | import android.view.ViewGroup; |
| 47 | import android.widget.ArrayAdapter; |
Amith Yamasani | 9e3a470 | 2011-01-11 09:09:26 -0800 | [diff] [blame] | 48 | import android.widget.Button; |
Gilles Debunne | e78c187 | 2011-06-20 15:00:07 -0700 | [diff] [blame] | 49 | import android.widget.ImageView; |
| 50 | import android.widget.ListAdapter; |
| 51 | import android.widget.Switch; |
| 52 | import android.widget.TextView; |
The Android Open Source Project | afc4ab2 | 2009-03-03 19:32:34 -0800 | [diff] [blame] | 53 | |
Gilles Debunne | e78c187 | 2011-06-20 15:00:07 -0700 | [diff] [blame] | 54 | import java.util.ArrayList; |
Amith Yamasani | 5203bdf | 2010-11-04 09:59:44 -0700 | [diff] [blame] | 55 | import java.util.HashMap; |
Amith Yamasani | 02cf71a | 2010-09-21 15:48:52 -0700 | [diff] [blame] | 56 | import java.util.List; |
Amith Yamasani | d799347 | 2010-08-18 13:59:28 -0700 | [diff] [blame] | 57 | |
| 58 | /** |
| 59 | * Top-level settings activity to handle single pane and double pane UI layout. |
| 60 | */ |
Daisuke Miyakawa | 79c5fd9 | 2011-01-15 14:58:00 -0800 | [diff] [blame] | 61 | public class Settings extends PreferenceActivity implements ButtonBarHandler { |
Amith Yamasani | d799347 | 2010-08-18 13:59:28 -0700 | [diff] [blame] | 62 | |
Gilles Debunne | e78c187 | 2011-06-20 15:00:07 -0700 | [diff] [blame] | 63 | private static final String LOG_TAG = "Settings"; |
Amith Yamasani | 5203bdf | 2010-11-04 09:59:44 -0700 | [diff] [blame] | 64 | private static final String META_DATA_KEY_HEADER_ID = |
Gilles Debunne | e78c187 | 2011-06-20 15:00:07 -0700 | [diff] [blame] | 65 | "com.android.settings.TOP_LEVEL_HEADER_ID"; |
Amith Yamasani | 5203bdf | 2010-11-04 09:59:44 -0700 | [diff] [blame] | 66 | private static final String META_DATA_KEY_FRAGMENT_CLASS = |
Gilles Debunne | e78c187 | 2011-06-20 15:00:07 -0700 | [diff] [blame] | 67 | "com.android.settings.FRAGMENT_CLASS"; |
Amith Yamasani | c9fdfa8 | 2010-12-14 14:38:16 -0800 | [diff] [blame] | 68 | private static final String META_DATA_KEY_PARENT_TITLE = |
| 69 | "com.android.settings.PARENT_FRAGMENT_TITLE"; |
| 70 | private static final String META_DATA_KEY_PARENT_FRAGMENT_CLASS = |
| 71 | "com.android.settings.PARENT_FRAGMENT_CLASS"; |
| 72 | |
Jeff Sharkey | 54d0af5 | 2011-08-11 18:26:57 -0700 | [diff] [blame] | 73 | private static final String EXTRA_CLEAR_UI_OPTIONS = "settings:remove_ui_options"; |
Jeff Sharkey | 9fab0da | 2011-07-09 17:52:31 -0700 | [diff] [blame] | 74 | |
Amith Yamasani | c9fdfa8 | 2010-12-14 14:38:16 -0800 | [diff] [blame] | 75 | private static final String SAVE_KEY_CURRENT_HEADER = "com.android.settings.CURRENT_HEADER"; |
| 76 | private static final String SAVE_KEY_PARENT_HEADER = "com.android.settings.PARENT_HEADER"; |
Amith Yamasani | 5203bdf | 2010-11-04 09:59:44 -0700 | [diff] [blame] | 77 | |
| 78 | private String mFragmentClass; |
| 79 | private int mTopLevelHeaderId; |
Amith Yamasani | 3965ae6 | 2010-11-15 14:45:19 -0800 | [diff] [blame] | 80 | private Header mFirstHeader; |
Amith Yamasani | c9fdfa8 | 2010-12-14 14:38:16 -0800 | [diff] [blame] | 81 | private Header mCurrentHeader; |
| 82 | private Header mParentHeader; |
| 83 | private boolean mInLocalHeaderSwitch; |
Amith Yamasani | 5203bdf | 2010-11-04 09:59:44 -0700 | [diff] [blame] | 84 | |
Amith Yamasani | b810a0d | 2012-03-25 10:12:26 -0700 | [diff] [blame] | 85 | // Show only these settings for restricted users |
| 86 | private int[] SETTINGS_FOR_RESTRICTED = { |
| 87 | R.id.wifi_settings, |
| 88 | R.id.bluetooth_settings, |
| 89 | R.id.sound_settings, |
| 90 | R.id.display_settings, |
Amith Yamasani | 3deeeb7 | 2012-04-05 14:44:48 -0700 | [diff] [blame] | 91 | R.id.security_settings, |
Amith Yamasani | b810a0d | 2012-03-25 10:12:26 -0700 | [diff] [blame] | 92 | R.id.sync_settings, |
| 93 | R.id.about_settings |
| 94 | }; |
| 95 | |
Amith Yamasani | fa3eea5 | 2012-03-28 10:25:08 -0700 | [diff] [blame] | 96 | private boolean mEnableUserManagement = false; |
| 97 | |
Amith Yamasani | 02cf71a | 2010-09-21 15:48:52 -0700 | [diff] [blame] | 98 | // TODO: Update Call Settings based on airplane mode state. |
Amith Yamasani | b61cf51 | 2010-09-12 08:17:50 -0700 | [diff] [blame] | 99 | |
Amith Yamasani | 5203bdf | 2010-11-04 09:59:44 -0700 | [diff] [blame] | 100 | protected HashMap<Integer, Integer> mHeaderIndexMap = new HashMap<Integer, Integer>(); |
Gilles Debunne | e78c187 | 2011-06-20 15:00:07 -0700 | [diff] [blame] | 101 | private List<Header> mHeaders; |
Amith Yamasani | 5203bdf | 2010-11-04 09:59:44 -0700 | [diff] [blame] | 102 | |
| 103 | @Override |
| 104 | protected void onCreate(Bundle savedInstanceState) { |
Jeff Sharkey | 54d0af5 | 2011-08-11 18:26:57 -0700 | [diff] [blame] | 105 | if (getIntent().getBooleanExtra(EXTRA_CLEAR_UI_OPTIONS, false)) { |
| 106 | getWindow().setUiOptions(0); |
| 107 | } |
Jeff Sharkey | 9fab0da | 2011-07-09 17:52:31 -0700 | [diff] [blame] | 108 | |
Amith Yamasani | fa3eea5 | 2012-03-28 10:25:08 -0700 | [diff] [blame] | 109 | if (android.provider.Settings.Secure.getInt(getContentResolver(), "multiuser_enabled", -1) |
| 110 | > 0) { |
| 111 | mEnableUserManagement = true; |
| 112 | } |
| 113 | |
Amith Yamasani | 5203bdf | 2010-11-04 09:59:44 -0700 | [diff] [blame] | 114 | getMetaData(); |
Amith Yamasani | c9fdfa8 | 2010-12-14 14:38:16 -0800 | [diff] [blame] | 115 | mInLocalHeaderSwitch = true; |
Amith Yamasani | 5203bdf | 2010-11-04 09:59:44 -0700 | [diff] [blame] | 116 | super.onCreate(savedInstanceState); |
Amith Yamasani | c9fdfa8 | 2010-12-14 14:38:16 -0800 | [diff] [blame] | 117 | mInLocalHeaderSwitch = false; |
Amith Yamasani | 5203bdf | 2010-11-04 09:59:44 -0700 | [diff] [blame] | 118 | |
Gilles Debunne | 3661b62 | 2011-06-27 11:19:16 -0700 | [diff] [blame] | 119 | if (!onIsHidingHeaders() && onIsMultiPane()) { |
Amith Yamasani | 72aa19d | 2010-12-09 06:07:12 -0800 | [diff] [blame] | 120 | highlightHeader(); |
| 121 | // Force the title so that it doesn't get overridden by a direct launch of |
| 122 | // a specific settings screen. |
| 123 | setTitle(R.string.settings_label); |
| 124 | } |
Amith Yamasani | c9fdfa8 | 2010-12-14 14:38:16 -0800 | [diff] [blame] | 125 | |
| 126 | // Retrieve any saved state |
| 127 | if (savedInstanceState != null) { |
| 128 | mCurrentHeader = savedInstanceState.getParcelable(SAVE_KEY_CURRENT_HEADER); |
| 129 | mParentHeader = savedInstanceState.getParcelable(SAVE_KEY_PARENT_HEADER); |
| 130 | } |
| 131 | |
| 132 | // If the current header was saved, switch to it |
| 133 | if (savedInstanceState != null && mCurrentHeader != null) { |
| 134 | //switchToHeaderLocal(mCurrentHeader); |
| 135 | showBreadCrumbs(mCurrentHeader.title, null); |
| 136 | } |
| 137 | |
| 138 | if (mParentHeader != null) { |
| 139 | setParentTitle(mParentHeader.title, null, new OnClickListener() { |
| 140 | public void onClick(View v) { |
| 141 | switchToParent(mParentHeader.fragment); |
| 142 | } |
| 143 | }); |
| 144 | } |
Gilles Debunne | dc7101f | 2011-06-27 12:00:49 -0700 | [diff] [blame] | 145 | |
| 146 | // TODO Add support for android.R.id.home in all Setting's onOptionsItemSelected |
| 147 | // getActionBar().setDisplayOptions(ActionBar.DISPLAY_HOME_AS_UP, |
| 148 | // ActionBar.DISPLAY_HOME_AS_UP); |
Amith Yamasani | c9fdfa8 | 2010-12-14 14:38:16 -0800 | [diff] [blame] | 149 | } |
| 150 | |
| 151 | @Override |
| 152 | protected void onSaveInstanceState(Bundle outState) { |
| 153 | super.onSaveInstanceState(outState); |
| 154 | |
| 155 | // Save the current fragment, if it is the same as originally launched |
| 156 | if (mCurrentHeader != null) { |
| 157 | outState.putParcelable(SAVE_KEY_CURRENT_HEADER, mCurrentHeader); |
| 158 | } |
| 159 | if (mParentHeader != null) { |
| 160 | outState.putParcelable(SAVE_KEY_PARENT_HEADER, mParentHeader); |
| 161 | } |
| 162 | } |
| 163 | |
Gilles Debunne | e78c187 | 2011-06-20 15:00:07 -0700 | [diff] [blame] | 164 | @Override |
| 165 | public void onResume() { |
| 166 | super.onResume(); |
| 167 | |
| 168 | ListAdapter listAdapter = getListAdapter(); |
| 169 | if (listAdapter instanceof HeaderAdapter) { |
| 170 | ((HeaderAdapter) listAdapter).resume(); |
| 171 | } |
| 172 | } |
| 173 | |
| 174 | @Override |
| 175 | public void onPause() { |
| 176 | super.onPause(); |
| 177 | |
| 178 | ListAdapter listAdapter = getListAdapter(); |
| 179 | if (listAdapter instanceof HeaderAdapter) { |
| 180 | ((HeaderAdapter) listAdapter).pause(); |
| 181 | } |
| 182 | } |
| 183 | |
Amith Yamasani | c9fdfa8 | 2010-12-14 14:38:16 -0800 | [diff] [blame] | 184 | private void switchToHeaderLocal(Header header) { |
| 185 | mInLocalHeaderSwitch = true; |
| 186 | switchToHeader(header); |
| 187 | mInLocalHeaderSwitch = false; |
| 188 | } |
| 189 | |
| 190 | @Override |
| 191 | public void switchToHeader(Header header) { |
| 192 | if (!mInLocalHeaderSwitch) { |
| 193 | mCurrentHeader = null; |
| 194 | mParentHeader = null; |
| 195 | } |
| 196 | super.switchToHeader(header); |
| 197 | } |
| 198 | |
| 199 | /** |
| 200 | * Switch to parent fragment and store the grand parent's info |
Jake Hamby | 2748fc2 | 2011-01-12 15:06:28 -0800 | [diff] [blame] | 201 | * @param className name of the activity wrapper for the parent fragment. |
Amith Yamasani | c9fdfa8 | 2010-12-14 14:38:16 -0800 | [diff] [blame] | 202 | */ |
| 203 | private void switchToParent(String className) { |
| 204 | final ComponentName cn = new ComponentName(this, className); |
| 205 | try { |
| 206 | final PackageManager pm = getPackageManager(); |
| 207 | final ActivityInfo parentInfo = pm.getActivityInfo(cn, PackageManager.GET_META_DATA); |
| 208 | |
| 209 | if (parentInfo != null && parentInfo.metaData != null) { |
| 210 | String fragmentClass = parentInfo.metaData.getString(META_DATA_KEY_FRAGMENT_CLASS); |
| 211 | CharSequence fragmentTitle = parentInfo.loadLabel(pm); |
| 212 | Header parentHeader = new Header(); |
| 213 | parentHeader.fragment = fragmentClass; |
| 214 | parentHeader.title = fragmentTitle; |
| 215 | mCurrentHeader = parentHeader; |
| 216 | |
| 217 | switchToHeaderLocal(parentHeader); |
Amith Yamasani | 990fb52 | 2011-09-02 09:47:18 -0700 | [diff] [blame] | 218 | highlightHeader(); |
Amith Yamasani | c9fdfa8 | 2010-12-14 14:38:16 -0800 | [diff] [blame] | 219 | |
| 220 | mParentHeader = new Header(); |
| 221 | mParentHeader.fragment |
| 222 | = parentInfo.metaData.getString(META_DATA_KEY_PARENT_FRAGMENT_CLASS); |
| 223 | mParentHeader.title = parentInfo.metaData.getString(META_DATA_KEY_PARENT_TITLE); |
| 224 | } |
| 225 | } catch (NameNotFoundException nnfe) { |
Gilles Debunne | e78c187 | 2011-06-20 15:00:07 -0700 | [diff] [blame] | 226 | Log.w(LOG_TAG, "Could not find parent activity : " + className); |
Amith Yamasani | c9fdfa8 | 2010-12-14 14:38:16 -0800 | [diff] [blame] | 227 | } |
Amith Yamasani | 5203bdf | 2010-11-04 09:59:44 -0700 | [diff] [blame] | 228 | } |
| 229 | |
Amith Yamasani | 3965ae6 | 2010-11-15 14:45:19 -0800 | [diff] [blame] | 230 | @Override |
| 231 | public void onNewIntent(Intent intent) { |
| 232 | super.onNewIntent(intent); |
| 233 | |
| 234 | // If it is not launched from history, then reset to top-level |
| 235 | if ((intent.getFlags() & Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY) == 0 |
Gilles Debunne | 3661b62 | 2011-06-27 11:19:16 -0700 | [diff] [blame] | 236 | && mFirstHeader != null && !onIsHidingHeaders() && onIsMultiPane()) { |
Amith Yamasani | c9fdfa8 | 2010-12-14 14:38:16 -0800 | [diff] [blame] | 237 | switchToHeaderLocal(mFirstHeader); |
Amith Yamasani | 3965ae6 | 2010-11-15 14:45:19 -0800 | [diff] [blame] | 238 | } |
| 239 | } |
| 240 | |
Amith Yamasani | 5203bdf | 2010-11-04 09:59:44 -0700 | [diff] [blame] | 241 | private void highlightHeader() { |
| 242 | if (mTopLevelHeaderId != 0) { |
| 243 | Integer index = mHeaderIndexMap.get(mTopLevelHeaderId); |
| 244 | if (index != null) { |
| 245 | getListView().setItemChecked(index, true); |
Amith Yamasani | 990fb52 | 2011-09-02 09:47:18 -0700 | [diff] [blame] | 246 | getListView().smoothScrollToPosition(index); |
Amith Yamasani | 5203bdf | 2010-11-04 09:59:44 -0700 | [diff] [blame] | 247 | } |
| 248 | } |
| 249 | } |
| 250 | |
Amith Yamasani | e0e4fc2 | 2010-10-05 11:49:51 -0700 | [diff] [blame] | 251 | @Override |
| 252 | public Intent getIntent() { |
Gilles Debunne | e78c187 | 2011-06-20 15:00:07 -0700 | [diff] [blame] | 253 | Intent superIntent = super.getIntent(); |
| 254 | String startingFragment = getStartingFragmentClass(superIntent); |
Gilles Debunne | 3661b62 | 2011-06-27 11:19:16 -0700 | [diff] [blame] | 255 | // This is called from super.onCreate, isMultiPane() is not yet reliable |
| 256 | // Do not use onIsHidingHeaders either, which relies itself on this method |
| 257 | if (startingFragment != null && !onIsMultiPane()) { |
Gilles Debunne | e78c187 | 2011-06-20 15:00:07 -0700 | [diff] [blame] | 258 | Intent modIntent = new Intent(superIntent); |
Amith Yamasani | e0e4fc2 | 2010-10-05 11:49:51 -0700 | [diff] [blame] | 259 | modIntent.putExtra(EXTRA_SHOW_FRAGMENT, startingFragment); |
Gilles Debunne | e78c187 | 2011-06-20 15:00:07 -0700 | [diff] [blame] | 260 | Bundle args = superIntent.getExtras(); |
Dianne Hackborn | f4eb85b | 2010-10-29 16:53:04 -0700 | [diff] [blame] | 261 | if (args != null) { |
| 262 | args = new Bundle(args); |
| 263 | } else { |
| 264 | args = new Bundle(); |
| 265 | } |
Gilles Debunne | e78c187 | 2011-06-20 15:00:07 -0700 | [diff] [blame] | 266 | args.putParcelable("intent", superIntent); |
| 267 | modIntent.putExtra(EXTRA_SHOW_FRAGMENT_ARGUMENTS, superIntent.getExtras()); |
Amith Yamasani | e0e4fc2 | 2010-10-05 11:49:51 -0700 | [diff] [blame] | 268 | return modIntent; |
| 269 | } |
Gilles Debunne | e78c187 | 2011-06-20 15:00:07 -0700 | [diff] [blame] | 270 | return superIntent; |
Amith Yamasani | e0e4fc2 | 2010-10-05 11:49:51 -0700 | [diff] [blame] | 271 | } |
| 272 | |
Amith Yamasani | 02cf71a | 2010-09-21 15:48:52 -0700 | [diff] [blame] | 273 | /** |
Amith Yamasani | 379d9b0 | 2010-09-27 12:03:59 -0700 | [diff] [blame] | 274 | * Checks if the component name in the intent is different from the Settings class and |
| 275 | * returns the class name to load as a fragment. |
| 276 | */ |
Amith Yamasani | 5203bdf | 2010-11-04 09:59:44 -0700 | [diff] [blame] | 277 | protected String getStartingFragmentClass(Intent intent) { |
| 278 | if (mFragmentClass != null) return mFragmentClass; |
| 279 | |
Dianne Hackborn | f4eb85b | 2010-10-29 16:53:04 -0700 | [diff] [blame] | 280 | String intentClass = intent.getComponent().getClassName(); |
Amith Yamasani | 379d9b0 | 2010-09-27 12:03:59 -0700 | [diff] [blame] | 281 | if (intentClass.equals(getClass().getName())) return null; |
| 282 | |
Dianne Hackborn | ee29379 | 2010-11-01 12:32:33 -0700 | [diff] [blame] | 283 | if ("com.android.settings.ManageApplications".equals(intentClass) |
| 284 | || "com.android.settings.RunningServices".equals(intentClass) |
| 285 | || "com.android.settings.applications.StorageUse".equals(intentClass)) { |
Gilles Debunne | e78c187 | 2011-06-20 15:00:07 -0700 | [diff] [blame] | 286 | // Old names of manage apps. |
Dianne Hackborn | f4eb85b | 2010-10-29 16:53:04 -0700 | [diff] [blame] | 287 | intentClass = com.android.settings.applications.ManageApplications.class.getName(); |
| 288 | } |
| 289 | |
Amith Yamasani | 379d9b0 | 2010-09-27 12:03:59 -0700 | [diff] [blame] | 290 | return intentClass; |
| 291 | } |
| 292 | |
| 293 | /** |
| 294 | * Override initial header when an activity-alias is causing Settings to be launched |
| 295 | * for a specific fragment encoded in the android:name parameter. |
| 296 | */ |
| 297 | @Override |
| 298 | public Header onGetInitialHeader() { |
| 299 | String fragmentClass = getStartingFragmentClass(super.getIntent()); |
| 300 | if (fragmentClass != null) { |
| 301 | Header header = new Header(); |
| 302 | header.fragment = fragmentClass; |
Amith Yamasani | c9fdfa8 | 2010-12-14 14:38:16 -0800 | [diff] [blame] | 303 | header.title = getTitle(); |
Amith Yamasani | e0e4fc2 | 2010-10-05 11:49:51 -0700 | [diff] [blame] | 304 | header.fragmentArguments = getIntent().getExtras(); |
Amith Yamasani | c9fdfa8 | 2010-12-14 14:38:16 -0800 | [diff] [blame] | 305 | mCurrentHeader = header; |
Amith Yamasani | 379d9b0 | 2010-09-27 12:03:59 -0700 | [diff] [blame] | 306 | return header; |
| 307 | } |
Gilles Debunne | e78c187 | 2011-06-20 15:00:07 -0700 | [diff] [blame] | 308 | |
Gilles Debunne | b396c9b | 2011-06-22 16:07:29 -0700 | [diff] [blame] | 309 | return mFirstHeader; |
Amith Yamasani | 379d9b0 | 2010-09-27 12:03:59 -0700 | [diff] [blame] | 310 | } |
| 311 | |
Dianne Hackborn | b725818 | 2011-03-15 16:23:55 -0700 | [diff] [blame] | 312 | @Override |
Dianne Hackborn | 48147dc | 2011-03-18 12:29:41 -0700 | [diff] [blame] | 313 | public Intent onBuildStartFragmentIntent(String fragmentName, Bundle args, |
| 314 | int titleRes, int shortTitleRes) { |
| 315 | Intent intent = super.onBuildStartFragmentIntent(fragmentName, args, |
| 316 | titleRes, shortTitleRes); |
Jeff Sharkey | 9fab0da | 2011-07-09 17:52:31 -0700 | [diff] [blame] | 317 | |
Jeff Sharkey | 54d0af5 | 2011-08-11 18:26:57 -0700 | [diff] [blame] | 318 | // some fragments want to avoid split actionbar |
Gilles Debunne | 162e541 | 2011-07-11 14:13:31 -0700 | [diff] [blame] | 319 | if (DataUsageSummary.class.getName().equals(fragmentName) || |
| 320 | PowerUsageSummary.class.getName().equals(fragmentName) || |
Gilles Debunne | cd8e524 | 2011-07-25 11:36:15 -0700 | [diff] [blame] | 321 | AccountSyncSettings.class.getName().equals(fragmentName) || |
Jeff Sharkey | 11d3012 | 2012-03-19 16:54:07 -0700 | [diff] [blame] | 322 | UserDictionarySettings.class.getName().equals(fragmentName) || |
Adam Powell | faba7e4 | 2012-03-26 17:28:38 -0700 | [diff] [blame] | 323 | Memory.class.getName().equals(fragmentName) || |
Jeff Sharkey | a339cba | 2012-05-08 11:42:49 -0700 | [diff] [blame] | 324 | ManageApplications.class.getName().equals(fragmentName) || |
| 325 | WirelessSettings.class.getName().equals(fragmentName) || |
| 326 | SoundSettings.class.getName().equals(fragmentName) || |
| 327 | PrivacySettings.class.getName().equals(fragmentName)) { |
Jeff Sharkey | 54d0af5 | 2011-08-11 18:26:57 -0700 | [diff] [blame] | 328 | intent.putExtra(EXTRA_CLEAR_UI_OPTIONS, true); |
Jeff Sharkey | 9fab0da | 2011-07-09 17:52:31 -0700 | [diff] [blame] | 329 | } |
| 330 | |
Dianne Hackborn | b725818 | 2011-03-15 16:23:55 -0700 | [diff] [blame] | 331 | intent.setClass(this, SubSettings.class); |
| 332 | return intent; |
| 333 | } |
| 334 | |
Amith Yamasani | 379d9b0 | 2010-09-27 12:03:59 -0700 | [diff] [blame] | 335 | /** |
Amith Yamasani | 02cf71a | 2010-09-21 15:48:52 -0700 | [diff] [blame] | 336 | * Populate the activity with the top-level headers. |
| 337 | */ |
Amith Yamasani | d799347 | 2010-08-18 13:59:28 -0700 | [diff] [blame] | 338 | @Override |
Gilles Debunne | e78c187 | 2011-06-20 15:00:07 -0700 | [diff] [blame] | 339 | public void onBuildHeaders(List<Header> headers) { |
| 340 | loadHeadersFromResource(R.xml.settings_headers, headers); |
Amith Yamasani | d799347 | 2010-08-18 13:59:28 -0700 | [diff] [blame] | 341 | |
Gilles Debunne | e78c187 | 2011-06-20 15:00:07 -0700 | [diff] [blame] | 342 | updateHeaderList(headers); |
| 343 | |
| 344 | mHeaders = headers; |
Amith Yamasani | 02cf71a | 2010-09-21 15:48:52 -0700 | [diff] [blame] | 345 | } |
Amith Yamasani | d799347 | 2010-08-18 13:59:28 -0700 | [diff] [blame] | 346 | |
Amith Yamasani | 02cf71a | 2010-09-21 15:48:52 -0700 | [diff] [blame] | 347 | private void updateHeaderList(List<Header> target) { |
| 348 | int i = 0; |
| 349 | while (i < target.size()) { |
| 350 | Header header = target.get(i); |
Amith Yamasani | 5203bdf | 2010-11-04 09:59:44 -0700 | [diff] [blame] | 351 | // Ids are integers, so downcasting |
| 352 | int id = (int) header.id; |
Amith Yamasani | 02cf71a | 2010-09-21 15:48:52 -0700 | [diff] [blame] | 353 | if (id == R.id.dock_settings) { |
| 354 | if (!needsDockSettings()) |
| 355 | target.remove(header); |
| 356 | } else if (id == R.id.operator_settings || id == R.id.manufacturer_settings) { |
| 357 | Utils.updateHeaderToSpecificActivityFromMetaDataOrRemove(this, target, header); |
Gilles Debunne | 2454f49 | 2011-06-21 16:16:06 -0700 | [diff] [blame] | 358 | } else if (id == R.id.wifi_settings) { |
| 359 | // Remove WiFi Settings if WiFi service is not available. |
| 360 | if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_WIFI)) { |
| 361 | target.remove(header); |
| 362 | } |
Gilles Debunne | e78c187 | 2011-06-20 15:00:07 -0700 | [diff] [blame] | 363 | } else if (id == R.id.bluetooth_settings) { |
| 364 | // Remove Bluetooth Settings if Bluetooth service is not available. |
Gilles Debunne | 2454f49 | 2011-06-21 16:16:06 -0700 | [diff] [blame] | 365 | if (!getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH)) { |
Gilles Debunne | e78c187 | 2011-06-20 15:00:07 -0700 | [diff] [blame] | 366 | target.remove(header); |
| 367 | } |
Jeff Sharkey | 34e964d | 2012-04-21 15:41:48 -0700 | [diff] [blame] | 368 | } else if (id == R.id.data_usage_settings) { |
| 369 | // Remove data usage when kernel module not enabled |
| 370 | final INetworkManagementService netManager = INetworkManagementService.Stub |
| 371 | .asInterface(ServiceManager.getService(Context.NETWORKMANAGEMENT_SERVICE)); |
| 372 | try { |
| 373 | if (!netManager.isBandwidthControlEnabled()) { |
| 374 | target.remove(header); |
| 375 | } |
| 376 | } catch (RemoteException e) { |
| 377 | // ignored |
| 378 | } |
Amith Yamasani | b810a0d | 2012-03-25 10:12:26 -0700 | [diff] [blame] | 379 | } else if (id == R.id.user_settings) { |
Amith Yamasani | fa3eea5 | 2012-03-28 10:25:08 -0700 | [diff] [blame] | 380 | if (!mEnableUserManagement |
| 381 | || !UserId.MU_ENABLED || UserId.myUserId() != 0 |
Amith Yamasani | b810a0d | 2012-03-25 10:12:26 -0700 | [diff] [blame] | 382 | || !getResources().getBoolean(R.bool.enable_user_management) |
| 383 | || Utils.isMonkeyRunning()) { |
| 384 | target.remove(header); |
| 385 | } |
| 386 | } |
| 387 | if (UserId.MU_ENABLED && UserId.myUserId() != 0 |
| 388 | && !ArrayUtils.contains(SETTINGS_FOR_RESTRICTED, id)) { |
| 389 | target.remove(header); |
Amith Yamasani | d799347 | 2010-08-18 13:59:28 -0700 | [diff] [blame] | 390 | } |
Gilles Debunne | e78c187 | 2011-06-20 15:00:07 -0700 | [diff] [blame] | 391 | |
Amith Yamasani | 5203bdf | 2010-11-04 09:59:44 -0700 | [diff] [blame] | 392 | // Increment if the current one wasn't removed by the Utils code. |
| 393 | if (target.get(i) == header) { |
Amith Yamasani | 3965ae6 | 2010-11-15 14:45:19 -0800 | [diff] [blame] | 394 | // Hold on to the first header, when we need to reset to the top-level |
Gilles Debunne | b396c9b | 2011-06-22 16:07:29 -0700 | [diff] [blame] | 395 | if (mFirstHeader == null && |
| 396 | HeaderAdapter.getHeaderType(header) != HeaderAdapter.HEADER_TYPE_CATEGORY) { |
| 397 | mFirstHeader = header; |
| 398 | } |
Amith Yamasani | 5203bdf | 2010-11-04 09:59:44 -0700 | [diff] [blame] | 399 | mHeaderIndexMap.put(id, i); |
Amith Yamasani | 02cf71a | 2010-09-21 15:48:52 -0700 | [diff] [blame] | 400 | i++; |
Amith Yamasani | 5203bdf | 2010-11-04 09:59:44 -0700 | [diff] [blame] | 401 | } |
Amith Yamasani | d799347 | 2010-08-18 13:59:28 -0700 | [diff] [blame] | 402 | } |
| 403 | } |
| 404 | |
Amith Yamasani | 02cf71a | 2010-09-21 15:48:52 -0700 | [diff] [blame] | 405 | private boolean needsDockSettings() { |
| 406 | return getResources().getBoolean(R.bool.has_dock_settings); |
Amith Yamasani | b61cf51 | 2010-09-12 08:17:50 -0700 | [diff] [blame] | 407 | } |
Amith Yamasani | 5203bdf | 2010-11-04 09:59:44 -0700 | [diff] [blame] | 408 | |
| 409 | private void getMetaData() { |
| 410 | try { |
| 411 | ActivityInfo ai = getPackageManager().getActivityInfo(getComponentName(), |
| 412 | PackageManager.GET_META_DATA); |
| 413 | if (ai == null || ai.metaData == null) return; |
| 414 | mTopLevelHeaderId = ai.metaData.getInt(META_DATA_KEY_HEADER_ID); |
| 415 | mFragmentClass = ai.metaData.getString(META_DATA_KEY_FRAGMENT_CLASS); |
Amith Yamasani | c9fdfa8 | 2010-12-14 14:38:16 -0800 | [diff] [blame] | 416 | |
| 417 | // Check if it has a parent specified and create a Header object |
| 418 | final int parentHeaderTitleRes = ai.metaData.getInt(META_DATA_KEY_PARENT_TITLE); |
| 419 | String parentFragmentClass = ai.metaData.getString(META_DATA_KEY_PARENT_FRAGMENT_CLASS); |
| 420 | if (parentFragmentClass != null) { |
| 421 | mParentHeader = new Header(); |
| 422 | mParentHeader.fragment = parentFragmentClass; |
| 423 | if (parentHeaderTitleRes != 0) { |
| 424 | mParentHeader.title = getResources().getString(parentHeaderTitleRes); |
| 425 | } |
| 426 | } |
Amith Yamasani | 5203bdf | 2010-11-04 09:59:44 -0700 | [diff] [blame] | 427 | } catch (NameNotFoundException nnfe) { |
Gilles Debunne | e78c187 | 2011-06-20 15:00:07 -0700 | [diff] [blame] | 428 | // No recovery |
Amith Yamasani | 5203bdf | 2010-11-04 09:59:44 -0700 | [diff] [blame] | 429 | } |
| 430 | } |
| 431 | |
Amith Yamasani | 9e3a470 | 2011-01-11 09:09:26 -0800 | [diff] [blame] | 432 | @Override |
| 433 | public boolean hasNextButton() { |
| 434 | return super.hasNextButton(); |
| 435 | } |
| 436 | |
| 437 | @Override |
| 438 | public Button getNextButton() { |
| 439 | return super.getNextButton(); |
| 440 | } |
| 441 | |
Gilles Debunne | e78c187 | 2011-06-20 15:00:07 -0700 | [diff] [blame] | 442 | private static class HeaderAdapter extends ArrayAdapter<Header> { |
| 443 | static final int HEADER_TYPE_CATEGORY = 0; |
| 444 | static final int HEADER_TYPE_NORMAL = 1; |
| 445 | static final int HEADER_TYPE_SWITCH = 2; |
| 446 | private static final int HEADER_TYPE_COUNT = HEADER_TYPE_SWITCH + 1; |
| 447 | |
| 448 | private final WifiEnabler mWifiEnabler; |
| 449 | private final BluetoothEnabler mBluetoothEnabler; |
| 450 | |
| 451 | private static class HeaderViewHolder { |
| 452 | ImageView icon; |
| 453 | TextView title; |
| 454 | TextView summary; |
| 455 | Switch switch_; |
| 456 | } |
| 457 | |
| 458 | private LayoutInflater mInflater; |
| 459 | |
| 460 | static int getHeaderType(Header header) { |
| 461 | if (header.fragment == null && header.intent == null) { |
| 462 | return HEADER_TYPE_CATEGORY; |
| 463 | } else if (header.id == R.id.wifi_settings || header.id == R.id.bluetooth_settings) { |
| 464 | return HEADER_TYPE_SWITCH; |
| 465 | } else { |
| 466 | return HEADER_TYPE_NORMAL; |
| 467 | } |
| 468 | } |
| 469 | |
| 470 | @Override |
| 471 | public int getItemViewType(int position) { |
| 472 | Header header = getItem(position); |
| 473 | return getHeaderType(header); |
| 474 | } |
| 475 | |
| 476 | @Override |
| 477 | public boolean areAllItemsEnabled() { |
| 478 | return false; // because of categories |
| 479 | } |
| 480 | |
| 481 | @Override |
| 482 | public boolean isEnabled(int position) { |
| 483 | return getItemViewType(position) != HEADER_TYPE_CATEGORY; |
| 484 | } |
| 485 | |
| 486 | @Override |
| 487 | public int getViewTypeCount() { |
| 488 | return HEADER_TYPE_COUNT; |
| 489 | } |
| 490 | |
| 491 | @Override |
| 492 | public boolean hasStableIds() { |
| 493 | return true; |
| 494 | } |
| 495 | |
| 496 | public HeaderAdapter(Context context, List<Header> objects) { |
| 497 | super(context, 0, objects); |
| 498 | mInflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); |
| 499 | |
Gilles Debunne | b396c9b | 2011-06-22 16:07:29 -0700 | [diff] [blame] | 500 | // Temp Switches provided as placeholder until the adapter replaces these with actual |
Gilles Debunne | e78c187 | 2011-06-20 15:00:07 -0700 | [diff] [blame] | 501 | // Switches inflated from their layouts. Must be done before adapter is set in super |
| 502 | mWifiEnabler = new WifiEnabler(context, new Switch(context)); |
| 503 | mBluetoothEnabler = new BluetoothEnabler(context, new Switch(context)); |
| 504 | } |
| 505 | |
| 506 | @Override |
| 507 | public View getView(int position, View convertView, ViewGroup parent) { |
| 508 | HeaderViewHolder holder; |
| 509 | Header header = getItem(position); |
| 510 | int headerType = getHeaderType(header); |
| 511 | View view = null; |
| 512 | |
| 513 | if (convertView == null) { |
| 514 | holder = new HeaderViewHolder(); |
| 515 | switch (headerType) { |
| 516 | case HEADER_TYPE_CATEGORY: |
Gilles Debunne | b396c9b | 2011-06-22 16:07:29 -0700 | [diff] [blame] | 517 | view = new TextView(getContext(), null, |
| 518 | android.R.attr.listSeparatorTextViewStyle); |
Gilles Debunne | e78c187 | 2011-06-20 15:00:07 -0700 | [diff] [blame] | 519 | holder.title = (TextView) view; |
| 520 | break; |
| 521 | |
| 522 | case HEADER_TYPE_SWITCH: |
Gilles Debunne | b396c9b | 2011-06-22 16:07:29 -0700 | [diff] [blame] | 523 | view = mInflater.inflate(R.layout.preference_header_switch_item, parent, |
| 524 | false); |
Gilles Debunne | e78c187 | 2011-06-20 15:00:07 -0700 | [diff] [blame] | 525 | holder.icon = (ImageView) view.findViewById(R.id.icon); |
Gilles Debunne | b396c9b | 2011-06-22 16:07:29 -0700 | [diff] [blame] | 526 | holder.title = (TextView) |
| 527 | view.findViewById(com.android.internal.R.id.title); |
| 528 | holder.summary = (TextView) |
| 529 | view.findViewById(com.android.internal.R.id.summary); |
Gilles Debunne | e78c187 | 2011-06-20 15:00:07 -0700 | [diff] [blame] | 530 | holder.switch_ = (Switch) view.findViewById(R.id.switchWidget); |
| 531 | break; |
| 532 | |
| 533 | case HEADER_TYPE_NORMAL: |
Gilles Debunne | b396c9b | 2011-06-22 16:07:29 -0700 | [diff] [blame] | 534 | view = mInflater.inflate( |
| 535 | com.android.internal.R.layout.preference_header_item, parent, |
| 536 | false); |
Gilles Debunne | e78c187 | 2011-06-20 15:00:07 -0700 | [diff] [blame] | 537 | holder.icon = (ImageView) view.findViewById(com.android.internal.R.id.icon); |
Gilles Debunne | b396c9b | 2011-06-22 16:07:29 -0700 | [diff] [blame] | 538 | holder.title = (TextView) |
| 539 | view.findViewById(com.android.internal.R.id.title); |
| 540 | holder.summary = (TextView) |
| 541 | view.findViewById(com.android.internal.R.id.summary); |
Gilles Debunne | e78c187 | 2011-06-20 15:00:07 -0700 | [diff] [blame] | 542 | break; |
| 543 | } |
| 544 | view.setTag(holder); |
| 545 | } else { |
| 546 | view = convertView; |
| 547 | holder = (HeaderViewHolder) view.getTag(); |
| 548 | } |
| 549 | |
| 550 | // All view fields must be updated every time, because the view may be recycled |
| 551 | switch (headerType) { |
| 552 | case HEADER_TYPE_CATEGORY: |
| 553 | holder.title.setText(header.getTitle(getContext().getResources())); |
| 554 | break; |
| 555 | |
| 556 | case HEADER_TYPE_SWITCH: |
| 557 | // Would need a different treatment if the main menu had more switches |
| 558 | if (header.id == R.id.wifi_settings) { |
| 559 | mWifiEnabler.setSwitch(holder.switch_); |
| 560 | } else { |
| 561 | mBluetoothEnabler.setSwitch(holder.switch_); |
| 562 | } |
| 563 | // No break, fall through on purpose to update common fields |
| 564 | |
| 565 | //$FALL-THROUGH$ |
| 566 | case HEADER_TYPE_NORMAL: |
| 567 | holder.icon.setImageResource(header.iconRes); |
| 568 | holder.title.setText(header.getTitle(getContext().getResources())); |
| 569 | CharSequence summary = header.getSummary(getContext().getResources()); |
| 570 | if (!TextUtils.isEmpty(summary)) { |
| 571 | holder.summary.setVisibility(View.VISIBLE); |
| 572 | holder.summary.setText(summary); |
| 573 | } else { |
| 574 | holder.summary.setVisibility(View.GONE); |
| 575 | } |
| 576 | break; |
| 577 | } |
| 578 | |
| 579 | return view; |
| 580 | } |
| 581 | |
| 582 | public void resume() { |
| 583 | mWifiEnabler.resume(); |
| 584 | mBluetoothEnabler.resume(); |
| 585 | } |
| 586 | |
| 587 | public void pause() { |
| 588 | mWifiEnabler.pause(); |
| 589 | mBluetoothEnabler.pause(); |
| 590 | } |
| 591 | } |
| 592 | |
| 593 | @Override |
Amith Yamasani | a4379d6 | 2011-07-22 10:34:58 -0700 | [diff] [blame] | 594 | public boolean onPreferenceStartFragment(PreferenceFragment caller, Preference pref) { |
| 595 | // Override the fragment title for Wallpaper settings |
Amith Yamasani | dfb6543 | 2011-11-29 16:38:14 -0800 | [diff] [blame] | 596 | int titleRes = pref.getTitleRes(); |
Amith Yamasani | a4379d6 | 2011-07-22 10:34:58 -0700 | [diff] [blame] | 597 | if (pref.getFragment().equals(WallpaperTypeSettings.class.getName())) { |
Amith Yamasani | dfb6543 | 2011-11-29 16:38:14 -0800 | [diff] [blame] | 598 | titleRes = R.string.wallpaper_settings_fragment_title; |
Amith Yamasani | a4379d6 | 2011-07-22 10:34:58 -0700 | [diff] [blame] | 599 | } |
Jean Chalard | 7dabe45 | 2012-05-10 18:08:07 +0900 | [diff] [blame^] | 600 | startPreferencePanel(pref.getFragment(), pref.getExtras(), titleRes, pref.getTitle(), |
| 601 | null, 0); |
Amith Yamasani | a4379d6 | 2011-07-22 10:34:58 -0700 | [diff] [blame] | 602 | return true; |
| 603 | } |
| 604 | |
| 605 | @Override |
Gilles Debunne | e78c187 | 2011-06-20 15:00:07 -0700 | [diff] [blame] | 606 | public void setListAdapter(ListAdapter adapter) { |
| 607 | if (mHeaders == null) { |
| 608 | mHeaders = new ArrayList<Header>(); |
| 609 | // When the saved state provides the list of headers, onBuildHeaders is not called |
| 610 | // Copy the list of Headers from the adapter, preserving their order |
| 611 | for (int i = 0; i < adapter.getCount(); i++) { |
| 612 | mHeaders.add((Header) adapter.getItem(i)); |
| 613 | } |
| 614 | } |
| 615 | |
| 616 | // Ignore the adapter provided by PreferenceActivity and substitute ours instead |
| 617 | super.setListAdapter(new HeaderAdapter(this, mHeaders)); |
| 618 | } |
| 619 | |
Amith Yamasani | 5203bdf | 2010-11-04 09:59:44 -0700 | [diff] [blame] | 620 | /* |
| 621 | * Settings subclasses for launching independently. |
| 622 | */ |
Gilles Debunne | e78c187 | 2011-06-20 15:00:07 -0700 | [diff] [blame] | 623 | public static class BluetoothSettingsActivity extends Settings { /* empty */ } |
| 624 | public static class WirelessSettingsActivity extends Settings { /* empty */ } |
| 625 | public static class TetherSettingsActivity extends Settings { /* empty */ } |
| 626 | public static class VpnSettingsActivity extends Settings { /* empty */ } |
| 627 | public static class DateTimeSettingsActivity extends Settings { /* empty */ } |
| 628 | public static class StorageSettingsActivity extends Settings { /* empty */ } |
| 629 | public static class WifiSettingsActivity extends Settings { /* empty */ } |
repo sync | b98463f | 2011-06-30 10:58:43 -0700 | [diff] [blame] | 630 | public static class WifiP2pSettingsActivity extends Settings { /* empty */ } |
Gilles Debunne | e78c187 | 2011-06-20 15:00:07 -0700 | [diff] [blame] | 631 | public static class InputMethodAndLanguageSettingsActivity extends Settings { /* empty */ } |
Jeff Brown | e46c5f3 | 2012-04-05 11:42:18 -0700 | [diff] [blame] | 632 | public static class KeyboardLayoutPickerActivity extends Settings { /* empty */ } |
Gilles Debunne | e78c187 | 2011-06-20 15:00:07 -0700 | [diff] [blame] | 633 | public static class InputMethodAndSubtypeEnablerActivity extends Settings { /* empty */ } |
satok | e077d2b | 2011-07-25 09:38:11 +0900 | [diff] [blame] | 634 | public static class SpellCheckersSettingsActivity extends Settings { /* empty */ } |
Gilles Debunne | e78c187 | 2011-06-20 15:00:07 -0700 | [diff] [blame] | 635 | public static class LocalePickerActivity extends Settings { /* empty */ } |
| 636 | public static class UserDictionarySettingsActivity extends Settings { /* empty */ } |
| 637 | public static class SoundSettingsActivity extends Settings { /* empty */ } |
| 638 | public static class DisplaySettingsActivity extends Settings { /* empty */ } |
| 639 | public static class DeviceInfoSettingsActivity extends Settings { /* empty */ } |
| 640 | public static class ApplicationSettingsActivity extends Settings { /* empty */ } |
| 641 | public static class ManageApplicationsActivity extends Settings { /* empty */ } |
| 642 | public static class StorageUseActivity extends Settings { /* empty */ } |
| 643 | public static class DevelopmentSettingsActivity extends Settings { /* empty */ } |
| 644 | public static class AccessibilitySettingsActivity extends Settings { /* empty */ } |
| 645 | public static class SecuritySettingsActivity extends Settings { /* empty */ } |
Gilles Debunne | a6a8a14 | 2011-06-09 11:56:17 -0700 | [diff] [blame] | 646 | public static class LocationSettingsActivity extends Settings { /* empty */ } |
Gilles Debunne | e78c187 | 2011-06-20 15:00:07 -0700 | [diff] [blame] | 647 | public static class PrivacySettingsActivity extends Settings { /* empty */ } |
| 648 | public static class DockSettingsActivity extends Settings { /* empty */ } |
| 649 | public static class RunningServicesActivity extends Settings { /* empty */ } |
| 650 | public static class ManageAccountsSettingsActivity extends Settings { /* empty */ } |
| 651 | public static class PowerUsageSummaryActivity extends Settings { /* empty */ } |
| 652 | public static class AccountSyncSettingsActivity extends Settings { /* empty */ } |
| 653 | public static class AccountSyncSettingsInAddAccountActivity extends Settings { /* empty */ } |
| 654 | public static class CryptKeeperSettingsActivity extends Settings { /* empty */ } |
| 655 | public static class DeviceAdminSettingsActivity extends Settings { /* empty */ } |
| 656 | public static class DataUsageSummaryActivity extends Settings { /* empty */ } |
Gilles Debunne | ab189bd | 2011-07-06 13:10:16 -0700 | [diff] [blame] | 657 | public static class AdvancedWifiSettingsActivity extends Settings { /* empty */ } |
Gilles Debunne | ab189bd | 2011-07-06 13:10:16 -0700 | [diff] [blame] | 658 | public static class TextToSpeechSettingsActivity extends Settings { /* empty */ } |
Jeff Hamilton | 3d670de | 2011-09-21 16:44:36 -0500 | [diff] [blame] | 659 | public static class AndroidBeamSettingsActivity extends Settings { /* empty */ } |
The Android Open Source Project | afc4ab2 | 2009-03-03 19:32:34 -0800 | [diff] [blame] | 660 | } |