Skip to content

Commit a81aa1f

Browse files
committed
Fix user agent syntax error
1 parent df27755 commit a81aa1f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

core/src/main/java/io/snabble/sdk/UserAgentInterceptor.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
import android.content.Context;
44
import android.os.Build;
55

6+
import androidx.annotation.NonNull;
7+
68
import java.io.IOException;
79

810
import okhttp3.Interceptor;
@@ -11,17 +13,18 @@
1113
import okhttp3.Response;
1214

1315
class UserAgentInterceptor implements Interceptor {
14-
private String userAgent;
16+
private final String userAgent;
1517

1618
public UserAgentInterceptor(Context context) {
1719
userAgent = context.getPackageManager().getApplicationLabel(context.getApplicationInfo())
1820
+ "/" + Snabble.getInstance().getVersionName()
1921
+ " snabble/" + Snabble.getVersion() +
2022
" (Android " + Build.VERSION.RELEASE
2123
+ "; " + Build.BRAND + "; " + Build.MODEL + ")" +
22-
" okhttp " + OkHttp.VERSION;
24+
" okhttp/" + OkHttp.VERSION;
2325
}
2426

27+
@NonNull
2528
@Override
2629
public Response intercept(Chain chain) throws IOException {
2730
Request originalRequest = chain.request();

0 commit comments

Comments
 (0)