Home | History | Annotate | Download | only in backup

Lines Matching refs:transport

41 import com.android.server.backup.transport.OnTransportRegisteredListener;
42 import com.android.server.backup.transport.TransportClient;
43 import com.android.server.backup.transport.TransportClientManager;
44 import com.android.server.backup.transport.TransportConnectionListener;
45 import com.android.server.backup.transport.TransportNotAvailableException;
46 import com.android.server.backup.transport.TransportNotRegisteredException;
47 import com.android.server.backup.transport.TransportStats;
72 * Lock for registered transports and currently selected transport.
74 * <p><b>Warning:</b> No calls to {@link IBackupTransport} or calls that result in transport
112 /* Sets a listener to be called whenever a transport is registered. */
145 * <p>A *registered* transport is a transport that satisfies intent with action
185 * Returns the transport name associated with {@code transportComponent}.
187 * @throws TransportNotRegisteredException if the transport is not registered.
197 * Retrieves the transport dir name of {@code transportComponent}.
199 * @throws TransportNotRegisteredException if the transport is not registered.
210 * Retrieves the transport dir name of {@code transportName}.
212 * @throws TransportNotRegisteredException if the transport is not registered.
223 * @throws TransportNotRegisteredException if the transport is not registered.
237 * @throws TransportNotRegisteredException if the transport is not registered.
250 * @throws TransportNotRegisteredException if the transport is not registered.
264 * @throws TransportNotRegisteredException if the transport is not registered.
275 /* Returns true if the transport identified by {@code transportName} is registered. */
283 * Execute {@code transportConsumer} for each registered transport passing the transport name.
284 * This is called with an internal lock held, ensuring that the transport will remain registered
301 * Updates given values for the transport already registered and identified with {@param
302 * transportComponent}. If the transport is not registered it will log and return.
315 Slog.e(TAG, "Transport " + name + " not registered tried to change description");
323 Slog.d(TAG, "Transport " + name + " updated its attributes");
382 * @param transportName The name of the transport.
393 Slog.w(TAG, "Transport " + transportName + " not registered");
401 * @param transportName The name of the transport.
406 transport is not registered.
420 * Returns a {@link TransportClient} for the current transport or {@code null} if not
436 * Returns a {@link TransportClient} for the current transport or throws if not registered.
442 * @throws TransportNotRegisteredException if the transport is not registered.
464 * Sets {@code transportName} as selected transport and returns previously selected transport
465 * name. If there was no previous transport it returns null.
484 * Tries to register the transport if not registered. If successful also selects the transport.
486 * @param transportComponent Host of the transport.
502 // We can't call registerTransport() with the transport lock held
512 Slog.wtf(TAG, "Transport got unregistered");
555 /** Transport has to be whitelisted and privileged. */
556 private boolean isTransportTrusted(ComponentName transport) {
557 if (!mTransportWhitelist.contains(transport)) {
558 Slog.w(TAG, "BackupTransport " + transport.flattenToShortString() +
563 PackageInfo packInfo = mPackageManager.getPackageInfo(transport.getPackageName(), 0);
566 Slog.w(TAG, "Transport package " + transport.getPackageName() + " not privileged");
577 * Tries to register transport represented by {@code transportComponent}.
579 * <p><b>Warning:</b> Don't call this with the transport lock held.
581 * @param transportComponent Host of the transport that we want to register.
601 final IBackupTransport transport;
603 transport = transportClient.connectOrThrow(callerLogString);
605 Slog.e(TAG, "Couldn't connect to transport " + transportString + " for registration");
612 String transportName = transport.name();
613 String transportDirName = transport.transportDirName();
614 registerTransport(transportComponent, transport);
616 Slog.d(TAG, "Transport " + transportString + " registered");
620 Slog.e(TAG, "Transport " + transportString + " died while registering");
628 /** If {@link RemoteException} is thrown the transport is guaranteed to not be registered. */
629 private void registerTransport(ComponentName transportComponent, IBackupTransport transport)
635 transport.name(),
636 transport.transportDirName(),
637 transport.configurationIntent(),
638 transport.currentDestinationString(),
639 transport.dataManagementIntent(),
640 transport.dataManagementLabel());
648 !Thread.holdsLock(mTransportLock), "Can't call transport with transport lock held");