38 lines
1.2 KiB
Java
38 lines
1.2 KiB
Java
package io.fabric.sdk.android.services.settings;
|
|
|
|
import android.content.Context;
|
|
import android.graphics.BitmapFactory;
|
|
import io.fabric.sdk.android.Fabric;
|
|
import io.fabric.sdk.android.services.common.CommonUtils;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public class IconRequest {
|
|
public final String a;
|
|
public final int b;
|
|
public final int c;
|
|
public final int d;
|
|
|
|
public IconRequest(String str, int i, int i2, int i3) {
|
|
this.a = str;
|
|
this.b = i;
|
|
this.c = i2;
|
|
this.d = i3;
|
|
}
|
|
|
|
public static IconRequest a(Context context, String str) {
|
|
if (str != null) {
|
|
try {
|
|
int b = CommonUtils.b(context);
|
|
Fabric.g().d("Fabric", "App icon resource ID is " + b);
|
|
BitmapFactory.Options options = new BitmapFactory.Options();
|
|
options.inJustDecodeBounds = true;
|
|
BitmapFactory.decodeResource(context.getResources(), b, options);
|
|
return new IconRequest(str, b, options.outWidth, options.outHeight);
|
|
} catch (Exception e) {
|
|
Fabric.g().b("Fabric", "Failed to load icon", e);
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
}
|