Lines Matching defs:agent

190     // Timeout intervals for agent backup & restore operations
242 // The thread performing the sequence of queued backups binds to each app's agent
1523 Slog.v(TAG, "Examining " + packageName + " for backup agent");
1709 // fire off a backup agent, blocking until it attaches or times out
1711 IBackupAgent agent = null;
1717 Slog.d(TAG, "awaiting agent for " + app);
1719 // success; wait for the agent to arrive
1736 Slog.w(TAG, "Timeout waiting for agent " + app);
1740 if (DEBUG) Slog.i(TAG, "got agent " + mConnectedAgent);
1741 agent = mConnectedAgent;
1747 return agent;
2011 // it's running here in the system process we can just set up its agent
2065 Slog.d(TAG, "starting agent for backup of " + request);
2066 addBackupTrace("launch agent for " + request.packageName);
2072 // package's backup agent.
2082 addBackupTrace("skipping - no agent, completion is noop");
2096 IBackupAgent agent = null;
2099 agent = bindToAgentSynchronous(mCurrentPackage.applicationInfo,
2101 addBackupTrace("agent bound; a? = " + (agent != null));
2102 if (agent != null) {
2103 mStatus = invokeAgentForBackup(request.packageName, agent, mTransport);
2105 // agent, or a timeout message on the main handler. either way, we're
2108 // Timeout waiting for the agent
2115 addBackupTrace("agent SE");
2124 // If there was an agent error, no timeout/completion handling will occur.
2129 // An agent-level failure means we reenqueue this one agent for
2138 // Failed lookup of the app, so we couldn't bring up an agent, but
2206 // Invoke an agent's doBackup() and start a timeout message spinning on the main
2208 int invokeAgentForBackup(String packageName, IBackupAgent agent,
2257 addBackupTrace("calling agent doBackup()");
2258 agent.doBackup(mSavedState, mBackupData, mNewState, token, mBackupManagerBinder);
2268 // At this point the agent is off and running. The next thing to happen will
2269 // either be a callback from the agent, at which point we'll process its data
2278 // Okay, the agent successfully reported back to us. Spin the data off to the
2315 // and juggle the files so that next time we supply the agent
2352 // Whoops, the current agent timed out running doBackup(). Tidy up and restage
2354 // !!! TODO: keep track of failure counts per agent, and blacklist those which
2567 FullBackupRunner(PackageInfo pack, IBackupAgent agent, ParcelFileDescriptor pipe,
2570 mAgent = agent;
2602 Slog.e(TAG, "Remote agent vanished during full backup of "
2682 // as any explicit mention of the 'special' shared-storage agent package (we
2701 Slog.i(TAG, "... ignoring non-agent system package " + pkg.packageName);
2792 // Now back up the app data via the agent mechanism
2798 // after the app's agent runs to handle its private filesystem
2909 Slog.d(TAG, "Binding to full backup agent : " + pkg.packageName);
2911 IBackupAgent agent = bindToAgentSynchronous(pkg.applicationInfo,
2913 if (agent != null) {
2929 FullBackupRunner runner = new FullBackupRunner(pkg, agent, pipes[1],
2940 Slog.i(TAG, "Caught exception reading from agent", e);
2964 Slog.w(TAG, "Unable to bind to full agent for " + pkg.packageName);
3053 // The agent was running with a stub Application object, so shut it down.
3190 RestoreFileRunnable(IBackupAgent agent, FileMetadata info,
3192 mAgent = agent;
3420 // Clean up the previous agent relationship if necessary,
3496 // data to the agent.
3498 Slog.i(TAG, "Reusing existing agent instance");
3501 if (DEBUG) Slog.d(TAG, "Need to launch agent for " + pkg);
3516 if (DEBUG) Slog.d(TAG, "backup agent ("
3524 // All set; now set up the IPC and launch the agent
3536 if (DEBUG) Slog.d(TAG, "Unable to create agent for " + pkg);
3547 + " but agent is for " + mAgentPackage);
3551 // At this point we have an agent ready to handle the full
3553 // that agent. Tell the agent to start reading from the
3568 if (DEBUG) Slog.d(TAG, "Invoking agent to restore file "
3570 // fire up the app's agent listening on the socket. If
3571 // the agent is running in the system process we can't
3575 Slog.d(TAG, "system process agent - spinning a thread");
3598 // Copy over the data if the agent is still good
3643 // Problems setting up the agent communication, or an already-
3681 Slog.w(TAG, "Couldn't close agent pipes", e);
3693 // The agent was running with a stub Application object, so shut it down.
3841 // If this is a system-uid app without a declared backup agent,
3846 + " has restricted uid and no agent");
3946 // defined a custom backup agent
3975 + " is system level with no agent");
4597 // The PM agent called operationComplete() already, because our invocation
4679 + " but app has no agent; skipping");
4682 "Package has no agent");
4720 // Then set up and bind the agent
4721 IBackupAgent agent = bindToAgentSynchronous(
4724 if (agent == null) {
4725 Slog.w(TAG, "Can't find backup agent for " + packageName);
4727 "Restore agent missing");
4732 // And then finally start the restore on this agent
4734 initiateOneRestore(packageInfo, metaInfo.versionCode, agent, mNeedFullBackup);
4795 void initiateOneRestore(PackageInfo app, int appVersionCode, IBackupAgent agent,
4830 // Okay, we have the data. Now have the agent do the restore.
4842 agent.doRestore(mBackupData, appVersionCode, mNewState, token, mBackupManagerBinder);
4856 // If the agent fails restore, it might have put the app's data
4885 // If this wasn't the PM pseudopackage, tear down the agent side
4891 // The agent was probably running with a stub Application object,
4918 // A call to agent.doRestore() has been positively acknowledged as complete
4929 // A call to agent.doRestore() has timed out
4935 // Handle like an agent that threw on invocation: wipe it and go on to the next
5658 // Callback: a requested backup agent has been instantiated. This should only
5663 Slog.d(TAG, "agentConnected pkg=" + packageName + " agent=" + agentBinder);
5664 IBackupAgent agent = IBackupAgent.Stub.asInterface(agentBinder);
5665 mConnectedAgent = agent;
5669 + " claiming agent connected");
5675 // Callback: a backup agent has failed to come up, or has unexpectedly quit.
5676 // If the agent failed to come up in the first place, the agentBinder argument
5686 + " claiming agent disconnected");
5804 // Note that a currently-active backup agent has notified us that it has
6025 // If the package has no backup agent, we obviously cannot proceed
6027 Slog.w(TAG, "Asked to restore package " + packageName + " with no agent");