File tree 1 file changed +14
-0
lines changed
binder/src/main/java/io/grpc/binder
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 17
17
package io .grpc .binder ;
18
18
19
19
import android .content .Intent ;
20
+ import android .os .UserHandle ;
20
21
import io .grpc .ExperimentalApi ;
22
+ import io .grpc .NameResolver ;
21
23
22
24
/** Constant parts of the gRPC binder transport public API. */
23
25
@ ExperimentalApi ("https://github.com/grpc/grpc-java/issues/8022" )
@@ -29,4 +31,16 @@ private ApiConstants() {}
29
31
* themselves in a {@link android.app.Service#onBind(Intent)} call.
30
32
*/
31
33
public static final String ACTION_BIND = "grpc.io.action.BIND" ;
34
+
35
+ /**
36
+ * Specifies the Android user in which target URIs should be resolved.
37
+ *
38
+ * <p>{@link UserHandle} can't reasonably be encoded in a target URI string. Instead, all
39
+ * {@link io.grpc.NameResolverProvider}s producing {@link AndroidComponentAddress}es should let
40
+ * clients address servers in another Android user using this argument.
41
+ *
42
+ * <p>See also {@link AndroidComponentAddress#getTargetUser()}.
43
+ */
44
+ public static final NameResolver .Args .Key <UserHandle > TARGET_ANDROID_USER =
45
+ NameResolver .Args .Key .create ("target-android-user" );
32
46
}
You can’t perform that action at this time.
0 commit comments