Exemplo n.º 1
0
			internal ActivityClientRecord()
			{
				// List of new activities (via ActivityRecord.nextIdle) that should
				// be reported when next we idle.
				// Number of activities that are currently visible on-screen.
				// set of instantiated backup agents, keyed by package name
				// These can be accessed by multiple threads; mPackages is the lock.
				// XXX For now we keep around information about all packages we have
				// seen, not removing entries from this map.
				// NOTE: The activity manager in its process needs to call in to
				// ActivityThread to do things like update resource configurations,
				// which means this lock gets held while the activity manager holds its
				// own lock.  Thus you MUST NEVER call back into the activity manager
				// or anything that depends on it while holding this lock.
				// The lock of mProviderMap protects the following variables.
				// set once in main()
				parent = null;
				embeddedID = null;
				paused = false;
				stopped = false;
				hideForNow = false;
				nextIdle = null;
			}
Exemplo n.º 2
0
		// If the system process has died, it's game over for everyone.
		public void requestRelaunchActivity(android.os.IBinder token, java.util.List<android.app.ResultInfo
			> pendingResults, java.util.List<android.content.Intent> pendingNewIntents, int 
			configChanges, bool notResumed, android.content.res.Configuration config, bool fromServer
			)
		{
			android.app.ActivityThread.ActivityClientRecord target = null;
			lock (mPackages)
			{
				{
					for (int i = 0; i < mRelaunchingActivities.size(); i++)
					{
						android.app.ActivityThread.ActivityClientRecord r = mRelaunchingActivities.get(i);
						if (r.token == token)
						{
							target = r;
							if (pendingResults != null)
							{
								if (r.pendingResults != null)
								{
									r.pendingResults.addAll(pendingResults);
								}
								else
								{
									r.pendingResults = pendingResults;
								}
							}
							if (pendingNewIntents != null)
							{
								if (r.pendingIntents != null)
								{
									r.pendingIntents.addAll(pendingNewIntents);
								}
								else
								{
									r.pendingIntents = pendingNewIntents;
								}
							}
							break;
						}
					}
				}
				if (target == null)
				{
					target = new android.app.ActivityThread.ActivityClientRecord();
					target.token = token;
					target.pendingResults = pendingResults;
					target.pendingIntents = pendingNewIntents;
					if (!fromServer)
					{
						android.app.ActivityThread.ActivityClientRecord existing = mActivities.get(token);
						if (existing != null)
						{
							target.startsNotResumed = existing.paused;
						}
						target.onlyLocalRequest = true;
					}
					mRelaunchingActivities.add(target);
					queueOrSendMessage(android.app.ActivityThread.H.RELAUNCH_ACTIVITY, target);
				}
				if (fromServer)
				{
					target.startsNotResumed = notResumed;
					target.onlyLocalRequest = false;
				}
				if (config != null)
				{
					target.createdConfig = config;
				}
				target.pendingConfigChanges |= configChanges;
			}
		}
Exemplo n.º 3
0
		internal android.app.Activity startActivityNow(android.app.Activity parent, string
			 id, android.content.Intent intent, android.content.pm.ActivityInfo activityInfo
			, android.os.IBinder token, android.os.Bundle state, android.app.Activity.NonConfigurationInstances
			 lastNonConfigurationInstances)
		{
			android.app.ActivityThread.ActivityClientRecord r = new android.app.ActivityThread
				.ActivityClientRecord();
			r.token = token;
			r.ident = 0;
			r.intent = intent;
			r.state = state;
			r.parent = parent;
			r.embeddedID = id;
			r.activityInfo = activityInfo;
			r.lastNonConfigurationInstances = lastNonConfigurationInstances;
			return performLaunchActivity(r, null);
		}