Skip to content

Commit afdbecb

Browse files
authored
binder: Move BinderTransport's inner classes to the top level (grpc#12303)
BinderTransport.java was getting too long and deeply nested. This is a pure refactor with no behavior changes.
1 parent 2039266 commit afdbecb

File tree

11 files changed

+587
-530
lines changed

11 files changed

+587
-530
lines changed

binder/src/androidTest/java/io/grpc/binder/internal/BinderClientTransportTest.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public final class BinderClientTransportTest {
100100
.build();
101101

102102
AndroidComponentAddress serverAddress;
103-
BinderTransport.BinderClientTransport transport;
103+
BinderClientTransport transport;
104104
BlockingSecurityPolicy blockingSecurityPolicy = new BlockingSecurityPolicy();
105105

106106
private final ObjectPool<ScheduledExecutorService> executorServicePool =
@@ -178,7 +178,7 @@ public BinderClientTransportBuilder setPreAuthorizeServer(boolean preAuthorizeSe
178178
return this;
179179
}
180180

181-
public BinderTransport.BinderClientTransport build() {
181+
public BinderClientTransport build() {
182182
return factoryBuilder
183183
.buildClientTransportFactory()
184184
.newClientTransport(serverAddress, new ClientTransportOptions(), null);
@@ -502,8 +502,7 @@ public void testAsyncSecurityPolicyCancelledUponExternalTermination() throws Exc
502502
}
503503

504504
private static void startAndAwaitReady(
505-
BinderTransport.BinderClientTransport transport, TestTransportListener transportListener)
506-
throws Exception {
505+
BinderClientTransport transport, TestTransportListener transportListener) throws Exception {
507506
transport.start(transportListener).run();
508507
transportListener.awaitReady();
509508
}

binder/src/androidTest/java/io/grpc/binder/internal/BinderTransportTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,7 @@ protected ManagedClientTransport newClientTransport(InternalServer server) {
106106
options.setEagAttributes(eagAttrs());
107107
options.setChannelLogger(transportLogger());
108108

109-
return new BinderTransport.BinderClientTransport(
110-
builder.buildClientTransportFactory(), addr, options);
109+
return new BinderClientTransport(builder.buildClientTransportFactory(), addr, options);
111110
}
112111

113112
@Test

binder/src/main/java/io/grpc/binder/internal/ActiveTransportTracker.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
import io.grpc.internal.ServerTransportListener;
1212

1313
/**
14-
* Tracks which {@link BinderTransport.BinderServerTransport} are currently active and allows
15-
* invoking a {@link Runnable} only once all transports are terminated.
14+
* Tracks which {@link BinderServerTransport} are currently active and allows invoking a {@link
15+
* Runnable} only once all transports are terminated.
1616
*/
1717
final class ActiveTransportTracker implements ServerListener {
1818
private final ServerListener delegate;

0 commit comments

Comments
 (0)