mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-10-05 15:23:29 +01:00
Fixed crash when ScribbleView failed to save.
Previously, if an operation failed, we set the result to "null". However, this was a mistake. Setting the result at all assumes success. Instead, we need to set an exception so the ListenableFuture knows that the operation failed.
This commit is contained in:
1 parent
e65cd2636b
commit
542e962be9
3 files changed
+8
-2
No files matched your search
@@ -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();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user