Initial commit
This commit is contained in:
14
sources/com/bumptech/glide/module/AppGlideModule.java
Normal file
14
sources/com/bumptech/glide/module/AppGlideModule.java
Normal file
@@ -0,0 +1,14 @@
|
||||
package com.bumptech.glide.module;
|
||||
|
||||
import android.content.Context;
|
||||
import com.bumptech.glide.GlideBuilder;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public abstract class AppGlideModule extends LibraryGlideModule implements AppliesOptions {
|
||||
public void applyOptions(Context context, GlideBuilder glideBuilder) {
|
||||
}
|
||||
|
||||
public boolean isManifestParsingEnabled() {
|
||||
return true;
|
||||
}
|
||||
}
|
6
sources/com/bumptech/glide/module/AppliesOptions.java
Normal file
6
sources/com/bumptech/glide/module/AppliesOptions.java
Normal file
@@ -0,0 +1,6 @@
|
||||
package com.bumptech.glide.module;
|
||||
|
||||
@Deprecated
|
||||
/* loaded from: classes.dex */
|
||||
interface AppliesOptions {
|
||||
}
|
14
sources/com/bumptech/glide/module/GlideModule.java
Normal file
14
sources/com/bumptech/glide/module/GlideModule.java
Normal file
@@ -0,0 +1,14 @@
|
||||
package com.bumptech.glide.module;
|
||||
|
||||
import android.content.Context;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.GlideBuilder;
|
||||
import com.bumptech.glide.Registry;
|
||||
|
||||
@Deprecated
|
||||
/* loaded from: classes.dex */
|
||||
public interface GlideModule extends RegistersComponents, AppliesOptions {
|
||||
/* synthetic */ void applyOptions(Context context, GlideBuilder glideBuilder);
|
||||
|
||||
/* synthetic */ void registerComponents(Context context, Glide glide, Registry registry);
|
||||
}
|
11
sources/com/bumptech/glide/module/LibraryGlideModule.java
Normal file
11
sources/com/bumptech/glide/module/LibraryGlideModule.java
Normal file
@@ -0,0 +1,11 @@
|
||||
package com.bumptech.glide.module;
|
||||
|
||||
import android.content.Context;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.bumptech.glide.Registry;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public abstract class LibraryGlideModule implements RegistersComponents {
|
||||
public void registerComponents(Context context, Glide glide, Registry registry) {
|
||||
}
|
||||
}
|
84
sources/com/bumptech/glide/module/ManifestParser.java
Normal file
84
sources/com/bumptech/glide/module/ManifestParser.java
Normal file
@@ -0,0 +1,84 @@
|
||||
package com.bumptech.glide.module;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.util.Log;
|
||||
import com.ubtrobot.jimu.robotapi.PeripheralType;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Deprecated
|
||||
/* loaded from: classes.dex */
|
||||
public final class ManifestParser {
|
||||
private final Context a;
|
||||
|
||||
public ManifestParser(Context context) {
|
||||
this.a = context;
|
||||
}
|
||||
|
||||
public List<GlideModule> a() {
|
||||
if (Log.isLoggable("ManifestParser", 3)) {
|
||||
Log.d("ManifestParser", "Loading Glide modules");
|
||||
}
|
||||
ArrayList arrayList = new ArrayList();
|
||||
try {
|
||||
ApplicationInfo applicationInfo = this.a.getPackageManager().getApplicationInfo(this.a.getPackageName(), PeripheralType.SERVO);
|
||||
if (applicationInfo.metaData == null) {
|
||||
if (Log.isLoggable("ManifestParser", 3)) {
|
||||
Log.d("ManifestParser", "Got null app info metadata");
|
||||
}
|
||||
return arrayList;
|
||||
}
|
||||
if (Log.isLoggable("ManifestParser", 2)) {
|
||||
Log.v("ManifestParser", "Got app info metadata: " + applicationInfo.metaData);
|
||||
}
|
||||
for (String str : applicationInfo.metaData.keySet()) {
|
||||
if ("GlideModule".equals(applicationInfo.metaData.get(str))) {
|
||||
arrayList.add(a(str));
|
||||
if (Log.isLoggable("ManifestParser", 3)) {
|
||||
Log.d("ManifestParser", "Loaded Glide module: " + str);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (Log.isLoggable("ManifestParser", 3)) {
|
||||
Log.d("ManifestParser", "Finished loading Glide modules");
|
||||
}
|
||||
return arrayList;
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
throw new RuntimeException("Unable to find metadata to parse GlideModules", e);
|
||||
}
|
||||
}
|
||||
|
||||
private static GlideModule a(String str) {
|
||||
try {
|
||||
Class<?> cls = Class.forName(str);
|
||||
try {
|
||||
Object newInstance = cls.getDeclaredConstructor(new Class[0]).newInstance(new Object[0]);
|
||||
if (newInstance instanceof GlideModule) {
|
||||
return (GlideModule) newInstance;
|
||||
}
|
||||
throw new RuntimeException("Expected instanceof GlideModule, but found: " + newInstance);
|
||||
} catch (IllegalAccessException e) {
|
||||
a(cls, e);
|
||||
throw null;
|
||||
} catch (InstantiationException e2) {
|
||||
a(cls, e2);
|
||||
throw null;
|
||||
} catch (NoSuchMethodException e3) {
|
||||
a(cls, e3);
|
||||
throw null;
|
||||
} catch (InvocationTargetException e4) {
|
||||
a(cls, e4);
|
||||
throw null;
|
||||
}
|
||||
} catch (ClassNotFoundException e5) {
|
||||
throw new IllegalArgumentException("Unable to find GlideModule implementation", e5);
|
||||
}
|
||||
}
|
||||
|
||||
private static void a(Class<?> cls, Exception exc) {
|
||||
throw new RuntimeException("Unable to instantiate GlideModule implementation for " + cls, exc);
|
||||
}
|
||||
}
|
@@ -0,0 +1,6 @@
|
||||
package com.bumptech.glide.module;
|
||||
|
||||
@Deprecated
|
||||
/* loaded from: classes.dex */
|
||||
interface RegistersComponents {
|
||||
}
|
Reference in New Issue
Block a user