package epson.print.imgsel;

import android.content.Intent;

import com.epson.cameracopy.p006ui.ImagePreviewActivity;

import java.util.ArrayList;

public class CameraCopyImageSelectActivity extends ImageSelectActivity {
    private static final int REQUEST_CODE_IMAGE_PREVIEW = 104;

    public boolean singleImageMode() {
        return true;
    }

    public ImageFinder getImageFinder() {
        return new PhotoImageFinder();
    }

    protected void onActivityResult(int i, int i2, Intent intent) {
        super.onActivityResult(i, i2, intent);
        if (i == 104) {
            finish();
        }
    }

    protected void goNext() {
        ArrayList<String> fileArrayList = getImageSelector().getFileArrayList();
        if (fileArrayList.size() > 0) {
            Intent intent = new Intent(this, ImagePreviewActivity.class);
            intent.putExtra(ImagePreviewActivity.PARAM_PICTURE_FILENAME, fileArrayList.get(0));
            startActivityForResult(intent, 104);
        }
    }
}
