package com.epson.cameracopy.p006ui;

import android.app.Application;
import android.arch.lifecycle.AndroidViewModel;
import android.arch.lifecycle.LiveData;
import android.os.AsyncTask;


/* renamed from: com.epson.cameracopy.ui.ImageFolderFileViewModel */
public class ImageFolderFileViewModel extends AndroidViewModel {
    /* access modifiers changed from: private */
    public final Application mApplication;
    /* access modifiers changed from: private */
    public final ImageFolderFileLiveData mImageFolderFileLiveData = new ImageFolderFileLiveData();

    public ImageFolderFileViewModel(@NonNull Application application) {
        super(application);
        this.mApplication = application;
    }

    public void setOriginalData(@NonNull ImageFolderFile imageFolderFile) {
        this.mImageFolderFileLiveData.setImageFolderFile(imageFolderFile);
    }

    public ImageFolderFileLiveData getData() {
        return this.mImageFolderFileLiveData;
    }

    /* renamed from: com.epson.cameracopy.ui.ImageFolderFileViewModel$ImageFolderFileLiveData */
    public class ImageFolderFileLiveData extends LiveData<ImageFolderFile> {
        public ImageFolderFileLiveData() {
        }

        public void setImageFolderFile(@NonNull final ImageFolderFile imageFolderFile) {
            new AsyncTask<Void, Void, ImageFolderFile>() {
                protected void onPostExecute(ImageFolderFile imageFolderFile) {
                    ImageFolderFileViewModel.this.mImageFolderFileLiveData.setValue(imageFolderFile);
                }

                protected ImageFolderFile doInBackground(Void... voidArr) {
                    ImageFolderFile imageFolderFile = imageFolderFile;
                    if (imageFolderFile == null) {
                        return null;
                    }
                    imageFolderFile.prepareImage(ImageFolderFileViewModel.this.mApplication);
                    return imageFolderFile;
                }
            }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, new Void[0]);
        }
    }
}
