diff --git a/res/values/strings.xml b/res/values/strings.xml index a6f2536b3a..8e5af928a8 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -584,6 +584,9 @@ Add ringtone Unable to add custom ringtone + + Failed to save image changes + Begin typing to search for conversations, messages, and contacts. No results found for \'%s\' diff --git a/src/org/thoughtcrime/securesms/scribbles/ScribbleActivity.java b/src/org/thoughtcrime/securesms/scribbles/ScribbleActivity.java index ec9d083218..4004ef4d6d 100644 --- a/src/org/thoughtcrime/securesms/scribbles/ScribbleActivity.java +++ b/src/org/thoughtcrime/securesms/scribbles/ScribbleActivity.java @@ -14,6 +14,7 @@ import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.util.Log; import android.view.View; +import android.widget.Toast; import org.thoughtcrime.securesms.PassphraseRequiredActionBarActivity; import org.thoughtcrime.securesms.R; @@ -242,6 +243,8 @@ public class ScribbleActivity extends PassphraseRequiredActionBarActivity implem @Override public void onFailure(ExecutionException e) { Log.w(TAG, e); + Toast.makeText(ScribbleActivity.this, R.string.ScribbleActivity_save_failure, Toast.LENGTH_SHORT).show(); + finish(); } }); } diff --git a/src/org/thoughtcrime/securesms/scribbles/widget/ScribbleView.java b/src/org/thoughtcrime/securesms/scribbles/widget/ScribbleView.java index d0e04376d5..ed1009b6e8 100644 --- a/src/org/thoughtcrime/securesms/scribbles/widget/ScribbleView.java +++ b/src/org/thoughtcrime/securesms/scribbles/widget/ScribbleView.java @@ -98,7 +98,7 @@ public class ScribbleView extends FrameLayout { final boolean isLowMemory = Util.isLowMemory(context); if (imageUri == null) { - future.set(null); + future.setException(new IllegalStateException("No image URI.")); return future; } @@ -126,7 +126,7 @@ public class ScribbleView extends FrameLayout { @Override public void onLoadFailed(@Nullable Drawable errorDrawable) { - future.set(null); + future.setException(new Throwable("Failed to load image.")); } });