blob: 70a516293a30bc36954db774fa80b0de3a25d9e4 [file] [log] [blame]
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001/*
2 * Copyright (C) 2006 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
17package com.android.server.am;
18
Craig Mautnerde4ef022013-04-07 19:01:33 -070019import static com.android.server.am.ActivityManagerService.TAG;
20import static com.android.server.am.ActivityStack.DEBUG_ADD_REMOVE;
21
Craig Mautnerb0f7dc72013-04-01 16:34:45 -070022import android.app.Activity;
Craig Mautner9db9a0b2013-04-29 17:05:56 -070023import android.app.ActivityManager;
Craig Mautnerb0f7dc72013-04-01 16:34:45 -070024import android.app.ActivityOptions;
Craig Mautner9db9a0b2013-04-29 17:05:56 -070025import android.app.IThumbnailRetriever;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080026import android.content.ComponentName;
27import android.content.Intent;
28import android.content.pm.ActivityInfo;
Craig Mautner9db9a0b2013-04-29 17:05:56 -070029import android.graphics.Bitmap;
Dianne Hackbornf02b60a2012-08-16 10:48:27 -070030import android.os.UserHandle;
Dianne Hackborn7f96b792012-05-29 18:46:45 -070031import android.util.Slog;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080032
33import java.io.PrintWriter;
Craig Mautner5d9c7be2013-02-15 14:02:56 -080034import java.util.ArrayList;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080035
Dianne Hackbornf26fd992011-04-08 18:14:09 -070036class TaskRecord extends ThumbnailHolder {
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080037 final int taskId; // Unique identifier for this task.
38 final String affinity; // The affinity name for this task, or null.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080039 Intent intent; // The original intent that started the task.
40 Intent affinityIntent; // Intent of affinity-moved activity that started this task.
41 ComponentName origActivity; // The non-alias activity component of the intent.
42 ComponentName realActivity; // The actual activity component that started the task.
43 int numActivities; // Current number of activities in this task.
44 long lastActiveTime; // Last time this task was active, including sleep.
45 boolean rootWasReset; // True if the intent at the root of the task had
46 // the FLAG_ACTIVITY_RESET_TASK_IF_NEEDED flag.
Dianne Hackborn36cd41f2011-05-25 21:00:46 -070047 boolean askedCompatMode;// Have asked the user about compat mode for this task.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080048
Dianne Hackborn1d442e02009-04-20 18:14:05 -070049 String stringName; // caching of toString() result.
Dianne Hackborn9da2d402012-03-15 13:43:08 -070050 int userId; // user for which this task was created
Craig Mautner5d9c7be2013-02-15 14:02:56 -080051
52 int numFullscreen; // Number of fullscreen activities.
53
Craig Mautnerd2328952013-03-05 12:46:26 -080054 /** List of all activities in the task arranged in history order */
Craig Mautner5d9c7be2013-02-15 14:02:56 -080055 final ArrayList<ActivityRecord> mActivities = new ArrayList<ActivityRecord>();
56
Craig Mautnerd2328952013-03-05 12:46:26 -080057 /** Current stack */
58 ActivityStack stack;
59
Craig Mautner1602ec22013-05-12 10:24:27 -070060 private boolean mHomeTask;
61
Craig Mautnerd2328952013-03-05 12:46:26 -080062 TaskRecord(int _taskId, ActivityInfo info, Intent _intent, ActivityStack _stack) {
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080063 taskId = _taskId;
64 affinity = info.taskAffinity;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080065 setIntent(_intent, info);
Craig Mautnerd2328952013-03-05 12:46:26 -080066 stack = _stack;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080067 }
68
69 void touchActiveTime() {
70 lastActiveTime = android.os.SystemClock.elapsedRealtime();
71 }
Craig Mautner9db9a0b2013-04-29 17:05:56 -070072
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080073 long getInactiveDuration() {
74 return android.os.SystemClock.elapsedRealtime() - lastActiveTime;
75 }
Craig Mautner9db9a0b2013-04-29 17:05:56 -070076
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080077 void setIntent(Intent _intent, ActivityInfo info) {
Dianne Hackborn1d442e02009-04-20 18:14:05 -070078 stringName = null;
Dianne Hackbornf5b86712011-12-05 17:42:41 -080079
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080080 if (info.targetActivity == null) {
Dianne Hackbornf5b86712011-12-05 17:42:41 -080081 if (_intent != null) {
82 // If this Intent has a selector, we want to clear it for the
83 // recent task since it is not relevant if the user later wants
84 // to re-launch the app.
Dianne Hackbornd367ca82012-05-07 15:49:39 -070085 if (_intent.getSelector() != null || _intent.getSourceBounds() != null) {
Dianne Hackbornf5b86712011-12-05 17:42:41 -080086 _intent = new Intent(_intent);
87 _intent.setSelector(null);
Dianne Hackbornd367ca82012-05-07 15:49:39 -070088 _intent.setSourceBounds(null);
Dianne Hackbornf5b86712011-12-05 17:42:41 -080089 }
90 }
Dianne Hackborn7f96b792012-05-29 18:46:45 -070091 if (ActivityManagerService.DEBUG_TASKS) Slog.v(ActivityManagerService.TAG,
92 "Setting Intent of " + this + " to " + _intent);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080093 intent = _intent;
94 realActivity = _intent != null ? _intent.getComponent() : null;
95 origActivity = null;
96 } else {
97 ComponentName targetComponent = new ComponentName(
98 info.packageName, info.targetActivity);
99 if (_intent != null) {
100 Intent targetIntent = new Intent(_intent);
101 targetIntent.setComponent(targetComponent);
Dianne Hackbornf5b86712011-12-05 17:42:41 -0800102 targetIntent.setSelector(null);
Dianne Hackbornd367ca82012-05-07 15:49:39 -0700103 targetIntent.setSourceBounds(null);
Dianne Hackborn7f96b792012-05-29 18:46:45 -0700104 if (ActivityManagerService.DEBUG_TASKS) Slog.v(ActivityManagerService.TAG,
105 "Setting Intent of " + this + " to target " + targetIntent);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800106 intent = targetIntent;
107 realActivity = targetComponent;
108 origActivity = _intent.getComponent();
109 } else {
110 intent = null;
111 realActivity = targetComponent;
112 origActivity = new ComponentName(info.packageName, info.name);
113 }
114 }
Amith Yamasani742a6712011-05-04 14:49:28 -0700115
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800116 if (intent != null &&
117 (intent.getFlags()&Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED) != 0) {
118 // Once we are set to an Intent with this flag, we count this
119 // task as having a true root activity.
120 rootWasReset = true;
121 }
Amith Yamasani742a6712011-05-04 14:49:28 -0700122
123 if (info.applicationInfo != null) {
Dianne Hackbornf02b60a2012-08-16 10:48:27 -0700124 userId = UserHandle.getUserId(info.applicationInfo.uid);
Amith Yamasani742a6712011-05-04 14:49:28 -0700125 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800126 }
Craig Mautner5d9c7be2013-02-15 14:02:56 -0800127
128 ActivityRecord getTopActivity() {
129 for (int i = mActivities.size() - 1; i >= 0; --i) {
130 final ActivityRecord r = mActivities.get(i);
131 if (r.finishing) {
132 continue;
133 }
134 return r;
135 }
136 return null;
137 }
138
Craig Mautnerde4ef022013-04-07 19:01:33 -0700139 /**
140 * Reorder the history stack so that the activity at the given index is
141 * brought to the front.
142 */
143 final void moveActivityToFrontLocked(ActivityRecord newTop) {
144 if (DEBUG_ADD_REMOVE) Slog.i(TAG, "Removing and adding activity " + newTop
145 + " to stack at top", new RuntimeException("here").fillInStackTrace());
146
147 getTopActivity().frontOfTask = false;
148 mActivities.remove(newTop);
149 mActivities.add(newTop);
150 newTop.frontOfTask = true;
151 }
152
Craig Mautner5d9c7be2013-02-15 14:02:56 -0800153 void addActivityAtBottom(ActivityRecord r) {
Craig Mautner77878772013-03-04 19:46:24 -0800154 addActivityAtIndex(0, r);
Craig Mautner5d9c7be2013-02-15 14:02:56 -0800155 }
156
157 void addActivityToTop(ActivityRecord r) {
Craig Mautner1602ec22013-05-12 10:24:27 -0700158 addActivityAtIndex(mActivities.size(), r);
159 }
160
161 void addActivityAtIndex(int index, ActivityRecord r) {
Craig Mautner6170f732013-04-02 13:05:23 -0700162 // Remove r first, and if it wasn't already in the list and it's fullscreen, count it.
Craig Mautner5d9c7be2013-02-15 14:02:56 -0800163 if (!mActivities.remove(r) && r.fullscreen) {
164 // Was not previously in list.
165 numFullscreen++;
166 }
Craig Mautner1602ec22013-05-12 10:24:27 -0700167 mHomeTask = r.isHomeActivity;
Craig Mautner77878772013-03-04 19:46:24 -0800168 mActivities.add(index, r);
169 }
170
Craig Mautner5d9c7be2013-02-15 14:02:56 -0800171 /** @return true if this was the last activity in the task */
172 boolean removeActivity(ActivityRecord r) {
173 if (mActivities.remove(r) && r.fullscreen) {
174 // Was previously in list.
175 numFullscreen--;
176 }
177 return mActivities.size() == 0;
178 }
179
Craig Mautnerb0f7dc72013-04-01 16:34:45 -0700180 /**
181 * Completely remove all activities associated with an existing
182 * task starting at a specified index.
183 */
184 final void performClearTaskAtIndexLocked(int activityNdx) {
Craig Mautner1602ec22013-05-12 10:24:27 -0700185 int numActivities = mActivities.size();
Craig Mautnerb0f7dc72013-04-01 16:34:45 -0700186 for ( ; activityNdx < numActivities; ++activityNdx) {
Craig Mautner1602ec22013-05-12 10:24:27 -0700187 final ActivityRecord r = mActivities.get(activityNdx);
Craig Mautnerb0f7dc72013-04-01 16:34:45 -0700188 if (r.finishing) {
189 continue;
190 }
191 if (stack.finishActivityLocked(r, Activity.RESULT_CANCELED, null, "clear", false)) {
192 --activityNdx;
193 --numActivities;
194 }
195 }
196 }
197
198 /**
199 * Completely remove all activities associated with an existing task.
200 */
201 final void performClearTaskLocked() {
202 performClearTaskAtIndexLocked(0);
203 }
204
205 /**
206 * Perform clear operation as requested by
207 * {@link Intent#FLAG_ACTIVITY_CLEAR_TOP}: search from the top of the
208 * stack to the given task, then look for
209 * an instance of that activity in the stack and, if found, finish all
210 * activities on top of it and return the instance.
211 *
212 * @param newR Description of the new activity being started.
213 * @return Returns the old activity that should be continued to be used,
214 * or null if none was found.
215 */
216 final ActivityRecord performClearTaskLocked(ActivityRecord newR, int launchFlags) {
Craig Mautner1602ec22013-05-12 10:24:27 -0700217 int numActivities = mActivities.size();
Craig Mautnerb0f7dc72013-04-01 16:34:45 -0700218 for (int activityNdx = numActivities - 1; activityNdx >= 0; --activityNdx) {
Craig Mautner1602ec22013-05-12 10:24:27 -0700219 ActivityRecord r = mActivities.get(activityNdx);
Craig Mautnerb0f7dc72013-04-01 16:34:45 -0700220 if (r.finishing) {
221 continue;
222 }
223 if (r.realActivity.equals(newR.realActivity)) {
224 // Here it is! Now finish everything in front...
Craig Mautner1602ec22013-05-12 10:24:27 -0700225 final ActivityRecord ret = r;
Craig Mautnerb0f7dc72013-04-01 16:34:45 -0700226
227 for (++activityNdx; activityNdx < numActivities; ++activityNdx) {
Craig Mautner1602ec22013-05-12 10:24:27 -0700228 r = mActivities.get(activityNdx);
Craig Mautnerb0f7dc72013-04-01 16:34:45 -0700229 if (r.finishing) {
230 continue;
231 }
232 ActivityOptions opts = r.takeOptionsLocked();
233 if (opts != null) {
234 ret.updateOptionsLocked(opts);
235 }
236 if (stack.finishActivityLocked(r, Activity.RESULT_CANCELED, null, "clear",
237 false)) {
238 --activityNdx;
239 --numActivities;
240 }
241 }
242
243 // Finally, if this is a normal launch mode (that is, not
244 // expecting onNewIntent()), then we will finish the current
245 // instance of the activity so a new fresh one can be started.
246 if (ret.launchMode == ActivityInfo.LAUNCH_MULTIPLE
247 && (launchFlags & Intent.FLAG_ACTIVITY_SINGLE_TOP) == 0) {
248 if (!ret.finishing) {
Craig Mautner1602ec22013-05-12 10:24:27 -0700249 stack.finishActivityLocked(ret, Activity.RESULT_CANCELED, null,
250 "clear", false);
Craig Mautnerb0f7dc72013-04-01 16:34:45 -0700251 return null;
252 }
253 }
254
255 return ret;
256 }
257 }
258
259 return null;
260 }
261
Craig Mautner9db9a0b2013-04-29 17:05:56 -0700262 public ActivityManager.TaskThumbnails getTaskThumbnailsLocked() {
263 TaskAccessInfo info = getTaskAccessInfoLocked(true);
264 final ActivityRecord resumedActivity = stack.mResumedActivity;
265 if (resumedActivity != null && resumedActivity.thumbHolder == this) {
266 info.mainThumbnail = stack.screenshotActivities(resumedActivity);
267 }
268 if (info.mainThumbnail == null) {
269 info.mainThumbnail = lastThumbnail;
270 }
271 return info;
272 }
273
274 public Bitmap getTaskTopThumbnailLocked() {
275 final ActivityRecord resumedActivity = stack.mResumedActivity;
276 if (resumedActivity != null && resumedActivity.task == this) {
277 // This task is the current resumed task, we just need to take
278 // a screenshot of it and return that.
279 return stack.screenshotActivities(resumedActivity);
280 }
281 // Return the information about the task, to figure out the top
282 // thumbnail to return.
283 TaskAccessInfo info = getTaskAccessInfoLocked(true);
284 if (info.numSubThumbbails <= 0) {
285 return info.mainThumbnail != null ? info.mainThumbnail : lastThumbnail;
286 }
287 return info.subtasks.get(info.numSubThumbbails-1).holder.lastThumbnail;
288 }
289
290 public ActivityRecord removeTaskActivitiesLocked(int subTaskIndex,
291 boolean taskRequired) {
292 TaskAccessInfo info = getTaskAccessInfoLocked(false);
293 if (info.root == null) {
294 if (taskRequired) {
295 Slog.w(TAG, "removeTaskLocked: unknown taskId " + taskId);
296 }
297 return null;
298 }
299
300 if (subTaskIndex < 0) {
301 // Just remove the entire task.
302 performClearTaskAtIndexLocked(info.rootIndex);
303 return info.root;
304 }
305
306 if (subTaskIndex >= info.subtasks.size()) {
307 if (taskRequired) {
308 Slog.w(TAG, "removeTaskLocked: unknown subTaskIndex " + subTaskIndex);
309 }
310 return null;
311 }
312
313 // Remove all of this task's activities starting at the sub task.
314 TaskAccessInfo.SubTask subtask = info.subtasks.get(subTaskIndex);
315 performClearTaskAtIndexLocked(subtask.index);
316 return subtask.activity;
317 }
318
Craig Mautner1602ec22013-05-12 10:24:27 -0700319 boolean isHomeTask() {
320 return mHomeTask;
321 }
322
Craig Mautner9db9a0b2013-04-29 17:05:56 -0700323 public TaskAccessInfo getTaskAccessInfoLocked(boolean inclThumbs) {
324 final TaskAccessInfo thumbs = new TaskAccessInfo();
325 // How many different sub-thumbnails?
326 final int NA = mActivities.size();
327 int j = 0;
328 ThumbnailHolder holder = null;
329 while (j < NA) {
330 ActivityRecord ar = mActivities.get(j);
331 if (!ar.finishing) {
332 thumbs.root = ar;
333 thumbs.rootIndex = j;
334 holder = ar.thumbHolder;
335 if (holder != null) {
336 thumbs.mainThumbnail = holder.lastThumbnail;
337 }
338 j++;
339 break;
340 }
341 j++;
342 }
343
344 if (j >= NA) {
345 return thumbs;
346 }
347
348 ArrayList<TaskAccessInfo.SubTask> subtasks = new ArrayList<TaskAccessInfo.SubTask>();
349 thumbs.subtasks = subtasks;
350 while (j < NA) {
351 ActivityRecord ar = mActivities.get(j);
352 j++;
353 if (ar.finishing) {
354 continue;
355 }
356 if (ar.thumbHolder != holder && holder != null) {
357 thumbs.numSubThumbbails++;
358 holder = ar.thumbHolder;
359 TaskAccessInfo.SubTask sub = new TaskAccessInfo.SubTask();
360 sub.holder = holder;
361 sub.activity = ar;
362 sub.index = j-1;
363 subtasks.add(sub);
364 }
365 }
366 if (thumbs.numSubThumbbails > 0) {
367 thumbs.retriever = new IThumbnailRetriever.Stub() {
368 @Override
369 public Bitmap getThumbnail(int index) {
370 if (index < 0 || index >= thumbs.subtasks.size()) {
371 return null;
372 }
373 TaskAccessInfo.SubTask sub = thumbs.subtasks.get(index);
374 ActivityRecord resumedActivity = stack.mResumedActivity;
375 if (resumedActivity != null && resumedActivity.thumbHolder == sub.holder) {
376 return stack.screenshotActivities(resumedActivity);
377 }
378 return sub.holder.lastThumbnail;
379 }
380 };
381 }
382 return thumbs;
383 }
384
Craig Mautner525f3d92013-05-07 14:01:50 -0700385 /**
386 * Find the activity in the history stack within the given task. Returns
387 * the index within the history at which it's found, or < 0 if not found.
388 */
389 final ActivityRecord findActivityInHistoryLocked(ActivityRecord r) {
390 final ComponentName realActivity = r.realActivity;
391 for (int activityNdx = mActivities.size() - 1; activityNdx >= 0; --activityNdx) {
392 ActivityRecord candidate = mActivities.get(activityNdx);
393 if (candidate.finishing) {
394 continue;
395 }
396 if (candidate.realActivity.equals(realActivity)) {
397 return candidate;
398 }
399 }
400 return null;
401 }
402
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800403 void dump(PrintWriter pw, String prefix) {
Dianne Hackborn7f96b792012-05-29 18:46:45 -0700404 if (numActivities != 0 || rootWasReset || userId != 0) {
Dianne Hackborn621e17d2010-11-22 15:59:56 -0800405 pw.print(prefix); pw.print("numActivities="); pw.print(numActivities);
Dianne Hackborn7f96b792012-05-29 18:46:45 -0700406 pw.print(" rootWasReset="); pw.print(rootWasReset);
Craig Mautner5d9c7be2013-02-15 14:02:56 -0800407 pw.print(" userId="); pw.print(userId);
408 pw.print(" numFullscreen="); pw.println(numFullscreen);
Dianne Hackborn1d442e02009-04-20 18:14:05 -0700409 }
410 if (affinity != null) {
411 pw.print(prefix); pw.print("affinity="); pw.println(affinity);
412 }
413 if (intent != null) {
414 StringBuilder sb = new StringBuilder(128);
415 sb.append(prefix); sb.append("intent={");
Dianne Hackborn21c241e2012-03-08 13:57:23 -0800416 intent.toShortString(sb, false, true, false, true);
Dianne Hackborn1d442e02009-04-20 18:14:05 -0700417 sb.append('}');
418 pw.println(sb.toString());
419 }
420 if (affinityIntent != null) {
421 StringBuilder sb = new StringBuilder(128);
422 sb.append(prefix); sb.append("affinityIntent={");
Dianne Hackborn21c241e2012-03-08 13:57:23 -0800423 affinityIntent.toShortString(sb, false, true, false, true);
Dianne Hackborn1d442e02009-04-20 18:14:05 -0700424 sb.append('}');
425 pw.println(sb.toString());
426 }
427 if (origActivity != null) {
428 pw.print(prefix); pw.print("origActivity=");
429 pw.println(origActivity.flattenToShortString());
430 }
431 if (realActivity != null) {
432 pw.print(prefix); pw.print("realActivity=");
433 pw.println(realActivity.flattenToShortString());
434 }
Craig Mautner5d9c7be2013-02-15 14:02:56 -0800435 pw.print(prefix); pw.print("Activities="); pw.println(mActivities);
Dianne Hackborn36cd41f2011-05-25 21:00:46 -0700436 if (!askedCompatMode) {
437 pw.print(prefix); pw.print("askedCompatMode="); pw.println(askedCompatMode);
438 }
Dianne Hackborncfb9f2b2011-08-24 10:51:49 -0700439 pw.print(prefix); pw.print("lastThumbnail="); pw.print(lastThumbnail);
440 pw.print(" lastDescription="); pw.println(lastDescription);
Dianne Hackborn1d442e02009-04-20 18:14:05 -0700441 pw.print(prefix); pw.print("lastActiveTime="); pw.print(lastActiveTime);
442 pw.print(" (inactive for ");
443 pw.print((getInactiveDuration()/1000)); pw.println("s)");
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800444 }
445
Craig Mautner5d9c7be2013-02-15 14:02:56 -0800446 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800447 public String toString() {
Dianne Hackborn1d442e02009-04-20 18:14:05 -0700448 StringBuilder sb = new StringBuilder(128);
Craig Mautnerde4ef022013-04-07 19:01:33 -0700449 if (stringName != null) {
450 sb.append(stringName);
451 sb.append(" U=");
452 sb.append(userId);
453 sb.append(" sz=");
454 sb.append(mActivities.size());
455 sb.append('}');
456 return sb.toString();
457 }
Dianne Hackborn1d442e02009-04-20 18:14:05 -0700458 sb.append("TaskRecord{");
459 sb.append(Integer.toHexString(System.identityHashCode(this)));
460 sb.append(" #");
461 sb.append(taskId);
462 if (affinity != null) {
Craig Mautner5d9c7be2013-02-15 14:02:56 -0800463 sb.append(" A=");
Dianne Hackborn1d442e02009-04-20 18:14:05 -0700464 sb.append(affinity);
465 } else if (intent != null) {
Craig Mautner5d9c7be2013-02-15 14:02:56 -0800466 sb.append(" I=");
Dianne Hackborn1d442e02009-04-20 18:14:05 -0700467 sb.append(intent.getComponent().flattenToShortString());
468 } else if (affinityIntent != null) {
Craig Mautner5d9c7be2013-02-15 14:02:56 -0800469 sb.append(" aI=");
Dianne Hackborn1d442e02009-04-20 18:14:05 -0700470 sb.append(affinityIntent.getComponent().flattenToShortString());
471 } else {
472 sb.append(" ??");
473 }
Craig Mautnerde4ef022013-04-07 19:01:33 -0700474 stringName = sb.toString();
475 return toString();
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800476 }
477}