Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ccb7644c authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Fix ContactLoader IllegalArgumentException crash"

parents 2ba142e8 2f9c708d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -126,6 +126,9 @@ public abstract class ContactBrowseListFragment extends

                Log.e(TAG, "Error: No contact ID or lookup key for contact " + mUri);
                return null;
            } catch (Exception e) {
                Log.e(TAG, "Error loading the contact: " + mUri, e);
                return null;
            } finally {
                if (cursor != null) {
                    cursor.close();
+9 −6
Original line number Diff line number Diff line
@@ -2027,9 +2027,12 @@ public class QuickContactActivity extends ContactsActivity {
                return;
            }
            if (data.isError()) {
                // This shouldn't ever happen, so throw an exception. The {@link ContactLoader}
                // should log the actual exception.
                throw new IllegalStateException("Failed to load contact", data.getException());
                // This means either the contact is invalid or we had an
                // internal error such as an acore crash.
                Log.i(TAG, "Failed to load contact: " + ((ContactLoader)loader).getLookupUri());
                Toast.makeText(QuickContactActivity.this, R.string.invalidContactMessage,
                        Toast.LENGTH_LONG).show();
                finish();
            }
            if (data.isNotFound()) {
                if (!mHasAlreadyBeenOpened) {