File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
core/src/main/java/io/snabble/sdk Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 33import android .content .Context ;
44import android .os .Build ;
55
6+ import androidx .annotation .NonNull ;
7+
68import java .io .IOException ;
79
810import okhttp3 .Interceptor ;
1113import okhttp3 .Response ;
1214
1315class 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 ();
You can’t perform that action at this time.
0 commit comments