Skip to content

Commit

Permalink
binder: Fix unused imports and parameter name mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
ejona86 committed Mar 5, 2024
1 parent 6b3526d commit 9947a25
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ protected InternalServer newServer(List<ServerStreamTracer.Factory> streamTracer
streamTracerFactories,
BinderInternal.createPolicyChecker(SecurityPolicies.serverInternalOnly()),
InboundParcelablePolicy.DEFAULT,
/* shutdownListener=*/ () -> {});
/* transportSecurityShutdownListener=*/ () -> {});

HostServices.configureService(addr,
HostServices.serviceParamsBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

package io.grpc.binder;

import static com.google.common.base.Preconditions.checkNotNull;

import android.content.ComponentName;
import androidx.annotation.RequiresApi;
import io.grpc.ChannelCredentials;
Expand Down
4 changes: 2 additions & 2 deletions binder/src/main/java/io/grpc/binder/SecurityPolicies.java
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public Status checkAuthorization(int uid) {
* Creates {@link SecurityPolicy} which checks if the app is a device owner app. See
* {@link DevicePolicyManager}.
*/
@androidx.annotation.RequiresApi(18)
@RequiresApi(18)
public static io.grpc.binder.SecurityPolicy isDeviceOwner(Context applicationContext) {
DevicePolicyManager devicePolicyManager =
(DevicePolicyManager) applicationContext.getSystemService(Context.DEVICE_POLICY_SERVICE);
Expand All @@ -203,7 +203,7 @@ public static io.grpc.binder.SecurityPolicy isDeviceOwner(Context applicationCon
* Creates {@link SecurityPolicy} which checks if the app is a profile owner app. See
* {@link DevicePolicyManager}.
*/
@androidx.annotation.RequiresApi(21)
@RequiresApi(21)
public static SecurityPolicy isProfileOwner(Context applicationContext) {
DevicePolicyManager devicePolicyManager =
(DevicePolicyManager) applicationContext.getSystemService(Context.DEVICE_POLICY_SERVICE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,9 @@
import io.grpc.ServerStreamTracer;
import io.grpc.binder.AndroidComponentAddress;
import io.grpc.binder.InboundParcelablePolicy;
import io.grpc.binder.ServerSecurityPolicy;
import io.grpc.internal.GrpcUtil;
import io.grpc.internal.InternalServer;
import io.grpc.internal.ObjectPool;
import io.grpc.internal.ServerListener;
import io.grpc.internal.SharedResourceHolder;
import java.io.IOException;
import java.net.SocketAddress;
import java.util.List;
Expand Down

0 comments on commit 9947a25

Please sign in to comment.