Skip to content

Commit c34c815

Browse files
committed
java format
1 parent 9281c2b commit c34c815

3 files changed

Lines changed: 18 additions & 21 deletions

File tree

binder/src/test/java/io/grpc/binder/RobolectricBinderSecurityTest.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,14 @@ public static ImmutableList<Boolean> data() {
7979

8080
@Before
8181
public void setUp() {
82-
ApplicationInfo serverAppInfo = ApplicationInfoBuilder.newBuilder()
83-
.setPackageName(context.getPackageName())
84-
.build();
82+
ApplicationInfo serverAppInfo =
83+
ApplicationInfoBuilder.newBuilder().setPackageName(context.getPackageName()).build();
8584
serverAppInfo.uid = android.os.Process.myUid();
86-
PackageInfo serverPkgInfo = PackageInfoBuilder.newBuilder()
87-
.setPackageName(serverAppInfo.packageName)
88-
.setApplicationInfo(serverAppInfo)
89-
.build();
85+
PackageInfo serverPkgInfo =
86+
PackageInfoBuilder.newBuilder()
87+
.setPackageName(serverAppInfo.packageName)
88+
.setApplicationInfo(serverAppInfo)
89+
.build();
9090
shadowOf(context.getPackageManager()).installPackage(serverPkgInfo);
9191

9292
ServiceInfo serviceInfo = new ServiceInfo();
@@ -95,8 +95,8 @@ public void setUp() {
9595
serviceInfo.applicationInfo = serverAppInfo;
9696
shadowOf(context.getPackageManager()).addOrUpdateService(serviceInfo);
9797

98-
AndroidComponentAddress listenAddress = AndroidComponentAddress.forRemoteComponent(
99-
serviceInfo.packageName, serviceInfo.name);
98+
AndroidComponentAddress listenAddress =
99+
AndroidComponentAddress.forRemoteComponent(serviceInfo.packageName, serviceInfo.name);
100100

101101
MethodDescriptor<Empty, Empty> methodDesc = getMethodDescriptor();
102102
ServerCallHandler<Empty, Empty> callHandler =

binder/src/test/java/io/grpc/binder/internal/ServiceBindingTest.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,9 +316,11 @@ public void testResolveNonExistentServiceThrows() throws Exception {
316316
@Config(sdk = 33)
317317
public void testResolveNonExistentServiceWithTargetUserThrows() throws Exception {
318318
ComponentName doesNotExistService = new ComponentName("does.not.exist", "NoService");
319-
binding = newBuilder()
320-
.setTargetUserHandle(generateUserHandle(/* userId = */ 12345))
321-
.setTargetComponent(doesNotExistService).build();
319+
binding =
320+
newBuilder()
321+
.setTargetUserHandle(generateUserHandle(/* userId= */ 12345))
322+
.setTargetComponent(doesNotExistService)
323+
.build();
322324
StatusException statusException = assertThrows(StatusException.class, binding::resolve);
323325
assertThat(statusException.getStatus().getCode()).isEqualTo(Code.UNIMPLEMENTED);
324326
assertThat(statusException.getStatus().getDescription()).contains("does.not.exist");

binder/src/testFixtures/java/io/grpc/binder/internal/SettableAsyncSecurityPolicy.java

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,26 +56,21 @@ public AuthRequest takeNextAuthRequest(long timeout, TimeUnit unit)
5656
/** Represents a single call to {@link AsyncSecurityPolicy#checkAuthorizationAsync(int)}. */
5757
public static class AuthRequest {
5858

59-
/**
60-
* The argument passed to {@link AsyncSecurityPolicy#checkAuthorizationAsync(int)}.
61-
*/
59+
/** The argument passed to {@link AsyncSecurityPolicy#checkAuthorizationAsync(int)}. */
6260
public final int uid;
61+
6362
private final SettableFuture<Status> resultFuture = SettableFuture.create();
6463

6564
private AuthRequest(int uid) {
6665
this.uid = uid;
6766
}
6867

69-
/**
70-
* Provides this SecurityPolicy's response to this authorization request.
71-
*/
68+
/** Provides this SecurityPolicy's response to this authorization request. */
7269
public void setResult(Status result) {
7370
checkState(resultFuture.set(result));
7471
}
7572

76-
/**
77-
* Simulates an exceptional response to this authorization request.
78-
*/
73+
/** Simulates an exceptional response to this authorization request. */
7974
public void setResult(Throwable t) {
8075
checkState(resultFuture.setException(t));
8176
}

0 commit comments

Comments
 (0)