Lines Matching defs:agent

175     // Timeout intervals for agent backup & restore operations
227 // The thread performing the sequence of queued backups binds to each app's agent
1365 Slog.v(TAG, "Examining " + packageName + " for backup agent");
1596 // fire off a backup agent, blocking until it attaches or times out
1598 IBackupAgent agent = null;
1604 Slog.d(TAG, "awaiting agent for " + app);
1606 // success; wait for the agent to arrive
1621 Slog.w(TAG, "Timeout waiting for agent " + app);
1624 agent = mConnectedAgent;
1630 return agent;
1878 // it's running here in the system process we can just set up its agent
1928 Slog.d(TAG, "starting agent for backup of " + request);
1934 // package's backup agent.
1939 IBackupAgent agent = null;
1942 agent = bindToAgentSynchronous(mCurrentPackage.applicationInfo,
1944 if (agent != null) {
1945 mStatus = invokeAgentForBackup(request.packageName, agent, mTransport);
1947 // agent, or a timeout message on the main handler. either way, we're
1950 // Timeout waiting for the agent
1963 // If there was an agent error, no timeout/completion handling will occur.
1968 // An agent-level failure means we reenqueue this one agent for
2030 // Invoke an agent's doBackup() and start a timeout message spinning on the main
2032 int invokeAgentForBackup(String packageName, IBackupAgent agent,
2075 agent.doBackup(mSavedState, mBackupData, mNewState, token, mBackupManagerBinder);
2084 // At this point the agent is off and running. The next thing to happen will
2085 // either be a callback from the agent, at which point we'll process its data
2093 // Okay, the agent successfully reported back to us. Spin the data off to the
2124 // and juggle the files so that next time we supply the agent
2161 // Whoops, the current agent timed out running doBackup(). Tidy up and restage
2163 // !!! TODO: keep track of failure counts per agent, and blacklist those which
2250 FullBackupRunner(PackageInfo pack, IBackupAgent agent, ParcelFileDescriptor pipe,
2253 mAgent = agent;
2282 Slog.e(TAG, "Remote agent vanished during full backup of "
2440 // Now back up the app data via the agent mechanism
2550 Slog.d(TAG, "Binding to full backup agent : " + pkg.packageName);
2552 IBackupAgent agent = bindToAgentSynchronous(pkg.applicationInfo,
2554 if (agent != null) {
2568 FullBackupRunner runner = new FullBackupRunner(pkg, agent, pipes[1],
2592 Slog.i(TAG, "Caught exception reading from agent", e);
2616 Slog.w(TAG, "Unable to bind to full agent for " + pkg.packageName);
2648 IBackupAgent agent = bindToAgentSynchronous(pkg.applicationInfo,
2650 if (agent != null) {
2655 agent.doFullBackup(mOutputFile, token, mBackupManagerBinder);
2662 Slog.e(TAG, "Could not bind to shared storage backup agent");
2728 // The agent was running with a stub Application object, so shut it down.
2863 RestoreFileRunnable(IBackupAgent agent, FileMetadata info,
2865 mAgent = agent;
3091 // Clean up the previous agent relationship if necessary,
3167 // data to the agent.
3169 Slog.i(TAG, "Reusing existing agent instance");
3172 if (DEBUG) Slog.d(TAG, "Need to launch agent for " + pkg);
3187 if (DEBUG) Slog.d(TAG, "backup agent ("
3195 // All set; now set up the IPC and launch the agent
3207 if (DEBUG) Slog.d(TAG, "Unable to create agent for " + pkg);
3218 + " but agent is for " + mAgentPackage);
3222 // At this point we have an agent ready to handle the full
3224 // that agent. Tell the agent to start reading from the
3231 if (DEBUG) Slog.d(TAG, "Invoking agent to restore file "
3234 // fire up the app's agent listening on the socket. If
3235 // the agent is running in the system process we can't
3239 Slog.d(TAG, "system process agent - spinning a thread");
3254 // whoops, remote agent went away. We'll eat the content
3261 // Copy over the data if the agent is still good
3306 // Problems setting up the agent communication, or an already-
3344 Slog.w(TAG, "Couldn't close agent pipes", e);
3356 // The agent was running with a stub Application object, so shut it down.
4258 // The PM agent called operationComplete() already, because our invocation
4369 // Then set up and bind the agent
4370 IBackupAgent agent = bindToAgentSynchronous(
4373 if (agent == null) {
4374 Slog.w(TAG, "Can't find backup agent for " + packageName);
4376 "Restore agent missing");
4381 // And then finally start the restore on this agent
4383 initiateOneRestore(packageInfo, metaInfo.versionCode, agent, mNeedFullBackup);
4444 void initiateOneRestore(PackageInfo app, int appVersionCode, IBackupAgent agent,
4475 // Okay, we have the data. Now have the agent do the restore.
4487 agent.doRestore(mBackupData, appVersionCode, mNewState, token, mBackupManagerBinder);
4501 // If the agent fails restore, it might have put the app's data
4530 // If this wasn't the PM pseudopackage, tear down the agent side
4536 // The agent was probably running with a stub Application object,
4563 // A call to agent.doRestore() has been positively acknowledged as complete
4574 // A call to agent.doRestore() has timed out
4580 // Handle like an agent that threw on invocation: wipe it and go on to the next
5283 // Callback: a requested backup agent has been instantiated. This should only
5288 Slog.d(TAG, "agentConnected pkg=" + packageName + " agent=" + agentBinder);
5289 IBackupAgent agent = IBackupAgent.Stub.asInterface(agentBinder);
5290 mConnectedAgent = agent;
5294 + " claiming agent connected");
5300 // Callback: a backup agent has failed to come up, or has unexpectedly quit.
5301 // If the agent failed to come up in the first place, the agentBinder argument
5311 + " claiming agent disconnected");
5413 // Note that a currently-active backup agent has notified us that it has
5615 // If the package has no backup agent, we obviously cannot proceed
5617 Slog.w(TAG, "Asked to restore package " + packageName + " with no agent");