// Path: app/src/main/java/com/wt/apkinfo/entity/ApplicationDetailsEntity.java
// public class ApplicationDetailsEntity implements ApplicationDetailsModel {
// 
// 	public String id;
// 	public String name;
// 	public String dataDir;
// 	public String nativeLibraryDir;
// 	public ComponentInfo[] activities;
// 	public ComponentInfo[] services;
// 	public ComponentInfo[] permissions;
// 	public ComponentInfo[] providers;
// 	public ComponentInfo[] receivers;
// 	public ComponentInfo[] metadata;
// 	public String[] signatures;
// 	public String versionName;
// 	public String installerPackage;
// 	public int versionCode;
// 	public long firstInstallTime;
// 	public long lastUpdateTime;
// 	public String apkFile;
// 	public int targetSdkVersion;
// 	public int minSdkVersion;
// 
// 	@Override
// 	public String getId() {
// 		return id;
// 	}
// 
// 	@Override
// 	public String getName() {
// 		return name;
// 	}
// 
// 	@Override
// 	public String getIconUri() {
// 		return "app://" + id;
// 	}
// 
// 
// }
// 
// Path: app/src/main/java/com/wt/apkinfo/entity/ApplicationEntity.java
// public class ApplicationEntity implements ApplicationModel, Comparable<ApplicationEntity> {
// 
// 	public String id;
// 	public String name;
// 	public String iconUri;
// 
// 	@Override
// 	public String getId() {
// 		return id;
// 	}
// 
// 	@Override
// 	public String getName() {
// 		return name;
// 	}
// 
// 	@Override
// 	public String getIconUri() {
// 		return iconUri;
// 	}
// 
// 	@Override
// 	public int compareTo(@NonNull ApplicationEntity applicationEntity) {
// 		return name.compareToIgnoreCase(applicationEntity.name);
// 	}
// }


import android.content.Context;
import com.hivedi.console.Console;
import com.wt.apkinfo.BuildConfig;
import com.wt.apkinfo.entity.ApplicationDetailsEntity;
import com.wt.apkinfo.entity.ApplicationEntity;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.atomic.AtomicBoolean;
import androidx.annotation.Nullable;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
package com.wt.apkinfo.db;





/**
 * Created by kenumir on 15.09.2017.
 *
 */

public class DatabaseCreator {

	private static DatabaseCreator sInstance;
	private static final Object LOCK = new Object();

	public synchronized static DatabaseCreator getInstance() {
		if (sInstance == null) {
			synchronized (LOCK) {
				if (sInstance == null) {
					sInstance = new DatabaseCreator();
				}
			}
		}
		return sInstance;
	}

	private final MutableLiveData<Boolean> mIsDatabaseCreated = new MutableLiveData<>();
	private final AtomicBoolean mInitializing = new AtomicBoolean(true);
	private final ExecutorService exec = Executors.newSingleThreadExecutor();

	private MutableLiveData<List<ApplicationEntity>> data = new MutableLiveData<>();
	private MutableLiveData<ApplicationDetailsEntity> dataApp = new MutableLiveData<>();
	private String filter = null;

	public LiveData<Boolean> isDatabaseCreated() {
		return mIsDatabaseCreated;
	}

// Path: app/src/main/java/com/wt/apkinfo/entity/ApplicationDetailsEntity.java
// public class ApplicationDetailsEntity implements ApplicationDetailsModel {
// 
// 	public String id;
// 	public String name;
// 	public String dataDir;
// 	public String nativeLibraryDir;
// 	public ComponentInfo[] activities;
// 	public ComponentInfo[] services;
// 	public ComponentInfo[] permissions;
// 	public ComponentInfo[] providers;
// 	public ComponentInfo[] receivers;
// 	public ComponentInfo[] metadata;
// 	public String[] signatures;
// 	public String versionName;
// 	public String installerPackage;
// 	public int versionCode;
// 	public long firstInstallTime;
// 	public long lastUpdateTime;
// 	public String apkFile;
// 	public int targetSdkVersion;
// 	public int minSdkVersion;
// 
// 	@Override
// 	public String getId() {
// 		return id;
// 	}
// 
// 	@Override
// 	public String getName() {
// 		return name;
// 	}
// 
// 	@Override
// 	public String getIconUri() {
// 		return "app://" + id;
// 	}
// 
// 
// }
// 
// Path: app/src/main/java/com/wt/apkinfo/entity/ApplicationEntity.java
// public class ApplicationEntity implements ApplicationModel, Comparable<ApplicationEntity> {
// 
// 	public String id;
// 	public String name;
// 	public String iconUri;
// 
// 	@Override
// 	public String getId() {
// 		return id;
// 	}
// 
// 	@Override
// 	public String getName() {
// 		return name;
// 	}
// 
// 	@Override
// 	public String getIconUri() {
// 		return iconUri;
// 	}
// 
// 	@Override
// 	public int compareTo(@NonNull ApplicationEntity applicationEntity) {
// 		return name.compareToIgnoreCase(applicationEntity.name);
// 	}
// }


// Path: app/src/main/java/com/wt/apkinfo/db/DatabaseCreator.java
import android.content.Context;
import com.hivedi.console.Console;
import com.wt.apkinfo.BuildConfig;
import com.wt.apkinfo.entity.ApplicationDetailsEntity;
import com.wt.apkinfo.entity.ApplicationEntity;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.atomic.AtomicBoolean;
import androidx.annotation.Nullable;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;

package com.wt.apkinfo.db;





/**
 * Created by kenumir on 15.09.2017.
 *
 */

public class DatabaseCreator {

	private static DatabaseCreator sInstance;
	private static final Object LOCK = new Object();

	public synchronized static DatabaseCreator getInstance() {
		if (sInstance == null) {
			synchronized (LOCK) {
				if (sInstance == null) {
					sInstance = new DatabaseCreator();
				}
			}
		}
		return sInstance;
	}

	private final MutableLiveData<Boolean> mIsDatabaseCreated = new MutableLiveData<>();
	private final AtomicBoolean mInitializing = new AtomicBoolean(true);
	private final ExecutorService exec = Executors.newSingleThreadExecutor();

	private MutableLiveData<List<ApplicationEntity>> data = new MutableLiveData<>();
	private MutableLiveData<ApplicationDetailsEntity> dataApp = new MutableLiveData<>();
	private String filter = null;

	public LiveData<Boolean> isDatabaseCreated() {
		return mIsDatabaseCreated;
	}

	public LiveData<List<ApplicationEntity>> getAllApplicationEntity() {