Jeff Hamilton | 9911b7f | 2010-05-15 02:20:31 -0500 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2010 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 android.content; |
| 18 | |
| 19 | import android.database.ContentObserver; |
| 20 | import android.os.Handler; |
Dianne Hackborn | a2ea747 | 2010-12-20 12:10:01 -0800 | [diff] [blame] | 21 | import android.util.DebugUtils; |
| 22 | |
| 23 | import java.io.FileDescriptor; |
| 24 | import java.io.PrintWriter; |
Jeff Hamilton | 9911b7f | 2010-05-15 02:20:31 -0500 | [diff] [blame] | 25 | |
| 26 | /** |
| 27 | * An abstract class that performs asynchronous loading of data. While Loaders are active |
| 28 | * they should monitor the source of their data and deliver new results when the contents |
Dianne Hackborn | 9567a66 | 2011-04-19 18:44:03 -0700 | [diff] [blame] | 29 | * change. See {@link android.app.LoaderManager} for more detail. |
Jeff Hamilton | 9911b7f | 2010-05-15 02:20:31 -0500 | [diff] [blame] | 30 | * |
Dianne Hackborn | 247fe74 | 2011-01-08 17:25:57 -0800 | [diff] [blame] | 31 | * <p><b>Note on threading:</b> Clients of loaders should as a rule perform |
| 32 | * any calls on to a Loader from the main thread of their process (that is, |
| 33 | * the thread the Activity callbacks and other things occur on). Subclasses |
| 34 | * of Loader (such as {@link AsyncTaskLoader}) will often perform their work |
| 35 | * in a separate thread, but when delivering their results this too should |
| 36 | * be done on the main thread.</p> |
| 37 | * |
Dianne Hackborn | a2ea747 | 2010-12-20 12:10:01 -0800 | [diff] [blame] | 38 | * <p>Subclasses generally must implement at least {@link #onStartLoading()}, |
Dianne Hackborn | 9567a66 | 2011-04-19 18:44:03 -0700 | [diff] [blame] | 39 | * {@link #onStopLoading()}, {@link #onForceLoad()}, and {@link #onReset()}.</p> |
| 40 | * |
| 41 | * <p>Most implementations should not derive directly from this class, but |
| 42 | * instead inherit from {@link AsyncTaskLoader}.</p> |
Dianne Hackborn | a2ea747 | 2010-12-20 12:10:01 -0800 | [diff] [blame] | 43 | * |
Jeff Hamilton | 9911b7f | 2010-05-15 02:20:31 -0500 | [diff] [blame] | 44 | * @param <D> The result returned when the load is complete |
| 45 | */ |
Dianne Hackborn | a2ea747 | 2010-12-20 12:10:01 -0800 | [diff] [blame] | 46 | public class Loader<D> { |
Jeff Hamilton | 9911b7f | 2010-05-15 02:20:31 -0500 | [diff] [blame] | 47 | int mId; |
| 48 | OnLoadCompleteListener<D> mListener; |
| 49 | Context mContext; |
Dianne Hackborn | a2ea747 | 2010-12-20 12:10:01 -0800 | [diff] [blame] | 50 | boolean mStarted = false; |
Dianne Hackborn | 260c3c7 | 2011-01-30 16:55:55 -0800 | [diff] [blame] | 51 | boolean mAbandoned = false; |
Dianne Hackborn | a2ea747 | 2010-12-20 12:10:01 -0800 | [diff] [blame] | 52 | boolean mReset = true; |
Dianne Hackborn | 0e3b8f42 | 2010-12-20 23:22:11 -0800 | [diff] [blame] | 53 | boolean mContentChanged = false; |
Jeff Hamilton | 9911b7f | 2010-05-15 02:20:31 -0500 | [diff] [blame] | 54 | |
| 55 | public final class ForceLoadContentObserver extends ContentObserver { |
| 56 | public ForceLoadContentObserver() { |
| 57 | super(new Handler()); |
| 58 | } |
| 59 | |
| 60 | @Override |
| 61 | public boolean deliverSelfNotifications() { |
| 62 | return true; |
| 63 | } |
| 64 | |
| 65 | @Override |
| 66 | public void onChange(boolean selfChange) { |
Makoto Onuki | ec37c88 | 2010-08-02 16:57:01 -0700 | [diff] [blame] | 67 | onContentChanged(); |
Jeff Hamilton | 9911b7f | 2010-05-15 02:20:31 -0500 | [diff] [blame] | 68 | } |
| 69 | } |
| 70 | |
| 71 | public interface OnLoadCompleteListener<D> { |
| 72 | /** |
| 73 | * Called on the thread that created the Loader when the load is complete. |
| 74 | * |
| 75 | * @param loader the loader that completed the load |
| 76 | * @param data the result of the load |
| 77 | */ |
| 78 | public void onLoadComplete(Loader<D> loader, D data); |
| 79 | } |
| 80 | |
| 81 | /** |
Dianne Hackborn | 9567a66 | 2011-04-19 18:44:03 -0700 | [diff] [blame] | 82 | * Stores away the application context associated with context. |
| 83 | * Since Loaders can be used across multiple activities it's dangerous to |
| 84 | * store the context directly; always use {@link #getContext()} to retrieve |
| 85 | * the Loader's Context, don't use the constructor argument directly. |
| 86 | * The Context returned by {@link #getContext} is safe to use across |
| 87 | * Activity instances. |
Jeff Hamilton | 9911b7f | 2010-05-15 02:20:31 -0500 | [diff] [blame] | 88 | * |
| 89 | * @param context used to retrieve the application context. |
| 90 | */ |
| 91 | public Loader(Context context) { |
| 92 | mContext = context.getApplicationContext(); |
| 93 | } |
| 94 | |
| 95 | /** |
| 96 | * Sends the result of the load to the registered listener. Should only be called by subclasses. |
| 97 | * |
Dianne Hackborn | 247fe74 | 2011-01-08 17:25:57 -0800 | [diff] [blame] | 98 | * Must be called from the process's main thread. |
Jeff Hamilton | 9911b7f | 2010-05-15 02:20:31 -0500 | [diff] [blame] | 99 | * |
| 100 | * @param data the result of the load |
| 101 | */ |
| 102 | public void deliverResult(D data) { |
| 103 | if (mListener != null) { |
| 104 | mListener.onLoadComplete(this, data); |
| 105 | } |
| 106 | } |
| 107 | |
| 108 | /** |
| 109 | * @return an application context retrieved from the Context passed to the constructor. |
| 110 | */ |
| 111 | public Context getContext() { |
| 112 | return mContext; |
| 113 | } |
| 114 | |
| 115 | /** |
| 116 | * @return the ID of this loader |
| 117 | */ |
| 118 | public int getId() { |
| 119 | return mId; |
| 120 | } |
| 121 | |
| 122 | /** |
Dianne Hackborn | 247fe74 | 2011-01-08 17:25:57 -0800 | [diff] [blame] | 123 | * Registers a class that will receive callbacks when a load is complete. |
| 124 | * The callback will be called on the process's main thread so it's safe to |
| 125 | * pass the results to widgets. |
Makoto Onuki | ec37c88 | 2010-08-02 16:57:01 -0700 | [diff] [blame] | 126 | * |
Dianne Hackborn | 247fe74 | 2011-01-08 17:25:57 -0800 | [diff] [blame] | 127 | * <p>Must be called from the process's main thread. |
Jeff Hamilton | 9911b7f | 2010-05-15 02:20:31 -0500 | [diff] [blame] | 128 | */ |
| 129 | public void registerListener(int id, OnLoadCompleteListener<D> listener) { |
| 130 | if (mListener != null) { |
| 131 | throw new IllegalStateException("There is already a listener registered"); |
| 132 | } |
| 133 | mListener = listener; |
| 134 | mId = id; |
| 135 | } |
| 136 | |
| 137 | /** |
Dianne Hackborn | 247fe74 | 2011-01-08 17:25:57 -0800 | [diff] [blame] | 138 | * Remove a listener that was previously added with {@link #registerListener}. |
| 139 | * |
| 140 | * Must be called from the process's main thread. |
Jeff Hamilton | 9911b7f | 2010-05-15 02:20:31 -0500 | [diff] [blame] | 141 | */ |
| 142 | public void unregisterListener(OnLoadCompleteListener<D> listener) { |
| 143 | if (mListener == null) { |
| 144 | throw new IllegalStateException("No listener register"); |
| 145 | } |
| 146 | if (mListener != listener) { |
| 147 | throw new IllegalArgumentException("Attempting to unregister the wrong listener"); |
| 148 | } |
| 149 | mListener = null; |
| 150 | } |
| 151 | |
| 152 | /** |
Dianne Hackborn | a2ea747 | 2010-12-20 12:10:01 -0800 | [diff] [blame] | 153 | * Return whether this load has been started. That is, its {@link #startLoading()} |
| 154 | * has been called and no calls to {@link #stopLoading()} or |
| 155 | * {@link #reset()} have yet been made. |
| 156 | */ |
| 157 | public boolean isStarted() { |
| 158 | return mStarted; |
| 159 | } |
| 160 | |
| 161 | /** |
Dianne Hackborn | 260c3c7 | 2011-01-30 16:55:55 -0800 | [diff] [blame] | 162 | * Return whether this loader has been abandoned. In this state, the |
| 163 | * loader <em>must not</em> report any new data, and <em>must</em> keep |
| 164 | * its last reported data valid until it is finally reset. |
| 165 | */ |
| 166 | public boolean isAbandoned() { |
| 167 | return mAbandoned; |
| 168 | } |
| 169 | |
| 170 | /** |
Dianne Hackborn | a2ea747 | 2010-12-20 12:10:01 -0800 | [diff] [blame] | 171 | * Return whether this load has been reset. That is, either the loader |
| 172 | * has not yet been started for the first time, or its {@link #reset()} |
| 173 | * has been called. |
| 174 | */ |
| 175 | public boolean isReset() { |
| 176 | return mReset; |
| 177 | } |
| 178 | |
| 179 | /** |
Dianne Hackborn | 247fe74 | 2011-01-08 17:25:57 -0800 | [diff] [blame] | 180 | * Starts an asynchronous load of the Loader's data. When the result |
| 181 | * is ready the callbacks will be called on the process's main thread. |
| 182 | * If a previous load has been completed and is still valid |
| 183 | * the result may be passed to the callbacks immediately. |
| 184 | * The loader will monitor the source of |
| 185 | * the data set and may deliver future callbacks if the source changes. |
| 186 | * Calling {@link #stopLoading} will stop the delivery of callbacks. |
Jeff Hamilton | 9911b7f | 2010-05-15 02:20:31 -0500 | [diff] [blame] | 187 | * |
Dianne Hackborn | a2ea747 | 2010-12-20 12:10:01 -0800 | [diff] [blame] | 188 | * <p>This updates the Loader's internal state so that |
| 189 | * {@link #isStarted()} and {@link #isReset()} will return the correct |
| 190 | * values, and then calls the implementation's {@link #onStartLoading()}. |
| 191 | * |
Dianne Hackborn | 247fe74 | 2011-01-08 17:25:57 -0800 | [diff] [blame] | 192 | * <p>Must be called from the process's main thread. |
Jeff Hamilton | 9911b7f | 2010-05-15 02:20:31 -0500 | [diff] [blame] | 193 | */ |
Dianne Hackborn | 0e3b8f42 | 2010-12-20 23:22:11 -0800 | [diff] [blame] | 194 | public final void startLoading() { |
Dianne Hackborn | a2ea747 | 2010-12-20 12:10:01 -0800 | [diff] [blame] | 195 | mStarted = true; |
| 196 | mReset = false; |
Dianne Hackborn | 260c3c7 | 2011-01-30 16:55:55 -0800 | [diff] [blame] | 197 | mAbandoned = false; |
Dianne Hackborn | a2ea747 | 2010-12-20 12:10:01 -0800 | [diff] [blame] | 198 | onStartLoading(); |
| 199 | } |
| 200 | |
| 201 | /** |
| 202 | * Subclasses must implement this to take care of loading their data, |
| 203 | * as per {@link #startLoading()}. This is not called by clients directly, |
| 204 | * but as a result of a call to {@link #startLoading()}. |
| 205 | */ |
| 206 | protected void onStartLoading() { |
| 207 | } |
Jeff Hamilton | 9911b7f | 2010-05-15 02:20:31 -0500 | [diff] [blame] | 208 | |
| 209 | /** |
| 210 | * Force an asynchronous load. Unlike {@link #startLoading()} this will ignore a previously |
Dianne Hackborn | a2ea747 | 2010-12-20 12:10:01 -0800 | [diff] [blame] | 211 | * loaded data set and load a new one. This simply calls through to the |
Dianne Hackborn | 0e3b8f42 | 2010-12-20 23:22:11 -0800 | [diff] [blame] | 212 | * implementation's {@link #onForceLoad()}. You generally should only call this |
| 213 | * when the loader is started -- that is, {@link #isStarted()} returns true. |
Dianne Hackborn | a2ea747 | 2010-12-20 12:10:01 -0800 | [diff] [blame] | 214 | * |
Dianne Hackborn | 247fe74 | 2011-01-08 17:25:57 -0800 | [diff] [blame] | 215 | * <p>Must be called from the process's main thread. |
Jeff Hamilton | 9911b7f | 2010-05-15 02:20:31 -0500 | [diff] [blame] | 216 | */ |
Dianne Hackborn | 247fe74 | 2011-01-08 17:25:57 -0800 | [diff] [blame] | 217 | public void forceLoad() { |
Dianne Hackborn | a2ea747 | 2010-12-20 12:10:01 -0800 | [diff] [blame] | 218 | onForceLoad(); |
| 219 | } |
Jeff Hamilton | 9911b7f | 2010-05-15 02:20:31 -0500 | [diff] [blame] | 220 | |
| 221 | /** |
Dianne Hackborn | a2ea747 | 2010-12-20 12:10:01 -0800 | [diff] [blame] | 222 | * Subclasses must implement this to take care of requests to {@link #forceLoad()}. |
Dianne Hackborn | 247fe74 | 2011-01-08 17:25:57 -0800 | [diff] [blame] | 223 | * This will always be called from the process's main thread. |
Jeff Hamilton | 9911b7f | 2010-05-15 02:20:31 -0500 | [diff] [blame] | 224 | */ |
Dianne Hackborn | a2ea747 | 2010-12-20 12:10:01 -0800 | [diff] [blame] | 225 | protected void onForceLoad() { |
| 226 | } |
| 227 | |
| 228 | /** |
| 229 | * Stops delivery of updates until the next time {@link #startLoading()} is called. |
Dianne Hackborn | 0e3b8f42 | 2010-12-20 23:22:11 -0800 | [diff] [blame] | 230 | * Implementations should <em>not</em> invalidate their data at this point -- |
| 231 | * clients are still free to use the last data the loader reported. They will, |
| 232 | * however, typically stop reporting new data if the data changes; they can |
| 233 | * still monitor for changes, but must not report them to the client until and |
| 234 | * if {@link #startLoading()} is later called. |
Dianne Hackborn | a2ea747 | 2010-12-20 12:10:01 -0800 | [diff] [blame] | 235 | * |
| 236 | * <p>This updates the Loader's internal state so that |
| 237 | * {@link #isStarted()} will return the correct |
| 238 | * value, and then calls the implementation's {@link #onStopLoading()}. |
| 239 | * |
Dianne Hackborn | 247fe74 | 2011-01-08 17:25:57 -0800 | [diff] [blame] | 240 | * <p>Must be called from the process's main thread. |
Dianne Hackborn | a2ea747 | 2010-12-20 12:10:01 -0800 | [diff] [blame] | 241 | */ |
Dianne Hackborn | 247fe74 | 2011-01-08 17:25:57 -0800 | [diff] [blame] | 242 | public void stopLoading() { |
Dianne Hackborn | a2ea747 | 2010-12-20 12:10:01 -0800 | [diff] [blame] | 243 | mStarted = false; |
| 244 | onStopLoading(); |
| 245 | } |
| 246 | |
| 247 | /** |
| 248 | * Subclasses must implement this to take care of stopping their loader, |
| 249 | * as per {@link #stopLoading()}. This is not called by clients directly, |
| 250 | * but as a result of a call to {@link #stopLoading()}. |
Dianne Hackborn | 247fe74 | 2011-01-08 17:25:57 -0800 | [diff] [blame] | 251 | * This will always be called from the process's main thread. |
Dianne Hackborn | a2ea747 | 2010-12-20 12:10:01 -0800 | [diff] [blame] | 252 | */ |
| 253 | protected void onStopLoading() { |
| 254 | } |
Jeff Hamilton | 9911b7f | 2010-05-15 02:20:31 -0500 | [diff] [blame] | 255 | |
| 256 | /** |
Dianne Hackborn | 260c3c7 | 2011-01-30 16:55:55 -0800 | [diff] [blame] | 257 | * Tell the Loader that it is being abandoned. This is called prior |
| 258 | * to {@link #reset} to have it retain its current data but not report |
| 259 | * any new data. |
| 260 | */ |
| 261 | public void abandon() { |
| 262 | mAbandoned = true; |
| 263 | onAbandon(); |
| 264 | } |
| 265 | |
| 266 | /** |
| 267 | * Subclasses implement this to take care of being abandoned. This is |
| 268 | * an optional intermediate state prior to {@link #onReset()} -- it means that |
| 269 | * the client is no longer interested in any new data from the loader, |
| 270 | * so the loader must not report any further updates. However, the |
| 271 | * loader <em>must</em> keep its last reported data valid until the final |
| 272 | * {@link #onReset()} happens. You can retrieve the current abandoned |
| 273 | * state with {@link #isAbandoned}. |
| 274 | */ |
| 275 | protected void onAbandon() { |
| 276 | } |
| 277 | |
| 278 | /** |
Dianne Hackborn | c918935 | 2010-12-15 14:57:25 -0800 | [diff] [blame] | 279 | * Resets the state of the Loader. The Loader should at this point free |
| 280 | * all of its resources, since it may never be called again; however, its |
| 281 | * {@link #startLoading()} may later be called at which point it must be |
| 282 | * able to start running again. |
Jeff Hamilton | 9911b7f | 2010-05-15 02:20:31 -0500 | [diff] [blame] | 283 | * |
Dianne Hackborn | a2ea747 | 2010-12-20 12:10:01 -0800 | [diff] [blame] | 284 | * <p>This updates the Loader's internal state so that |
| 285 | * {@link #isStarted()} and {@link #isReset()} will return the correct |
| 286 | * values, and then calls the implementation's {@link #onReset()}. |
| 287 | * |
Dianne Hackborn | 247fe74 | 2011-01-08 17:25:57 -0800 | [diff] [blame] | 288 | * <p>Must be called from the process's main thread. |
Jeff Hamilton | 9911b7f | 2010-05-15 02:20:31 -0500 | [diff] [blame] | 289 | */ |
Dianne Hackborn | 247fe74 | 2011-01-08 17:25:57 -0800 | [diff] [blame] | 290 | public void reset() { |
Dianne Hackborn | a2ea747 | 2010-12-20 12:10:01 -0800 | [diff] [blame] | 291 | onReset(); |
| 292 | mReset = true; |
| 293 | mStarted = false; |
Dianne Hackborn | 260c3c7 | 2011-01-30 16:55:55 -0800 | [diff] [blame] | 294 | mAbandoned = false; |
Dianne Hackborn | 0e3b8f42 | 2010-12-20 23:22:11 -0800 | [diff] [blame] | 295 | mContentChanged = false; |
Dianne Hackborn | c918935 | 2010-12-15 14:57:25 -0800 | [diff] [blame] | 296 | } |
| 297 | |
| 298 | /** |
Dianne Hackborn | a2ea747 | 2010-12-20 12:10:01 -0800 | [diff] [blame] | 299 | * Subclasses must implement this to take care of resetting their loader, |
| 300 | * as per {@link #reset()}. This is not called by clients directly, |
| 301 | * but as a result of a call to {@link #reset()}. |
Dianne Hackborn | 247fe74 | 2011-01-08 17:25:57 -0800 | [diff] [blame] | 302 | * This will always be called from the process's main thread. |
Dianne Hackborn | c918935 | 2010-12-15 14:57:25 -0800 | [diff] [blame] | 303 | */ |
Dianne Hackborn | a2ea747 | 2010-12-20 12:10:01 -0800 | [diff] [blame] | 304 | protected void onReset() { |
Dianne Hackborn | c918935 | 2010-12-15 14:57:25 -0800 | [diff] [blame] | 305 | } |
Makoto Onuki | ec37c88 | 2010-08-02 16:57:01 -0700 | [diff] [blame] | 306 | |
| 307 | /** |
Dianne Hackborn | 0e3b8f42 | 2010-12-20 23:22:11 -0800 | [diff] [blame] | 308 | * Take the current flag indicating whether the loader's content had |
| 309 | * changed while it was stopped. If it had, true is returned and the |
| 310 | * flag is cleared. |
| 311 | */ |
| 312 | public boolean takeContentChanged() { |
| 313 | boolean res = mContentChanged; |
| 314 | mContentChanged = false; |
| 315 | return res; |
| 316 | } |
| 317 | |
| 318 | /** |
| 319 | * Called when {@link ForceLoadContentObserver} detects a change. The |
| 320 | * default implementation checks to see if the loader is currently started; |
| 321 | * if so, it simply calls {@link #forceLoad()}; otherwise, it sets a flag |
| 322 | * so that {@link #takeContentChanged()} returns true. |
Makoto Onuki | ec37c88 | 2010-08-02 16:57:01 -0700 | [diff] [blame] | 323 | * |
Dianne Hackborn | 247fe74 | 2011-01-08 17:25:57 -0800 | [diff] [blame] | 324 | * <p>Must be called from the process's main thread. |
Makoto Onuki | ec37c88 | 2010-08-02 16:57:01 -0700 | [diff] [blame] | 325 | */ |
| 326 | public void onContentChanged() { |
Dianne Hackborn | 0e3b8f42 | 2010-12-20 23:22:11 -0800 | [diff] [blame] | 327 | if (mStarted) { |
| 328 | forceLoad(); |
| 329 | } else { |
| 330 | // This loader has been stopped, so we don't want to load |
| 331 | // new data right now... but keep track of it changing to |
| 332 | // refresh later if we start again. |
| 333 | mContentChanged = true; |
| 334 | } |
Makoto Onuki | ec37c88 | 2010-08-02 16:57:01 -0700 | [diff] [blame] | 335 | } |
Dianne Hackborn | a2ea747 | 2010-12-20 12:10:01 -0800 | [diff] [blame] | 336 | |
| 337 | /** |
| 338 | * For debugging, converts an instance of the Loader's data class to |
| 339 | * a string that can be printed. Must handle a null data. |
| 340 | */ |
| 341 | public String dataToString(D data) { |
| 342 | StringBuilder sb = new StringBuilder(64); |
| 343 | DebugUtils.buildShortClassTag(data, sb); |
| 344 | sb.append("}"); |
| 345 | return sb.toString(); |
| 346 | } |
| 347 | |
| 348 | @Override |
| 349 | public String toString() { |
| 350 | StringBuilder sb = new StringBuilder(64); |
| 351 | DebugUtils.buildShortClassTag(this, sb); |
| 352 | sb.append(" id="); |
| 353 | sb.append(mId); |
| 354 | sb.append("}"); |
| 355 | return sb.toString(); |
| 356 | } |
| 357 | |
| 358 | /** |
| 359 | * Print the Loader's state into the given stream. |
| 360 | * |
| 361 | * @param prefix Text to print at the front of each line. |
| 362 | * @param fd The raw file descriptor that the dump is being sent to. |
| 363 | * @param writer A PrintWriter to which the dump is to be set. |
| 364 | * @param args Additional arguments to the dump request. |
| 365 | */ |
| 366 | public void dump(String prefix, FileDescriptor fd, PrintWriter writer, String[] args) { |
| 367 | writer.print(prefix); writer.print("mId="); writer.print(mId); |
| 368 | writer.print(" mListener="); writer.println(mListener); |
| 369 | writer.print(prefix); writer.print("mStarted="); writer.print(mStarted); |
Dianne Hackborn | 0e3b8f42 | 2010-12-20 23:22:11 -0800 | [diff] [blame] | 370 | writer.print(" mContentChanged="); writer.print(mContentChanged); |
Dianne Hackborn | 260c3c7 | 2011-01-30 16:55:55 -0800 | [diff] [blame] | 371 | writer.print(" mAbandoned="); writer.print(mAbandoned); |
Dianne Hackborn | a2ea747 | 2010-12-20 12:10:01 -0800 | [diff] [blame] | 372 | writer.print(" mReset="); writer.println(mReset); |
| 373 | } |
Jeff Hamilton | 9911b7f | 2010-05-15 02:20:31 -0500 | [diff] [blame] | 374 | } |