27 lines
999 B
Java
27 lines
999 B
Java
package com.facebook.internal;
|
|
|
|
import android.net.Uri;
|
|
import com.baidu.cloud.media.player.misc.IMediaFormat;
|
|
import java.util.Locale;
|
|
|
|
/* loaded from: classes.dex */
|
|
public class ImageRequest {
|
|
public static Uri a(String str, int i, int i2) {
|
|
Validate.a(str, "userId");
|
|
int max = Math.max(i, 0);
|
|
int max2 = Math.max(i2, 0);
|
|
if (max == 0 && max2 == 0) {
|
|
throw new IllegalArgumentException("Either width or height must be greater than 0");
|
|
}
|
|
Uri.Builder path = new Uri.Builder().scheme("https").authority("graph.facebook.com").path(String.format(Locale.US, "%s/picture", str));
|
|
if (max2 != 0) {
|
|
path.appendQueryParameter(IMediaFormat.KEY_HEIGHT, String.valueOf(max2));
|
|
}
|
|
if (max != 0) {
|
|
path.appendQueryParameter(IMediaFormat.KEY_WIDTH, String.valueOf(max));
|
|
}
|
|
path.appendQueryParameter("migration_overrides", "{october_2012:true}");
|
|
return path.build();
|
|
}
|
|
}
|