// Path: app/src/main/java/tw/fatminmin/xposed/minminguard/ui/image/GlideModule.java
// @com.bumptech.glide.annotation.GlideModule
// public class GlideModule extends AppGlideModule {
// 
//     @Override
//     public void registerComponents(@NonNull Context context, @NonNull Glide glide, @NonNull Registry registry) {
//         registry.prepend(ApplicationInfo.class, Drawable.class, new DrawableModelLoaderFactory(context));
//     }
// 
//     public static void loadApplicationIcon(Context context, ApplicationInfo applicationInfo, ImageView view) {
//         GlideApp.with(context)
//                 .load(applicationInfo)
//                 .into(view);
//     }
// }


import android.content.pm.ApplicationInfo;
import android.widget.ImageView;
import tw.fatminmin.xposed.minminguard.ui.image.GlideModule;
package tw.fatminmin.xposed.minminguard.ui.models;



public class AppDetails
{

    private String name;
    private String packageName;
    private ApplicationInfo applicationInfo;
    private boolean isEnabled;

    public AppDetails(String name, String packageName, ApplicationInfo applicationInfo, boolean isEnabled)
    {
        this.name = name;
        this.applicationInfo = applicationInfo;
        this.packageName = packageName;
        this.isEnabled = isEnabled;
    }

    public String getName()
    {
        return name;
    }

    public String getPackageName()
    {
        return packageName;
    }

    public void loadIcon(ImageView imageView) {
// Path: app/src/main/java/tw/fatminmin/xposed/minminguard/ui/image/GlideModule.java
// @com.bumptech.glide.annotation.GlideModule
// public class GlideModule extends AppGlideModule {
// 
//     @Override
//     public void registerComponents(@NonNull Context context, @NonNull Glide glide, @NonNull Registry registry) {
//         registry.prepend(ApplicationInfo.class, Drawable.class, new DrawableModelLoaderFactory(context));
//     }
// 
//     public static void loadApplicationIcon(Context context, ApplicationInfo applicationInfo, ImageView view) {
//         GlideApp.with(context)
//                 .load(applicationInfo)
//                 .into(view);
//     }
// }


// Path: app/src/main/java/tw/fatminmin/xposed/minminguard/ui/models/AppDetails.java
import android.content.pm.ApplicationInfo;
import android.widget.ImageView;
import tw.fatminmin.xposed.minminguard.ui.image.GlideModule;

package tw.fatminmin.xposed.minminguard.ui.models;



public class AppDetails
{

    private String name;
    private String packageName;
    private ApplicationInfo applicationInfo;
    private boolean isEnabled;

    public AppDetails(String name, String packageName, ApplicationInfo applicationInfo, boolean isEnabled)
    {
        this.name = name;
        this.applicationInfo = applicationInfo;
        this.packageName = packageName;
        this.isEnabled = isEnabled;
    }

    public String getName()
    {
        return name;
    }

    public String getPackageName()
    {
        return packageName;
    }

    public void loadIcon(ImageView imageView) {
        GlideModule.loadApplicationIcon(imageView.getContext(), applicationInfo, imageView);