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