Home | History | Annotate | Download | only in testing

Lines Matching refs:transport

39 import com.android.server.backup.transport.TransportClient;
40 import com.android.server.backup.transport.TransportNotAvailableException;
41 import com.android.server.backup.transport.TransportNotRegisteredException;
57 for (TransportData transport : transports) {
58 ComponentName transportComponent = transport.getTransportComponent();
81 TransportManager transportManager, TransportData transport) throws Exception {
82 TransportMock transportMock = setUpTransports(transportManager, transport).get(0);
94 .map(transport -> uncheck(() -> setUpTransport(transportManager, transport)))
99 TransportManager transportManager, TransportData transport) throws Exception {
100 int status = transport.transportStatus;
101 String transportName = transport.transportName;
102 ComponentName transportComponent = transport.getTransportComponent();
103 String transportDirName = transport.transportDirName;
105 TransportMock transportMock = mockTransport(transport);
108 // Transport registered
121 // Transport not registered
136 public static TransportMock mockTransport(TransportData transport) throws Exception {
138 int status = transport.transportStatus;
139 ComponentName transportComponent = transport.getTransportComponent();
142 // Transport registered
146 // Transport registered and available
147 IBackupTransport transportMock = mockTransportBinder(transport);
153 // Transport registered but unavailable
161 // Transport not registered
166 private static IBackupTransport mockTransportBinder(TransportData transport) throws Exception {
169 when(transportBinder.name()).thenReturn(transport.transportName);
170 when(transportBinder.transportDirName()).thenReturn(transport.transportDirName);
171 when(transportBinder.configurationIntent()).thenReturn(transport.configurationIntent);
173 .thenReturn(transport.currentDestinationString);
174 when(transportBinder.dataManagementIntent()).thenReturn(transport.dataManagementIntent);
175 when(transportBinder.dataManagementLabel()).thenReturn(transport.dataManagementLabel);
184 @Nullable public final IBackupTransport transport;
187 @Nullable TransportClient transportClient, @Nullable IBackupTransport transport) {
189 this.transport = transport;