Evan Millar | 7911ff5 | 2009-07-21 15:55:18 -0700 | [diff] [blame] | 1 | /* |
Evan Millar | 5f4af70 | 2009-08-11 11:12:00 -0700 | [diff] [blame] | 2 | * Copyright (C) 2009 The Android Open Source Project |
Evan Millar | 7911ff5 | 2009-07-21 15:55:18 -0700 | [diff] [blame] | 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.contacts; |
| 18 | |
| 19 | import com.android.contacts.ScrollingTabWidget.OnTabSelectionChangedListener; |
Evan Millar | 5f4af70 | 2009-08-11 11:12:00 -0700 | [diff] [blame] | 20 | import com.android.contacts.model.ContactsSource; |
| 21 | import com.android.contacts.model.Sources; |
Dmitri Plotnikov | 3d53ce2 | 2009-09-02 08:44:32 -0700 | [diff] [blame] | 22 | import com.android.contacts.util.NotifyingAsyncQueryHandler; |
Evan Millar | 1ea3bf7 | 2009-07-30 13:46:19 -0700 | [diff] [blame] | 23 | import com.android.internal.widget.ContactHeaderWidget; |
Evan Millar | 7911ff5 | 2009-07-21 15:55:18 -0700 | [diff] [blame] | 24 | |
| 25 | import android.app.Activity; |
| 26 | import android.content.ContentUris; |
Evan Millar | 7911ff5 | 2009-07-21 15:55:18 -0700 | [diff] [blame] | 27 | import android.content.Context; |
Evan Millar | 5f4af70 | 2009-08-11 11:12:00 -0700 | [diff] [blame] | 28 | import android.content.Entity; |
| 29 | import android.content.EntityIterator; |
Evan Millar | 7911ff5 | 2009-07-21 15:55:18 -0700 | [diff] [blame] | 30 | import android.content.Intent; |
Evan Millar | 5f4af70 | 2009-08-11 11:12:00 -0700 | [diff] [blame] | 31 | import android.content.pm.PackageManager; |
Evan Millar | 7911ff5 | 2009-07-21 15:55:18 -0700 | [diff] [blame] | 32 | import android.database.Cursor; |
Evan Millar | 7911ff5 | 2009-07-21 15:55:18 -0700 | [diff] [blame] | 33 | import android.graphics.drawable.Drawable; |
| 34 | import android.net.Uri; |
| 35 | import android.os.Bundle; |
Evan Millar | 5f4af70 | 2009-08-11 11:12:00 -0700 | [diff] [blame] | 36 | import android.os.RemoteException; |
Dmitri Plotnikov | 3d53ce2 | 2009-09-02 08:44:32 -0700 | [diff] [blame] | 37 | import android.provider.ContactsContract; |
Jeff Sharkey | 0b4ad00 | 2009-08-23 14:16:27 -0700 | [diff] [blame] | 38 | import android.provider.ContactsContract.Contacts; |
Evan Millar | 7911ff5 | 2009-07-21 15:55:18 -0700 | [diff] [blame] | 39 | import android.provider.ContactsContract.RawContacts; |
Evan Millar | 7911ff5 | 2009-07-21 15:55:18 -0700 | [diff] [blame] | 40 | import android.util.Log; |
| 41 | import android.util.SparseArray; |
| 42 | import android.view.LayoutInflater; |
| 43 | import android.view.View; |
Jeff Sharkey | 14f61ab | 2009-08-05 21:02:37 -0700 | [diff] [blame] | 44 | import android.view.ViewGroup; |
Evan Millar | 7911ff5 | 2009-07-21 15:55:18 -0700 | [diff] [blame] | 45 | import android.view.Window; |
Evan Millar | 7911ff5 | 2009-07-21 15:55:18 -0700 | [diff] [blame] | 46 | import android.widget.ImageView; |
| 47 | import android.widget.TextView; |
| 48 | |
Dmitri Plotnikov | 3d53ce2 | 2009-09-02 08:44:32 -0700 | [diff] [blame] | 49 | import java.util.ArrayList; |
| 50 | |
Evan Millar | 7911ff5 | 2009-07-21 15:55:18 -0700 | [diff] [blame] | 51 | /** |
| 52 | * The base Activity class for viewing and editing a contact. |
| 53 | */ |
Jeff Sharkey | 3f0b7b8 | 2009-08-12 11:28:53 -0700 | [diff] [blame] | 54 | public abstract class BaseContactCardActivity extends Activity implements |
| 55 | NotifyingAsyncQueryHandler.AsyncQueryListener, OnTabSelectionChangedListener { |
Evan Millar | 7911ff5 | 2009-07-21 15:55:18 -0700 | [diff] [blame] | 56 | |
| 57 | private static final String TAG = "BaseContactCardActivity"; |
| 58 | |
| 59 | private SparseArray<Long> mTabRawContactIdMap; |
Dmitri Plotnikov | 3d53ce2 | 2009-09-02 08:44:32 -0700 | [diff] [blame] | 60 | protected Uri mOriginalUri; |
Evan Millar | 7911ff5 | 2009-07-21 15:55:18 -0700 | [diff] [blame] | 61 | protected Uri mUri; |
Evan Millar | 7911ff5 | 2009-07-21 15:55:18 -0700 | [diff] [blame] | 62 | protected ScrollingTabWidget mTabWidget; |
Evan Millar | 1ea3bf7 | 2009-07-30 13:46:19 -0700 | [diff] [blame] | 63 | protected ContactHeaderWidget mContactHeaderWidget; |
Evan Millar | 7911ff5 | 2009-07-21 15:55:18 -0700 | [diff] [blame] | 64 | private NotifyingAsyncQueryHandler mHandler; |
Evan Millar | 7911ff5 | 2009-07-21 15:55:18 -0700 | [diff] [blame] | 65 | |
| 66 | protected LayoutInflater mInflater; |
| 67 | |
| 68 | //Projection used for the query that determines which tabs to add. |
| 69 | protected static final String[] TAB_PROJECTION = new String[] { |
| 70 | RawContacts._ID, |
| 71 | RawContacts.ACCOUNT_NAME, |
| 72 | RawContacts.ACCOUNT_TYPE |
| 73 | }; |
| 74 | protected static final int TAB_CONTACT_ID_COLUMN_INDEX = 0; |
| 75 | protected static final int TAB_ACCOUNT_NAME_COLUMN_INDEX = 1; |
| 76 | protected static final int TAB_ACCOUNT_TYPE_COLUMN_INDEX = 2; |
| 77 | |
Evan Millar | 8a79cee | 2009-08-19 17:20:49 -0700 | [diff] [blame] | 78 | protected static final String SELECTED_RAW_CONTACT_ID_KEY = "selectedRawContact"; |
Evan Millar | db5d88c | 2009-08-28 09:31:57 -0700 | [diff] [blame] | 79 | protected Long mSelectedRawContactId = null; |
Evan Millar | 8a79cee | 2009-08-19 17:20:49 -0700 | [diff] [blame] | 80 | |
Evan Millar | 1ea3bf7 | 2009-07-30 13:46:19 -0700 | [diff] [blame] | 81 | private static final int TOKEN_TABS = 0; |
Evan Millar | 7911ff5 | 2009-07-21 15:55:18 -0700 | [diff] [blame] | 82 | |
| 83 | @Override |
| 84 | protected void onCreate(Bundle icicle) { |
| 85 | super.onCreate(icicle); |
| 86 | |
| 87 | mInflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE); |
| 88 | |
| 89 | final Intent intent = getIntent(); |
Dmitri Plotnikov | 3d53ce2 | 2009-09-02 08:44:32 -0700 | [diff] [blame] | 90 | resolveContactUriFromIntent(intent); |
Evan Millar | 7911ff5 | 2009-07-21 15:55:18 -0700 | [diff] [blame] | 91 | |
| 92 | requestWindowFeature(Window.FEATURE_NO_TITLE); |
| 93 | setContentView(R.layout.contact_card_layout); |
| 94 | |
Evan Millar | 1ea3bf7 | 2009-07-30 13:46:19 -0700 | [diff] [blame] | 95 | mContactHeaderWidget = (ContactHeaderWidget) findViewById(R.id.contact_header_widget); |
| 96 | mContactHeaderWidget.showStar(true); |
| 97 | mContactHeaderWidget.bindFromContactId(ContentUris.parseId(mUri)); |
Jeff Sharkey | 0b4ad00 | 2009-08-23 14:16:27 -0700 | [diff] [blame] | 98 | mContactHeaderWidget.setExcludeMimes(new String[] { |
| 99 | Contacts.CONTENT_ITEM_TYPE |
| 100 | }); |
Evan Millar | 7911ff5 | 2009-07-21 15:55:18 -0700 | [diff] [blame] | 101 | |
Jeff Sharkey | 0b4ad00 | 2009-08-23 14:16:27 -0700 | [diff] [blame] | 102 | mTabWidget = (ScrollingTabWidget) findViewById(R.id.tab_widget); |
Evan Millar | 7911ff5 | 2009-07-21 15:55:18 -0700 | [diff] [blame] | 103 | mTabWidget.setTabSelectionListener(this); |
Evan Millar | 5f4af70 | 2009-08-11 11:12:00 -0700 | [diff] [blame] | 104 | mTabWidget.setVisibility(View.INVISIBLE); |
Jeff Sharkey | 0b4ad00 | 2009-08-23 14:16:27 -0700 | [diff] [blame] | 105 | |
Evan Millar | 7911ff5 | 2009-07-21 15:55:18 -0700 | [diff] [blame] | 106 | mTabRawContactIdMap = new SparseArray<Long>(); |
| 107 | |
Evan Millar | 7911ff5 | 2009-07-21 15:55:18 -0700 | [diff] [blame] | 108 | mHandler = new NotifyingAsyncQueryHandler(this, this); |
| 109 | |
Jeff Sharkey | 3f0b7b8 | 2009-08-12 11:28:53 -0700 | [diff] [blame] | 110 | // TODO: turn this into async call instead of blocking ui |
Evan Millar | 5f4af70 | 2009-08-11 11:12:00 -0700 | [diff] [blame] | 111 | asyncSetupTabs(); |
| 112 | } |
| 113 | |
Evan Millar | 8a79cee | 2009-08-19 17:20:49 -0700 | [diff] [blame] | 114 | |
Dmitri Plotnikov | 3d53ce2 | 2009-09-02 08:44:32 -0700 | [diff] [blame] | 115 | private void resolveContactUriFromIntent(final Intent intent) { |
| 116 | mOriginalUri = intent.getData(); |
| 117 | mUri = ContactsContract.Contacts.lookupContact(getContentResolver(), mOriginalUri); |
| 118 | } |
| 119 | |
Evan Millar | 8a79cee | 2009-08-19 17:20:49 -0700 | [diff] [blame] | 120 | @Override |
| 121 | protected void onRestoreInstanceState(Bundle savedInstanceState) { |
| 122 | super.onRestoreInstanceState(savedInstanceState); |
| 123 | mSelectedRawContactId = savedInstanceState.getLong(SELECTED_RAW_CONTACT_ID_KEY); |
| 124 | } |
| 125 | |
| 126 | @Override |
| 127 | protected void onSaveInstanceState(Bundle outState) { |
| 128 | super.onSaveInstanceState(outState); |
| 129 | outState.putLong(SELECTED_RAW_CONTACT_ID_KEY, mSelectedRawContactId); |
| 130 | } |
| 131 | |
Evan Millar | 5f4af70 | 2009-08-11 11:12:00 -0700 | [diff] [blame] | 132 | private void asyncSetupTabs() { |
Dmitri Plotnikov | 8832a64 | 2009-08-06 17:24:34 -0700 | [diff] [blame] | 133 | long contactId = ContentUris.parseId(mUri); |
Evan Millar | 5f4af70 | 2009-08-11 11:12:00 -0700 | [diff] [blame] | 134 | mHandler.startQueryEntities(TOKEN_TABS, null, |
| 135 | RawContacts.CONTENT_URI, RawContacts.CONTACT_ID + "=" + contactId, null, null); |
Evan Millar | 7911ff5 | 2009-07-21 15:55:18 -0700 | [diff] [blame] | 136 | } |
| 137 | |
| 138 | /** |
Evan Millar | 8a79cee | 2009-08-19 17:20:49 -0700 | [diff] [blame] | 139 | * Return the RawContact id associated with the tab at an index. |
Evan Millar | 7911ff5 | 2009-07-21 15:55:18 -0700 | [diff] [blame] | 140 | * |
| 141 | * @param index The index of the tab in question. |
| 142 | * @return The contactId associated with the tab at the specified index. |
| 143 | */ |
| 144 | protected long getTabRawContactId(int index) { |
| 145 | return mTabRawContactIdMap.get(index); |
| 146 | } |
| 147 | |
Evan Millar | 8a79cee | 2009-08-19 17:20:49 -0700 | [diff] [blame] | 148 | /** |
| 149 | * Return the tab index associated with the RawContact id. |
| 150 | * |
| 151 | * @param index The index of the tab in question. |
| 152 | * @return The contactId associated with the tab at the specified index. |
| 153 | */ |
| 154 | protected int getTabIndexForRawContactId(long rawContactId) { |
| 155 | int numTabs = mTabRawContactIdMap.size(); |
| 156 | for (int i=0; i < numTabs; i++) { |
| 157 | if (mTabRawContactIdMap.get(i) == rawContactId) { |
| 158 | return i; |
| 159 | } |
| 160 | } |
| 161 | return -1; |
| 162 | } |
| 163 | |
Evan Millar | 7911ff5 | 2009-07-21 15:55:18 -0700 | [diff] [blame] | 164 | /** {@inheritDoc} */ |
Evan Millar | 5f4af70 | 2009-08-11 11:12:00 -0700 | [diff] [blame] | 165 | public void onQueryEntitiesComplete(int token, Object cookie, EntityIterator iterator) { |
Evan Millar | 7911ff5 | 2009-07-21 15:55:18 -0700 | [diff] [blame] | 166 | try{ |
Evan Millar | 1ea3bf7 | 2009-07-30 13:46:19 -0700 | [diff] [blame] | 167 | if (token == TOKEN_TABS) { |
Evan Millar | 7911ff5 | 2009-07-21 15:55:18 -0700 | [diff] [blame] | 168 | clearCurrentTabs(); |
Evan Millar | 5f4af70 | 2009-08-11 11:12:00 -0700 | [diff] [blame] | 169 | bindTabs(readEntities(iterator)); |
Evan Millar | 7911ff5 | 2009-07-21 15:55:18 -0700 | [diff] [blame] | 170 | } |
| 171 | } finally { |
Evan Millar | 5f4af70 | 2009-08-11 11:12:00 -0700 | [diff] [blame] | 172 | if (iterator != null) { |
| 173 | iterator.close(); |
Evan Millar | 1ea3bf7 | 2009-07-30 13:46:19 -0700 | [diff] [blame] | 174 | } |
Evan Millar | 7911ff5 | 2009-07-21 15:55:18 -0700 | [diff] [blame] | 175 | } |
| 176 | } |
| 177 | |
Evan Millar | 5f4af70 | 2009-08-11 11:12:00 -0700 | [diff] [blame] | 178 | /** {@inheritDoc} */ |
| 179 | public void onQueryComplete(int token, Object cookie, Cursor cursor) { |
| 180 | // Emtpy |
| 181 | } |
| 182 | |
| 183 | private ArrayList<Entity> readEntities(EntityIterator iterator) { |
| 184 | ArrayList<Entity> entities = new ArrayList<Entity>(); |
| 185 | try { |
| 186 | while (iterator.hasNext()) { |
| 187 | entities.add(iterator.next()); |
| 188 | } |
| 189 | } catch (RemoteException e) { |
| 190 | } |
| 191 | |
| 192 | return entities; |
| 193 | } |
| 194 | |
Evan Millar | 7911ff5 | 2009-07-21 15:55:18 -0700 | [diff] [blame] | 195 | /** |
| 196 | * Adds a tab for each {@link RawContact} associated with this contact. |
| 197 | * Override this method if you want to additional tabs and/or different |
| 198 | * tabs for your activity. |
| 199 | * |
Evan Millar | 5f4af70 | 2009-08-11 11:12:00 -0700 | [diff] [blame] | 200 | * @param entities An {@link ArrayList} of {@link Entity}s of all the RawContacts |
| 201 | * associated with the contact being displayed. |
Evan Millar | 7911ff5 | 2009-07-21 15:55:18 -0700 | [diff] [blame] | 202 | */ |
Evan Millar | 5f4af70 | 2009-08-11 11:12:00 -0700 | [diff] [blame] | 203 | protected void bindTabs(ArrayList<Entity> entities) { |
Jeff Sharkey | 3f0b7b8 | 2009-08-12 11:28:53 -0700 | [diff] [blame] | 204 | final Sources sources = Sources.getInstance(this); |
| 205 | |
Evan Millar | 5f4af70 | 2009-08-11 11:12:00 -0700 | [diff] [blame] | 206 | for (Entity entity : entities) { |
| 207 | final String accountType = entity.getEntityValues(). |
| 208 | getAsString(RawContacts.ACCOUNT_TYPE); |
| 209 | final Long rawContactId = entity.getEntityValues(). |
| 210 | getAsLong(RawContacts._ID); |
Jeff Sharkey | 3f0b7b8 | 2009-08-12 11:28:53 -0700 | [diff] [blame] | 211 | |
| 212 | // TODO: ensure inflation on background task so we don't block UI thread here |
| 213 | final ContactsSource source = sources.getInflatedSource(accountType, |
| 214 | ContactsSource.LEVEL_SUMMARY); |
Evan Millar | 56d2caa | 2009-08-20 20:30:12 -0700 | [diff] [blame] | 215 | addTab(rawContactId, createTabIndicatorView(mTabWidget.getTabParent(), source)); |
Evan Millar | 7911ff5 | 2009-07-21 15:55:18 -0700 | [diff] [blame] | 216 | } |
Evan Millar | 8a79cee | 2009-08-19 17:20:49 -0700 | [diff] [blame] | 217 | |
| 218 | selectInitialTab(); |
Evan Millar | 5f4af70 | 2009-08-11 11:12:00 -0700 | [diff] [blame] | 219 | mTabWidget.setVisibility(View.VISIBLE); |
| 220 | mTabWidget.postInvalidate(); |
Evan Millar | 7911ff5 | 2009-07-21 15:55:18 -0700 | [diff] [blame] | 221 | } |
| 222 | |
Evan Millar | 7911ff5 | 2009-07-21 15:55:18 -0700 | [diff] [blame] | 223 | /** |
| 224 | * Add a tab to be displayed in the {@link ScrollingTabWidget}. |
| 225 | * |
| 226 | * @param contactId The contact id associated with the tab. |
| 227 | * @param view A view to use as the tab indicator. |
| 228 | */ |
Evan Millar | 5f4af70 | 2009-08-11 11:12:00 -0700 | [diff] [blame] | 229 | protected void addTab(long rawContactId, View view) { |
| 230 | mTabRawContactIdMap.put(mTabWidget.getTabCount(), rawContactId); |
Evan Millar | 7911ff5 | 2009-07-21 15:55:18 -0700 | [diff] [blame] | 231 | mTabWidget.addTab(view); |
| 232 | } |
| 233 | |
| 234 | |
| 235 | protected void clearCurrentTabs() { |
| 236 | mTabRawContactIdMap.clear(); |
| 237 | mTabWidget.removeAllTabs(); |
| 238 | } |
| 239 | |
Evan Millar | 8a79cee | 2009-08-19 17:20:49 -0700 | [diff] [blame] | 240 | protected void selectInitialTab() { |
Evan Millar | db5d88c | 2009-08-28 09:31:57 -0700 | [diff] [blame] | 241 | int selectedTabIndex = 0; |
Evan Millar | 8a79cee | 2009-08-19 17:20:49 -0700 | [diff] [blame] | 242 | |
Evan Millar | db5d88c | 2009-08-28 09:31:57 -0700 | [diff] [blame] | 243 | if (mSelectedRawContactId != null) { |
| 244 | selectedTabIndex = getTabIndexForRawContactId(mSelectedRawContactId); |
| 245 | if (selectedTabIndex == -1) { |
| 246 | // If there was no matching tab, just select the first; |
| 247 | selectedTabIndex = 0; |
| 248 | } |
| 249 | } |
| 250 | |
| 251 | mTabWidget.setCurrentTab(selectedTabIndex); |
| 252 | onTabSelectionChanged(selectedTabIndex, false); |
Evan Millar | 7911ff5 | 2009-07-21 15:55:18 -0700 | [diff] [blame] | 253 | } |
| 254 | |
| 255 | @Override |
| 256 | public void onNewIntent(Intent newIntent) { |
| 257 | setIntent(newIntent); |
Dmitri Plotnikov | 3d53ce2 | 2009-09-02 08:44:32 -0700 | [diff] [blame] | 258 | resolveContactUriFromIntent(newIntent); |
Evan Millar | db5d88c | 2009-08-28 09:31:57 -0700 | [diff] [blame] | 259 | selectInitialTab(); |
Evan Millar | 7911ff5 | 2009-07-21 15:55:18 -0700 | [diff] [blame] | 260 | } |
| 261 | |
| 262 | /** |
| 263 | * Utility for creating a standard tab indicator view. |
| 264 | * |
Evan Millar | 5f4af70 | 2009-08-11 11:12:00 -0700 | [diff] [blame] | 265 | * @param parent The parent ViewGroup to attach the new view to. |
Evan Millar | 7911ff5 | 2009-07-21 15:55:18 -0700 | [diff] [blame] | 266 | * @param label The label to display in the tab indicator. If null, not label will be displayed. |
| 267 | * @param icon The icon to display. If null, no icon will be displayed. |
| 268 | * @return The tab indicator View. |
| 269 | */ |
Jeff Sharkey | 14f61ab | 2009-08-05 21:02:37 -0700 | [diff] [blame] | 270 | public static View createTabIndicatorView(ViewGroup parent, CharSequence label, Drawable icon) { |
| 271 | final LayoutInflater inflater = (LayoutInflater)parent.getContext().getSystemService( |
| 272 | Context.LAYOUT_INFLATER_SERVICE); |
| 273 | final View tabIndicator = inflater.inflate(R.layout.tab_indicator, parent, false); |
Evan Millar | 7466091 | 2009-08-19 17:36:33 -0700 | [diff] [blame] | 274 | tabIndicator.getBackground().setDither(true); |
Evan Millar | 7911ff5 | 2009-07-21 15:55:18 -0700 | [diff] [blame] | 275 | |
| 276 | final TextView tv = (TextView) tabIndicator.findViewById(R.id.tab_title); |
| 277 | tv.setText(label); |
| 278 | |
| 279 | final ImageView iconView = (ImageView) tabIndicator.findViewById(R.id.tab_icon); |
| 280 | iconView.setImageDrawable(icon); |
| 281 | |
| 282 | return tabIndicator; |
| 283 | } |
| 284 | |
Evan Millar | 5f4af70 | 2009-08-11 11:12:00 -0700 | [diff] [blame] | 285 | /** |
| 286 | * Utility for creating a standard tab indicator view. |
| 287 | * |
| 288 | * @param context The label to display in the tab indicator. If null, not label will be displayed. |
| 289 | * @param parent The parent ViewGroup to attach the new view to. |
| 290 | * @param source The {@link ContactsSource} to build the tab view from. |
| 291 | * @return The tab indicator View. |
| 292 | */ |
| 293 | public static View createTabIndicatorView(ViewGroup parent, ContactsSource source) { |
| 294 | Drawable icon = null; |
| 295 | if (source != null) { |
| 296 | final String packageName = source.resPackageName; |
| 297 | if (source.iconRes > 0) { |
| 298 | try { |
| 299 | final Context authContext = parent.getContext(). |
| 300 | createPackageContext(packageName, 0); |
| 301 | icon = authContext.getResources().getDrawable(source.iconRes); |
| 302 | |
| 303 | } catch (PackageManager.NameNotFoundException e) { |
| 304 | Log.d(TAG, "error getting the Package Context for " + packageName, e); |
| 305 | } |
| 306 | } |
| 307 | } |
| 308 | return createTabIndicatorView(parent, null, icon); |
| 309 | } |
Evan Millar | 7911ff5 | 2009-07-21 15:55:18 -0700 | [diff] [blame] | 310 | } |