kopia lustrzana https://github.com/ryukoposting/Signal-Android
Add safety net for when the user has disabled their contacts app.
rodzic
678a6f86ab
commit
e85adad2b4
|
@ -21,6 +21,7 @@ import android.animation.Animator;
|
|||
import android.animation.LayoutTransition;
|
||||
import android.animation.ValueAnimator;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.res.Configuration;
|
||||
|
@ -1810,7 +1811,12 @@ public class ConversationFragment extends LoggingFragment implements Multiselect
|
|||
|
||||
@Override
|
||||
protected void onPostExecute(Intent intent) {
|
||||
try {
|
||||
startActivityForResult(intent, CODE_ADD_EDIT_CONTACT);
|
||||
} catch (ActivityNotFoundException e) {
|
||||
Log.w(TAG, "Could not locate contacts activity", e);
|
||||
Toast.makeText(requireContext(), R.string.ConversationFragment__contacts_app_not_found, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
}.execute();
|
||||
}
|
||||
|
|
|
@ -325,6 +325,8 @@
|
|||
</plurals>
|
||||
|
||||
<!-- ConversationFragment -->
|
||||
<!-- Toast text when contacts activity is not found -->
|
||||
<string name="ConversationFragment__contacts_app_not_found">Contacts app not found.</string>
|
||||
<plurals name="ConversationFragment_delete_selected_messages">
|
||||
<item quantity="one">Delete selected message?</item>
|
||||
<item quantity="other">Delete selected messages?</item>
|
||||
|
|
Ładowanie…
Reference in New Issue