The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1 | /* |
| 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 | |
| 17 | package com.android.server.am; |
| 18 | |
| 19 | import com.android.server.AttributeCache; |
Dianne Hackborn | 50dc3bc | 2010-06-25 10:05:59 -0700 | [diff] [blame] | 20 | import com.android.server.am.ActivityStack.ActivityState; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 21 | |
| 22 | import android.app.Activity; |
| 23 | import android.content.ComponentName; |
| 24 | import android.content.Intent; |
| 25 | import android.content.pm.ActivityInfo; |
| 26 | import android.content.pm.ApplicationInfo; |
| 27 | import android.content.res.Configuration; |
| 28 | import android.graphics.Bitmap; |
Dianne Hackborn | 247fe74 | 2011-01-08 17:25:57 -0800 | [diff] [blame] | 29 | import android.os.Build; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 30 | import android.os.Bundle; |
| 31 | import android.os.Message; |
| 32 | import android.os.Process; |
Dianne Hackborn | 39792d2 | 2010-08-19 18:01:52 -0700 | [diff] [blame] | 33 | import android.os.RemoteException; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 34 | import android.os.SystemClock; |
| 35 | import android.util.EventLog; |
| 36 | import android.util.Log; |
Dianne Hackborn | 50dc3bc | 2010-06-25 10:05:59 -0700 | [diff] [blame] | 37 | import android.util.Slog; |
Dianne Hackborn | 0dad364 | 2010-09-09 21:25:35 -0700 | [diff] [blame] | 38 | import android.util.TimeUtils; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 39 | import android.view.IApplicationToken; |
Dianne Hackborn | 7eec10e | 2010-11-12 18:03:47 -0800 | [diff] [blame] | 40 | import android.view.WindowManager; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 41 | |
| 42 | import java.io.PrintWriter; |
| 43 | import java.lang.ref.WeakReference; |
| 44 | import java.util.ArrayList; |
| 45 | import java.util.HashSet; |
| 46 | |
| 47 | /** |
| 48 | * An entry in the history stack, representing an activity. |
| 49 | */ |
Dianne Hackborn | 7e26964 | 2010-08-25 19:50:20 -0700 | [diff] [blame] | 50 | class ActivityRecord extends IApplicationToken.Stub { |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 51 | final ActivityManagerService service; // owner |
Dianne Hackborn | 50dc3bc | 2010-06-25 10:05:59 -0700 | [diff] [blame] | 52 | final ActivityStack stack; // owner |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 53 | final ActivityInfo info; // all about me |
| 54 | final int launchedFromUid; // always the uid who started the activity. |
| 55 | final Intent intent; // the original intent that generated us |
| 56 | final ComponentName realActivity; // the intent component, or target of an alias. |
| 57 | final String shortComponentName; // the short component name of the intent |
| 58 | final String resolvedType; // as per original caller; |
| 59 | final String packageName; // the package implementing intent's component |
| 60 | final String processName; // process where this component wants to run |
| 61 | final String taskAffinity; // as per ActivityInfo.taskAffinity |
| 62 | final boolean stateNotNeeded; // As per ActivityInfo.flags |
Dianne Hackborn | ff801ec | 2011-01-22 18:05:38 -0800 | [diff] [blame] | 63 | final boolean fullscreen; // covers the full screen? |
| 64 | final boolean noDisplay; // activity is not displayed? |
The Android Open Source Project | 4df2423 | 2009-03-05 14:34:35 -0800 | [diff] [blame] | 65 | final boolean componentSpecified; // did caller specifiy an explicit component? |
| 66 | final boolean isHomeActivity; // do we consider this to be a home activity? |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 67 | final String baseDir; // where activity source (resources etc) located |
| 68 | final String resDir; // where public activity source (public resources etc) located |
| 69 | final String dataDir; // where activity data should go |
| 70 | CharSequence nonLocalizedLabel; // the label information from the package mgr. |
| 71 | int labelRes; // the label information from the package mgr. |
| 72 | int icon; // resource identifier of activity's icon. |
| 73 | int theme; // resource identifier of activity's theme. |
Dianne Hackborn | 247fe74 | 2011-01-08 17:25:57 -0800 | [diff] [blame] | 74 | int realTheme; // actual theme resource we will use, never 0. |
Dianne Hackborn | 7eec10e | 2010-11-12 18:03:47 -0800 | [diff] [blame] | 75 | int windowFlags; // custom window flags for preview window. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 76 | TaskRecord task; // the task this is in. |
Dianne Hackborn | 0dad364 | 2010-09-09 21:25:35 -0700 | [diff] [blame] | 77 | long launchTime; // when we starting launching this activity |
| 78 | long startTime; // last time this activity was started |
Amith Yamasani | eaeb663 | 2009-06-03 15:16:10 -0700 | [diff] [blame] | 79 | long cpuTimeAtResume; // the cpu time of host process at the time of resuming activity |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 80 | Configuration configuration; // configuration activity was last running in |
Dianne Hackborn | 01e4cfc | 2010-06-24 15:07:24 -0700 | [diff] [blame] | 81 | ActivityRecord resultTo; // who started this entry, so will get our reply |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 82 | final String resultWho; // additional identifier for use by resultTo. |
| 83 | final int requestCode; // code given by requester (resultTo) |
| 84 | ArrayList results; // pending ActivityResult objs we have received |
| 85 | HashSet<WeakReference<PendingIntentRecord>> pendingResults; // all pending intents for this act |
| 86 | ArrayList newIntents; // any pending new intents for single-top mode |
| 87 | HashSet<ConnectionRecord> connections; // All ConnectionRecord we hold |
Dianne Hackborn | 7e26964 | 2010-08-25 19:50:20 -0700 | [diff] [blame] | 88 | UriPermissionOwner uriPermissions; // current special URI access perms. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 89 | ProcessRecord app; // if non-null, hosting application |
| 90 | Bitmap thumbnail; // icon representation of paused screen |
| 91 | CharSequence description; // textual description of paused screen |
Dianne Hackborn | 50dc3bc | 2010-06-25 10:05:59 -0700 | [diff] [blame] | 92 | ActivityState state; // current state we are in |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 93 | Bundle icicle; // last saved activity state |
| 94 | boolean frontOfTask; // is this the root activity of its task? |
| 95 | boolean launchFailed; // set if a launched failed, to abort on 2nd try |
| 96 | boolean haveState; // have we gotten the last activity state? |
| 97 | boolean stopped; // is activity pause finished? |
Dianne Hackborn | 95fc68f | 2009-05-19 18:37:45 -0700 | [diff] [blame] | 98 | boolean delayedResume; // not yet resumed because of stopped app switches? |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 99 | boolean finishing; // activity in pending finish list? |
| 100 | boolean configDestroy; // need to destroy due to config change? |
| 101 | int configChangeFlags; // which config values have changed |
| 102 | boolean keysPaused; // has key dispatching been paused for it? |
| 103 | boolean inHistory; // are we in the history stack? |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 104 | int launchMode; // the launch mode activity attribute. |
| 105 | boolean visible; // does this activity's window need to be shown? |
Dianne Hackborn | 4eba96b | 2011-01-21 13:34:36 -0800 | [diff] [blame] | 106 | boolean sleeping; // have we told the activity to sleep? |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 107 | boolean waitingVisible; // true if waiting for a new act to become vis |
| 108 | boolean nowVisible; // is this activity's window visible? |
| 109 | boolean thumbnailNeeded;// has someone requested a thumbnail? |
| 110 | boolean idle; // has the activity gone idle? |
| 111 | boolean hasBeenLaunched;// has this activity ever been launched? |
| 112 | boolean frozenBeforeDestroy;// has been frozen but not yet destroyed. |
Daniel Sandler | 69a4817 | 2010-06-23 16:29:36 -0400 | [diff] [blame] | 113 | boolean immersive; // immersive mode (don't interrupt if possible) |
Dianne Hackborn | e2515ee | 2011-04-27 18:52:56 -0400 | [diff] [blame] | 114 | boolean forceNewConfig; // force re-create with new config next time |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 115 | |
Dianne Hackborn | f210d6b | 2009-04-13 18:42:49 -0700 | [diff] [blame] | 116 | String stringName; // for caching of toString(). |
| 117 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 118 | void dump(PrintWriter pw, String prefix) { |
Dianne Hackborn | f210d6b | 2009-04-13 18:42:49 -0700 | [diff] [blame] | 119 | pw.print(prefix); pw.print("packageName="); pw.print(packageName); |
| 120 | pw.print(" processName="); pw.println(processName); |
| 121 | pw.print(prefix); pw.print("launchedFromUid="); pw.print(launchedFromUid); |
| 122 | pw.print(" app="); pw.println(app); |
| 123 | pw.print(prefix); pw.println(intent); |
| 124 | pw.print(prefix); pw.print("frontOfTask="); pw.print(frontOfTask); |
| 125 | pw.print(" task="); pw.println(task); |
| 126 | pw.print(prefix); pw.print("taskAffinity="); pw.println(taskAffinity); |
Dianne Hackborn | 1d442e0 | 2009-04-20 18:14:05 -0700 | [diff] [blame] | 127 | pw.print(prefix); pw.print("realActivity="); |
| 128 | pw.println(realActivity.flattenToShortString()); |
| 129 | pw.print(prefix); pw.print("base="); pw.print(baseDir); |
| 130 | if (!resDir.equals(baseDir)) pw.print(" res="); pw.print(resDir); |
Dianne Hackborn | f210d6b | 2009-04-13 18:42:49 -0700 | [diff] [blame] | 131 | pw.print(" data="); pw.println(dataDir); |
| 132 | pw.print(prefix); pw.print("labelRes=0x"); |
| 133 | pw.print(Integer.toHexString(labelRes)); |
| 134 | pw.print(" icon=0x"); pw.print(Integer.toHexString(icon)); |
| 135 | pw.print(" theme=0x"); pw.println(Integer.toHexString(theme)); |
| 136 | pw.print(prefix); pw.print("stateNotNeeded="); pw.print(stateNotNeeded); |
| 137 | pw.print(" componentSpecified="); pw.print(componentSpecified); |
| 138 | pw.print(" isHomeActivity="); pw.println(isHomeActivity); |
| 139 | pw.print(prefix); pw.print("configuration="); pw.println(configuration); |
| 140 | if (resultTo != null || resultWho != null) { |
| 141 | pw.print(prefix); pw.print("resultTo="); pw.print(resultTo); |
| 142 | pw.print(" resultWho="); pw.print(resultWho); |
| 143 | pw.print(" resultCode="); pw.println(requestCode); |
| 144 | } |
| 145 | if (results != null) { |
| 146 | pw.print(prefix); pw.print("results="); pw.println(results); |
| 147 | } |
| 148 | if (pendingResults != null) { |
| 149 | pw.print(prefix); pw.print("pendingResults="); pw.println(pendingResults); |
| 150 | } |
Dianne Hackborn | 7e26964 | 2010-08-25 19:50:20 -0700 | [diff] [blame] | 151 | if (uriPermissions != null) { |
| 152 | if (uriPermissions.readUriPermissions != null) { |
| 153 | pw.print(prefix); pw.print("readUriPermissions="); |
| 154 | pw.println(uriPermissions.readUriPermissions); |
| 155 | } |
| 156 | if (uriPermissions.writeUriPermissions != null) { |
| 157 | pw.print(prefix); pw.print("writeUriPermissions="); |
| 158 | pw.println(uriPermissions.writeUriPermissions); |
| 159 | } |
Dianne Hackborn | f210d6b | 2009-04-13 18:42:49 -0700 | [diff] [blame] | 160 | } |
| 161 | pw.print(prefix); pw.print("launchFailed="); pw.print(launchFailed); |
| 162 | pw.print(" haveState="); pw.print(haveState); |
| 163 | pw.print(" icicle="); pw.println(icicle); |
| 164 | pw.print(prefix); pw.print("state="); pw.print(state); |
| 165 | pw.print(" stopped="); pw.print(stopped); |
Dianne Hackborn | 95fc68f | 2009-05-19 18:37:45 -0700 | [diff] [blame] | 166 | pw.print(" delayedResume="); pw.print(delayedResume); |
Dianne Hackborn | f210d6b | 2009-04-13 18:42:49 -0700 | [diff] [blame] | 167 | pw.print(" finishing="); pw.println(finishing); |
| 168 | pw.print(prefix); pw.print("keysPaused="); pw.print(keysPaused); |
| 169 | pw.print(" inHistory="); pw.print(inHistory); |
Dianne Hackborn | f210d6b | 2009-04-13 18:42:49 -0700 | [diff] [blame] | 170 | pw.print(" visible="); pw.print(visible); |
Dianne Hackborn | 4eba96b | 2011-01-21 13:34:36 -0800 | [diff] [blame] | 171 | pw.print(" sleeping="); pw.print(sleeping); |
Dianne Hackborn | f210d6b | 2009-04-13 18:42:49 -0700 | [diff] [blame] | 172 | pw.print(" idle="); pw.println(idle); |
Dianne Hackborn | ff801ec | 2011-01-22 18:05:38 -0800 | [diff] [blame] | 173 | pw.print(prefix); pw.print("fullscreen="); pw.print(fullscreen); |
| 174 | pw.print(" noDisplay="); pw.print(noDisplay); |
| 175 | pw.print(" immersive="); pw.print(immersive); |
| 176 | pw.print(" launchMode="); pw.println(launchMode); |
Dianne Hackborn | 4eba96b | 2011-01-21 13:34:36 -0800 | [diff] [blame] | 177 | pw.print(prefix); pw.print("frozenBeforeDestroy="); pw.print(frozenBeforeDestroy); |
Dianne Hackborn | e2515ee | 2011-04-27 18:52:56 -0400 | [diff] [blame] | 178 | pw.print(" thumbnailNeeded="); pw.print(thumbnailNeeded); |
| 179 | pw.print(" forceNewConfig="); pw.println(forceNewConfig); |
Dianne Hackborn | 0dad364 | 2010-09-09 21:25:35 -0700 | [diff] [blame] | 180 | if (launchTime != 0 || startTime != 0) { |
| 181 | pw.print(prefix); pw.print("launchTime="); |
| 182 | TimeUtils.formatDuration(launchTime, pw); pw.print(" startTime="); |
| 183 | TimeUtils.formatDuration(startTime, pw); pw.println(""); |
| 184 | } |
Dianne Hackborn | f210d6b | 2009-04-13 18:42:49 -0700 | [diff] [blame] | 185 | if (waitingVisible || nowVisible) { |
| 186 | pw.print(prefix); pw.print("waitingVisible="); pw.print(waitingVisible); |
| 187 | pw.print(" nowVisible="); pw.println(nowVisible); |
| 188 | } |
| 189 | if (configDestroy || configChangeFlags != 0) { |
| 190 | pw.print(prefix); pw.print("configDestroy="); pw.print(configDestroy); |
| 191 | pw.print(" configChangeFlags="); |
| 192 | pw.println(Integer.toHexString(configChangeFlags)); |
| 193 | } |
| 194 | if (connections != null) { |
| 195 | pw.print(prefix); pw.print("connections="); pw.println(connections); |
| 196 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 197 | } |
| 198 | |
Dianne Hackborn | 50dc3bc | 2010-06-25 10:05:59 -0700 | [diff] [blame] | 199 | ActivityRecord(ActivityManagerService _service, ActivityStack _stack, ProcessRecord _caller, |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 200 | int _launchedFromUid, Intent _intent, String _resolvedType, |
| 201 | ActivityInfo aInfo, Configuration _configuration, |
Dianne Hackborn | 01e4cfc | 2010-06-24 15:07:24 -0700 | [diff] [blame] | 202 | ActivityRecord _resultTo, String _resultWho, int _reqCode, |
The Android Open Source Project | 4df2423 | 2009-03-05 14:34:35 -0800 | [diff] [blame] | 203 | boolean _componentSpecified) { |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 204 | service = _service; |
Dianne Hackborn | 50dc3bc | 2010-06-25 10:05:59 -0700 | [diff] [blame] | 205 | stack = _stack; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 206 | info = aInfo; |
| 207 | launchedFromUid = _launchedFromUid; |
| 208 | intent = _intent; |
| 209 | shortComponentName = _intent.getComponent().flattenToShortString(); |
| 210 | resolvedType = _resolvedType; |
The Android Open Source Project | 4df2423 | 2009-03-05 14:34:35 -0800 | [diff] [blame] | 211 | componentSpecified = _componentSpecified; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 212 | configuration = _configuration; |
| 213 | resultTo = _resultTo; |
| 214 | resultWho = _resultWho; |
| 215 | requestCode = _reqCode; |
Dianne Hackborn | 50dc3bc | 2010-06-25 10:05:59 -0700 | [diff] [blame] | 216 | state = ActivityState.INITIALIZING; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 217 | frontOfTask = false; |
| 218 | launchFailed = false; |
| 219 | haveState = false; |
| 220 | stopped = false; |
Dianne Hackborn | 95fc68f | 2009-05-19 18:37:45 -0700 | [diff] [blame] | 221 | delayedResume = false; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 222 | finishing = false; |
| 223 | configDestroy = false; |
| 224 | keysPaused = false; |
| 225 | inHistory = false; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 226 | visible = true; |
| 227 | waitingVisible = false; |
| 228 | nowVisible = false; |
| 229 | thumbnailNeeded = false; |
| 230 | idle = false; |
| 231 | hasBeenLaunched = false; |
| 232 | |
| 233 | if (aInfo != null) { |
| 234 | if (aInfo.targetActivity == null |
| 235 | || aInfo.launchMode == ActivityInfo.LAUNCH_MULTIPLE |
| 236 | || aInfo.launchMode == ActivityInfo.LAUNCH_SINGLE_TOP) { |
| 237 | realActivity = _intent.getComponent(); |
| 238 | } else { |
| 239 | realActivity = new ComponentName(aInfo.packageName, |
| 240 | aInfo.targetActivity); |
| 241 | } |
| 242 | taskAffinity = aInfo.taskAffinity; |
| 243 | stateNotNeeded = (aInfo.flags& |
| 244 | ActivityInfo.FLAG_STATE_NOT_NEEDED) != 0; |
| 245 | baseDir = aInfo.applicationInfo.sourceDir; |
| 246 | resDir = aInfo.applicationInfo.publicSourceDir; |
| 247 | dataDir = aInfo.applicationInfo.dataDir; |
| 248 | nonLocalizedLabel = aInfo.nonLocalizedLabel; |
| 249 | labelRes = aInfo.labelRes; |
| 250 | if (nonLocalizedLabel == null && labelRes == 0) { |
| 251 | ApplicationInfo app = aInfo.applicationInfo; |
| 252 | nonLocalizedLabel = app.nonLocalizedLabel; |
| 253 | labelRes = app.labelRes; |
| 254 | } |
| 255 | icon = aInfo.getIconResource(); |
| 256 | theme = aInfo.getThemeResource(); |
Dianne Hackborn | 247fe74 | 2011-01-08 17:25:57 -0800 | [diff] [blame] | 257 | realTheme = theme; |
| 258 | if (realTheme == 0) { |
| 259 | realTheme = aInfo.applicationInfo.targetSdkVersion |
| 260 | < Build.VERSION_CODES.HONEYCOMB |
| 261 | ? android.R.style.Theme |
| 262 | : android.R.style.Theme_Holo; |
| 263 | } |
Dianne Hackborn | 7eec10e | 2010-11-12 18:03:47 -0800 | [diff] [blame] | 264 | if ((aInfo.flags&ActivityInfo.FLAG_HARDWARE_ACCELERATED) != 0) { |
| 265 | windowFlags |= WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED; |
| 266 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 267 | if ((aInfo.flags&ActivityInfo.FLAG_MULTIPROCESS) != 0 |
| 268 | && _caller != null |
| 269 | && (aInfo.applicationInfo.uid == Process.SYSTEM_UID |
| 270 | || aInfo.applicationInfo.uid == _caller.info.uid)) { |
| 271 | processName = _caller.processName; |
| 272 | } else { |
| 273 | processName = aInfo.processName; |
| 274 | } |
| 275 | |
| 276 | if (intent != null && (aInfo.flags & ActivityInfo.FLAG_EXCLUDE_FROM_RECENTS) != 0) { |
| 277 | intent.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS); |
| 278 | } |
| 279 | |
| 280 | packageName = aInfo.applicationInfo.packageName; |
| 281 | launchMode = aInfo.launchMode; |
| 282 | |
| 283 | AttributeCache.Entry ent = AttributeCache.instance().get(packageName, |
Dianne Hackborn | 247fe74 | 2011-01-08 17:25:57 -0800 | [diff] [blame] | 284 | realTheme, com.android.internal.R.styleable.Window); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 285 | fullscreen = ent != null && !ent.array.getBoolean( |
| 286 | com.android.internal.R.styleable.Window_windowIsFloating, false) |
| 287 | && !ent.array.getBoolean( |
| 288 | com.android.internal.R.styleable.Window_windowIsTranslucent, false); |
Dianne Hackborn | ff801ec | 2011-01-22 18:05:38 -0800 | [diff] [blame] | 289 | noDisplay = ent != null && ent.array.getBoolean( |
| 290 | com.android.internal.R.styleable.Window_windowNoDisplay, false); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 291 | |
The Android Open Source Project | 4df2423 | 2009-03-05 14:34:35 -0800 | [diff] [blame] | 292 | if (!_componentSpecified || _launchedFromUid == Process.myUid() |
| 293 | || _launchedFromUid == 0) { |
| 294 | // If we know the system has determined the component, then |
| 295 | // we can consider this to be a home activity... |
| 296 | if (Intent.ACTION_MAIN.equals(_intent.getAction()) && |
| 297 | _intent.hasCategory(Intent.CATEGORY_HOME) && |
| 298 | _intent.getCategories().size() == 1 && |
| 299 | _intent.getData() == null && |
| 300 | _intent.getType() == null && |
| 301 | (intent.getFlags()&Intent.FLAG_ACTIVITY_NEW_TASK) != 0 && |
| 302 | !"android".equals(realActivity.getClassName())) { |
| 303 | // This sure looks like a home activity! |
| 304 | // Note the last check is so we don't count the resolver |
| 305 | // activity as being home... really, we don't care about |
| 306 | // doing anything special with something that comes from |
| 307 | // the core framework package. |
| 308 | isHomeActivity = true; |
| 309 | } else { |
| 310 | isHomeActivity = false; |
| 311 | } |
| 312 | } else { |
| 313 | isHomeActivity = false; |
| 314 | } |
Daniel Sandler | 69a4817 | 2010-06-23 16:29:36 -0400 | [diff] [blame] | 315 | |
| 316 | immersive = (aInfo.flags & ActivityInfo.FLAG_IMMERSIVE) != 0; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 317 | } else { |
| 318 | realActivity = null; |
| 319 | taskAffinity = null; |
| 320 | stateNotNeeded = false; |
| 321 | baseDir = null; |
| 322 | resDir = null; |
| 323 | dataDir = null; |
| 324 | processName = null; |
| 325 | packageName = null; |
| 326 | fullscreen = true; |
Dianne Hackborn | ff801ec | 2011-01-22 18:05:38 -0800 | [diff] [blame] | 327 | noDisplay = false; |
The Android Open Source Project | 4df2423 | 2009-03-05 14:34:35 -0800 | [diff] [blame] | 328 | isHomeActivity = false; |
Daniel Sandler | 69a4817 | 2010-06-23 16:29:36 -0400 | [diff] [blame] | 329 | immersive = false; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 330 | } |
| 331 | } |
| 332 | |
Dianne Hackborn | 94cb2eb | 2011-01-13 21:09:44 -0800 | [diff] [blame] | 333 | void makeFinishing() { |
| 334 | if (!finishing) { |
| 335 | finishing = true; |
| 336 | if (task != null) { |
| 337 | task.numActivities--; |
| 338 | } |
| 339 | } |
| 340 | } |
| 341 | |
Dianne Hackborn | 7e26964 | 2010-08-25 19:50:20 -0700 | [diff] [blame] | 342 | UriPermissionOwner getUriPermissionsLocked() { |
| 343 | if (uriPermissions == null) { |
| 344 | uriPermissions = new UriPermissionOwner(service, this); |
| 345 | } |
| 346 | return uriPermissions; |
| 347 | } |
| 348 | |
Dianne Hackborn | 01e4cfc | 2010-06-24 15:07:24 -0700 | [diff] [blame] | 349 | void addResultLocked(ActivityRecord from, String resultWho, |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 350 | int requestCode, int resultCode, |
| 351 | Intent resultData) { |
| 352 | ActivityResult r = new ActivityResult(from, resultWho, |
| 353 | requestCode, resultCode, resultData); |
| 354 | if (results == null) { |
| 355 | results = new ArrayList(); |
| 356 | } |
| 357 | results.add(r); |
| 358 | } |
| 359 | |
Dianne Hackborn | 01e4cfc | 2010-06-24 15:07:24 -0700 | [diff] [blame] | 360 | void removeResultsLocked(ActivityRecord from, String resultWho, |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 361 | int requestCode) { |
| 362 | if (results != null) { |
| 363 | for (int i=results.size()-1; i>=0; i--) { |
| 364 | ActivityResult r = (ActivityResult)results.get(i); |
| 365 | if (r.mFrom != from) continue; |
| 366 | if (r.mResultWho == null) { |
| 367 | if (resultWho != null) continue; |
| 368 | } else { |
| 369 | if (!r.mResultWho.equals(resultWho)) continue; |
| 370 | } |
| 371 | if (r.mRequestCode != requestCode) continue; |
| 372 | |
| 373 | results.remove(i); |
| 374 | } |
| 375 | } |
| 376 | } |
| 377 | |
| 378 | void addNewIntentLocked(Intent intent) { |
| 379 | if (newIntents == null) { |
| 380 | newIntents = new ArrayList(); |
| 381 | } |
| 382 | newIntents.add(intent); |
| 383 | } |
Dianne Hackborn | 50dc3bc | 2010-06-25 10:05:59 -0700 | [diff] [blame] | 384 | |
| 385 | /** |
| 386 | * Deliver a new Intent to an existing activity, so that its onNewIntent() |
| 387 | * method will be called at the proper time. |
| 388 | */ |
Dianne Hackborn | 39792d2 | 2010-08-19 18:01:52 -0700 | [diff] [blame] | 389 | final void deliverNewIntentLocked(int callingUid, Intent intent) { |
Dianne Hackborn | 50dc3bc | 2010-06-25 10:05:59 -0700 | [diff] [blame] | 390 | boolean sent = false; |
| 391 | if (state == ActivityState.RESUMED |
| 392 | && app != null && app.thread != null) { |
| 393 | try { |
| 394 | ArrayList<Intent> ar = new ArrayList<Intent>(); |
Dianne Hackborn | 39792d2 | 2010-08-19 18:01:52 -0700 | [diff] [blame] | 395 | intent = new Intent(intent); |
| 396 | ar.add(intent); |
| 397 | service.grantUriPermissionFromIntentLocked(callingUid, packageName, |
Dianne Hackborn | 7e26964 | 2010-08-25 19:50:20 -0700 | [diff] [blame] | 398 | intent, getUriPermissionsLocked()); |
Dianne Hackborn | 50dc3bc | 2010-06-25 10:05:59 -0700 | [diff] [blame] | 399 | app.thread.scheduleNewIntent(ar, this); |
| 400 | sent = true; |
Dianne Hackborn | 39792d2 | 2010-08-19 18:01:52 -0700 | [diff] [blame] | 401 | } catch (RemoteException e) { |
| 402 | Slog.w(ActivityManagerService.TAG, |
| 403 | "Exception thrown sending new intent to " + this, e); |
| 404 | } catch (NullPointerException e) { |
Dianne Hackborn | 50dc3bc | 2010-06-25 10:05:59 -0700 | [diff] [blame] | 405 | Slog.w(ActivityManagerService.TAG, |
| 406 | "Exception thrown sending new intent to " + this, e); |
| 407 | } |
| 408 | } |
| 409 | if (!sent) { |
| 410 | addNewIntentLocked(new Intent(intent)); |
| 411 | } |
| 412 | } |
| 413 | |
| 414 | void removeUriPermissionsLocked() { |
Dianne Hackborn | 7e26964 | 2010-08-25 19:50:20 -0700 | [diff] [blame] | 415 | if (uriPermissions != null) { |
| 416 | uriPermissions.removeUriPermissionsLocked(); |
| 417 | uriPermissions = null; |
Dianne Hackborn | 50dc3bc | 2010-06-25 10:05:59 -0700 | [diff] [blame] | 418 | } |
| 419 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 420 | |
| 421 | void pauseKeyDispatchingLocked() { |
| 422 | if (!keysPaused) { |
| 423 | keysPaused = true; |
| 424 | service.mWindowManager.pauseKeyDispatching(this); |
| 425 | } |
| 426 | } |
| 427 | |
| 428 | void resumeKeyDispatchingLocked() { |
| 429 | if (keysPaused) { |
| 430 | keysPaused = false; |
| 431 | service.mWindowManager.resumeKeyDispatching(this); |
| 432 | } |
| 433 | } |
| 434 | |
| 435 | // IApplicationToken |
| 436 | |
| 437 | public boolean mayFreezeScreenLocked(ProcessRecord app) { |
| 438 | // Only freeze the screen if this activity is currently attached to |
| 439 | // an application, and that application is not blocked or unresponding. |
| 440 | // In any other case, we can't count on getting the screen unfrozen, |
| 441 | // so it is best to leave as-is. |
Dianne Hackborn | 5f4d643 | 2010-12-21 20:40:11 -0800 | [diff] [blame] | 442 | return app != null && !app.crashing && !app.notResponding; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 443 | } |
| 444 | |
| 445 | public void startFreezingScreenLocked(ProcessRecord app, int configChanges) { |
| 446 | if (mayFreezeScreenLocked(app)) { |
| 447 | service.mWindowManager.startAppFreezingScreen(this, configChanges); |
| 448 | } |
| 449 | } |
| 450 | |
| 451 | public void stopFreezingScreenLocked(boolean force) { |
| 452 | if (force || frozenBeforeDestroy) { |
| 453 | frozenBeforeDestroy = false; |
| 454 | service.mWindowManager.stopAppFreezingScreen(this, force); |
| 455 | } |
| 456 | } |
| 457 | |
| 458 | public void windowsVisible() { |
| 459 | synchronized(service) { |
Dianne Hackborn | 0dad364 | 2010-09-09 21:25:35 -0700 | [diff] [blame] | 460 | if (launchTime != 0) { |
Dianne Hackborn | f210d6b | 2009-04-13 18:42:49 -0700 | [diff] [blame] | 461 | final long curTime = SystemClock.uptimeMillis(); |
Dianne Hackborn | 0dad364 | 2010-09-09 21:25:35 -0700 | [diff] [blame] | 462 | final long thisTime = curTime - launchTime; |
Dianne Hackborn | 50dc3bc | 2010-06-25 10:05:59 -0700 | [diff] [blame] | 463 | final long totalTime = stack.mInitialStartTime != 0 |
| 464 | ? (curTime - stack.mInitialStartTime) : thisTime; |
Dianne Hackborn | 6447ca3 | 2009-04-07 19:50:08 -0700 | [diff] [blame] | 465 | if (ActivityManagerService.SHOW_ACTIVITY_START_TIME) { |
Doug Zongker | 2bec3d4 | 2009-12-04 12:52:44 -0800 | [diff] [blame] | 466 | EventLog.writeEvent(EventLogTags.ACTIVITY_LAUNCH_TIME, |
Dianne Hackborn | f210d6b | 2009-04-13 18:42:49 -0700 | [diff] [blame] | 467 | System.identityHashCode(this), shortComponentName, |
| 468 | thisTime, totalTime); |
| 469 | StringBuilder sb = service.mStringBuilder; |
| 470 | sb.setLength(0); |
Dianne Hackborn | 0dad364 | 2010-09-09 21:25:35 -0700 | [diff] [blame] | 471 | sb.append("Displayed "); |
Dianne Hackborn | f210d6b | 2009-04-13 18:42:49 -0700 | [diff] [blame] | 472 | sb.append(shortComponentName); |
| 473 | sb.append(": "); |
Dianne Hackborn | 0dad364 | 2010-09-09 21:25:35 -0700 | [diff] [blame] | 474 | TimeUtils.formatDuration(thisTime, sb); |
Dianne Hackborn | cef65ee | 2010-09-30 18:27:22 -0700 | [diff] [blame] | 475 | if (thisTime != totalTime) { |
| 476 | sb.append(" (total "); |
| 477 | TimeUtils.formatDuration(totalTime, sb); |
| 478 | sb.append(")"); |
| 479 | } |
Dianne Hackborn | f210d6b | 2009-04-13 18:42:49 -0700 | [diff] [blame] | 480 | Log.i(ActivityManagerService.TAG, sb.toString()); |
Dianne Hackborn | 6447ca3 | 2009-04-07 19:50:08 -0700 | [diff] [blame] | 481 | } |
Dianne Hackborn | 50dc3bc | 2010-06-25 10:05:59 -0700 | [diff] [blame] | 482 | stack.reportActivityLaunchedLocked(false, this, thisTime, totalTime); |
Dianne Hackborn | f210d6b | 2009-04-13 18:42:49 -0700 | [diff] [blame] | 483 | if (totalTime > 0) { |
| 484 | service.mUsageStatsService.noteLaunchTime(realActivity, (int)totalTime); |
Dianne Hackborn | 6447ca3 | 2009-04-07 19:50:08 -0700 | [diff] [blame] | 485 | } |
Dianne Hackborn | 0dad364 | 2010-09-09 21:25:35 -0700 | [diff] [blame] | 486 | launchTime = 0; |
Dianne Hackborn | 50dc3bc | 2010-06-25 10:05:59 -0700 | [diff] [blame] | 487 | stack.mInitialStartTime = 0; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 488 | } |
Dianne Hackborn | 0dad364 | 2010-09-09 21:25:35 -0700 | [diff] [blame] | 489 | startTime = 0; |
Dianne Hackborn | 50dc3bc | 2010-06-25 10:05:59 -0700 | [diff] [blame] | 490 | stack.reportActivityVisibleLocked(this); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 491 | if (ActivityManagerService.DEBUG_SWITCH) Log.v( |
| 492 | ActivityManagerService.TAG, "windowsVisible(): " + this); |
| 493 | if (!nowVisible) { |
| 494 | nowVisible = true; |
| 495 | if (!idle) { |
| 496 | // Instead of doing the full stop routine here, let's just |
| 497 | // hide any activities we now can, and let them stop when |
| 498 | // the normal idle happens. |
Dianne Hackborn | 50dc3bc | 2010-06-25 10:05:59 -0700 | [diff] [blame] | 499 | stack.processStoppingActivitiesLocked(false); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 500 | } else { |
| 501 | // If this activity was already idle, then we now need to |
| 502 | // make sure we perform the full stop of any activities |
| 503 | // that are waiting to do so. This is because we won't |
| 504 | // do that while they are still waiting for this one to |
| 505 | // become visible. |
Dianne Hackborn | 50dc3bc | 2010-06-25 10:05:59 -0700 | [diff] [blame] | 506 | final int N = stack.mWaitingVisibleActivities.size(); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 507 | if (N > 0) { |
| 508 | for (int i=0; i<N; i++) { |
Dianne Hackborn | 01e4cfc | 2010-06-24 15:07:24 -0700 | [diff] [blame] | 509 | ActivityRecord r = (ActivityRecord) |
Dianne Hackborn | 50dc3bc | 2010-06-25 10:05:59 -0700 | [diff] [blame] | 510 | stack.mWaitingVisibleActivities.get(i); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 511 | r.waitingVisible = false; |
| 512 | if (ActivityManagerService.DEBUG_SWITCH) Log.v( |
| 513 | ActivityManagerService.TAG, |
| 514 | "Was waiting for visible: " + r); |
| 515 | } |
Dianne Hackborn | 50dc3bc | 2010-06-25 10:05:59 -0700 | [diff] [blame] | 516 | stack.mWaitingVisibleActivities.clear(); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 517 | Message msg = Message.obtain(); |
Dianne Hackborn | 50dc3bc | 2010-06-25 10:05:59 -0700 | [diff] [blame] | 518 | msg.what = ActivityStack.IDLE_NOW_MSG; |
| 519 | stack.mHandler.sendMessage(msg); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 520 | } |
| 521 | } |
| 522 | service.scheduleAppGcsLocked(); |
| 523 | } |
| 524 | } |
| 525 | } |
| 526 | |
| 527 | public void windowsGone() { |
| 528 | if (ActivityManagerService.DEBUG_SWITCH) Log.v( |
| 529 | ActivityManagerService.TAG, "windowsGone(): " + this); |
| 530 | nowVisible = false; |
| 531 | } |
| 532 | |
Dianne Hackborn | 01e4cfc | 2010-06-24 15:07:24 -0700 | [diff] [blame] | 533 | private ActivityRecord getWaitingHistoryRecordLocked() { |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 534 | // First find the real culprit... if we are waiting |
| 535 | // for another app to start, then we have paused dispatching |
| 536 | // for this activity. |
Dianne Hackborn | 01e4cfc | 2010-06-24 15:07:24 -0700 | [diff] [blame] | 537 | ActivityRecord r = this; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 538 | if (r.waitingVisible) { |
| 539 | // Hmmm, who might we be waiting for? |
Dianne Hackborn | 50dc3bc | 2010-06-25 10:05:59 -0700 | [diff] [blame] | 540 | r = stack.mResumedActivity; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 541 | if (r == null) { |
Dianne Hackborn | 50dc3bc | 2010-06-25 10:05:59 -0700 | [diff] [blame] | 542 | r = stack.mPausingActivity; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 543 | } |
| 544 | // Both of those null? Fall back to 'this' again |
| 545 | if (r == null) { |
| 546 | r = this; |
| 547 | } |
| 548 | } |
| 549 | |
| 550 | return r; |
| 551 | } |
| 552 | |
| 553 | public boolean keyDispatchingTimedOut() { |
Dianne Hackborn | 01e4cfc | 2010-06-24 15:07:24 -0700 | [diff] [blame] | 554 | ActivityRecord r; |
Dianne Hackborn | ad5499d | 2010-03-29 18:08:45 -0700 | [diff] [blame] | 555 | ProcessRecord anrApp = null; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 556 | synchronized(service) { |
Dianne Hackborn | ad5499d | 2010-03-29 18:08:45 -0700 | [diff] [blame] | 557 | r = getWaitingHistoryRecordLocked(); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 558 | if (r != null && r.app != null) { |
| 559 | if (r.app.debugging) { |
| 560 | return false; |
| 561 | } |
| 562 | |
Dianne Hackborn | 5c1e00b | 2009-06-18 17:10:57 -0700 | [diff] [blame] | 563 | if (service.mDidDexOpt) { |
| 564 | // Give more time since we were dexopting. |
| 565 | service.mDidDexOpt = false; |
| 566 | return false; |
| 567 | } |
| 568 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 569 | if (r.app.instrumentationClass == null) { |
Dianne Hackborn | ad5499d | 2010-03-29 18:08:45 -0700 | [diff] [blame] | 570 | anrApp = r.app; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 571 | } else { |
| 572 | Bundle info = new Bundle(); |
| 573 | info.putString("shortMsg", "keyDispatchingTimedOut"); |
| 574 | info.putString("longMsg", "Timed out while dispatching key event"); |
| 575 | service.finishInstrumentationLocked( |
| 576 | r.app, Activity.RESULT_CANCELED, info); |
| 577 | } |
| 578 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 579 | } |
Dianne Hackborn | ad5499d | 2010-03-29 18:08:45 -0700 | [diff] [blame] | 580 | |
| 581 | if (anrApp != null) { |
| 582 | service.appNotResponding(anrApp, r, this, |
| 583 | "keyDispatchingTimedOut"); |
| 584 | } |
| 585 | |
| 586 | return true; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 587 | } |
| 588 | |
| 589 | /** Returns the key dispatching timeout for this application token. */ |
| 590 | public long getKeyDispatchingTimeout() { |
| 591 | synchronized(service) { |
Dianne Hackborn | 01e4cfc | 2010-06-24 15:07:24 -0700 | [diff] [blame] | 592 | ActivityRecord r = getWaitingHistoryRecordLocked(); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 593 | if (r == null || r.app == null |
| 594 | || r.app.instrumentationClass == null) { |
| 595 | return ActivityManagerService.KEY_DISPATCHING_TIMEOUT; |
| 596 | } |
| 597 | |
| 598 | return ActivityManagerService.INSTRUMENTATION_KEY_DISPATCHING_TIMEOUT; |
| 599 | } |
| 600 | } |
| 601 | |
| 602 | /** |
| 603 | * This method will return true if the activity is either visible, is becoming visible, is |
| 604 | * currently pausing, or is resumed. |
| 605 | */ |
| 606 | public boolean isInterestingToUserLocked() { |
| 607 | return visible || nowVisible || state == ActivityState.PAUSING || |
| 608 | state == ActivityState.RESUMED; |
Dianne Hackborn | 4eba96b | 2011-01-21 13:34:36 -0800 | [diff] [blame] | 609 | } |
| 610 | |
| 611 | public void setSleeping(boolean _sleeping) { |
| 612 | if (sleeping == _sleeping) { |
| 613 | return; |
| 614 | } |
| 615 | if (app != null && app.thread != null) { |
| 616 | try { |
| 617 | app.thread.scheduleSleeping(this, _sleeping); |
| 618 | if (sleeping && !stack.mGoingToSleepActivities.contains(this)) { |
| 619 | stack.mGoingToSleepActivities.add(this); |
| 620 | } |
| 621 | sleeping = _sleeping; |
| 622 | } catch (RemoteException e) { |
| 623 | Slog.w(ActivityStack.TAG, "Exception thrown when sleeping: " |
| 624 | + intent.getComponent(), e); |
| 625 | } |
| 626 | } |
| 627 | } |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 628 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 629 | public String toString() { |
Dianne Hackborn | f210d6b | 2009-04-13 18:42:49 -0700 | [diff] [blame] | 630 | if (stringName != null) { |
| 631 | return stringName; |
| 632 | } |
| 633 | StringBuilder sb = new StringBuilder(128); |
Dianne Hackborn | 30d7189 | 2010-12-11 10:37:55 -0800 | [diff] [blame] | 634 | sb.append("ActivityRecord{"); |
Dianne Hackborn | f210d6b | 2009-04-13 18:42:49 -0700 | [diff] [blame] | 635 | sb.append(Integer.toHexString(System.identityHashCode(this))); |
| 636 | sb.append(' '); |
Dianne Hackborn | 1d442e0 | 2009-04-20 18:14:05 -0700 | [diff] [blame] | 637 | sb.append(intent.getComponent().flattenToShortString()); |
Dianne Hackborn | f210d6b | 2009-04-13 18:42:49 -0700 | [diff] [blame] | 638 | sb.append('}'); |
| 639 | return stringName = sb.toString(); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 640 | } |
| 641 | } |