public SelectedBitmap( Bitmap bitmap, File imagePath, int sizeKB, BitmapUtil.ByteBufferHolder buffer) { mBuilder = new Image.Builder(); mBuilder.calculateHashAndPreferences(buffer, bitmap); mBuilder.setRelativeImagePath(User.extractRelativePathInsideTempDirectory(imagePath)); mPathInTemp = imagePath; mEstimatedSizeKB = sizeKB; }
public boolean checkedBuild() { if (mBuilder.getOrigin() != null && !mBuilder.getOrigin().equals(Image.ORIGIN_IS_THE_APP) && mBuilder.getSolutions() != null && !mBuilder.getSolutions().isEmpty() && mBuilder.getAuthor() != null && !TextUtils.isEmpty(mBuilder.getAuthor().getName())) { try { mImage = mBuilder.build(); } catch (BuildException be) { Log.e("Image", "Failed building image: " + be); mImage = null; } return true; } return false; }