// Path: application/src/main/java/com/projectsexception/myapplist/model/AppInfo.java
// public class AppInfo implements Comparable<AppInfo>, Parcelable {
//     
//     private final Collator sCollator = Collator.getInstance();
//     
//     private String packageName;
//     private String name;
//     private boolean installed;
// 
//     public String getPackageName() {
//         return packageName;
//     }
// 
//     public void setPackageName(String packageName) {
//         this.packageName = packageName;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public void setName(String name) {
//         this.name = name;
//     }
// 
//     public boolean isInstalled() {
//         return installed;
//     }
// 
//     public void setInstalled(boolean installed) {
//         this.installed = installed;
//     }
// 
//     @Override
//     public int compareTo(AppInfo another) {
//         if (!installed && another.installed) {
//             return -1;
//         } else  if (installed && !another.installed) {
//             return 1;
//         }
//         return sCollator.compare(getName(), another.getName());
//     }
// 
//     @Override
//     public int describeContents() {
//         return 0;
//     }
// 
//     @Override
//     public void writeToParcel(Parcel dest, int flags) {
//         dest.writeString(name);
//         dest.writeString(packageName);
//         dest.writeString(Boolean.toString(installed));
//     }
//     
//     public static final Parcelable.Creator<AppInfo> CREATOR = new Parcelable.Creator<AppInfo>() {
// 
//         @Override
//         public AppInfo createFromParcel(Parcel source) {
//             AppInfo appInfo = new AppInfo();
//             appInfo.setName(source.readString());
//             appInfo.setPackageName(source.readString());
//             appInfo.setInstalled(Boolean.parseBoolean(source.readString()));
//             return appInfo;
//         }
// 
//         @Override
//         public AppInfo[] newArray(int size) {
//             return new AppInfo[size];
//         }
//         
//         
//     };
//     
// 
// }


import android.app.Activity;
import android.app.ActivityManager;
import android.app.ActivityManager.RunningAppProcessInfo;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.provider.Settings;
import com.projectsexception.myapplist.R;
import com.projectsexception.myapplist.model.AppInfo;
import com.projectsexception.util.AndroidUtils;
import com.projectsexception.util.CustomLog;
import java.util.ArrayList;
import java.util.List;
import de.keyboardsurfer.android.widget.crouton.Crouton;
import de.keyboardsurfer.android.widget.crouton.Style;
package com.projectsexception.myapplist.util;





public class AppUtil {

    private static final String SCHEME = "package";
    private static final String APP_PKG_NAME_21 = "com.android.settings.ApplicationPkgName";
    private static final String APP_PKG_NAME_22 = "pkg";
    private static final String APP_DETAILS_PACKAGE_NAME = "com.android.settings";
    private static final String APP_DETAILS_CLASS_NAME = "com.android.settings.InstalledAppDetails";
    private static final String APP_GOOGLE_PLAY = "com.android.vending";

// Path: application/src/main/java/com/projectsexception/myapplist/model/AppInfo.java
// public class AppInfo implements Comparable<AppInfo>, Parcelable {
//     
//     private final Collator sCollator = Collator.getInstance();
//     
//     private String packageName;
//     private String name;
//     private boolean installed;
// 
//     public String getPackageName() {
//         return packageName;
//     }
// 
//     public void setPackageName(String packageName) {
//         this.packageName = packageName;
//     }
// 
//     public String getName() {
//         return name;
//     }
// 
//     public void setName(String name) {
//         this.name = name;
//     }
// 
//     public boolean isInstalled() {
//         return installed;
//     }
// 
//     public void setInstalled(boolean installed) {
//         this.installed = installed;
//     }
// 
//     @Override
//     public int compareTo(AppInfo another) {
//         if (!installed && another.installed) {
//             return -1;
//         } else  if (installed && !another.installed) {
//             return 1;
//         }
//         return sCollator.compare(getName(), another.getName());
//     }
// 
//     @Override
//     public int describeContents() {
//         return 0;
//     }
// 
//     @Override
//     public void writeToParcel(Parcel dest, int flags) {
//         dest.writeString(name);
//         dest.writeString(packageName);
//         dest.writeString(Boolean.toString(installed));
//     }
//     
//     public static final Parcelable.Creator<AppInfo> CREATOR = new Parcelable.Creator<AppInfo>() {
// 
//         @Override
//         public AppInfo createFromParcel(Parcel source) {
//             AppInfo appInfo = new AppInfo();
//             appInfo.setName(source.readString());
//             appInfo.setPackageName(source.readString());
//             appInfo.setInstalled(Boolean.parseBoolean(source.readString()));
//             return appInfo;
//         }
// 
//         @Override
//         public AppInfo[] newArray(int size) {
//             return new AppInfo[size];
//         }
//         
//         
//     };
//     
// 
// }


// Path: application/src/main/java/com/projectsexception/myapplist/util/AppUtil.java
import android.app.Activity;
import android.app.ActivityManager;
import android.app.ActivityManager.RunningAppProcessInfo;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.provider.Settings;
import com.projectsexception.myapplist.R;
import com.projectsexception.myapplist.model.AppInfo;
import com.projectsexception.util.AndroidUtils;
import com.projectsexception.util.CustomLog;
import java.util.ArrayList;
import java.util.List;
import de.keyboardsurfer.android.widget.crouton.Crouton;
import de.keyboardsurfer.android.widget.crouton.Style;

package com.projectsexception.myapplist.util;





public class AppUtil {

    private static final String SCHEME = "package";
    private static final String APP_PKG_NAME_21 = "com.android.settings.ApplicationPkgName";
    private static final String APP_PKG_NAME_22 = "pkg";
    private static final String APP_DETAILS_PACKAGE_NAME = "com.android.settings";
    private static final String APP_DETAILS_CLASS_NAME = "com.android.settings.InstalledAppDetails";
    private static final String APP_GOOGLE_PLAY = "com.android.vending";

    public static ArrayList<AppInfo> loadAppInfoList(PackageManager packageManager, boolean hideSystemApps) {