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

Commit ee13bb02 authored by Rohit Yengisetty's avatar Rohit Yengisetty
Browse files

Fix NPE within CallLogFragment

The action of the DeepLink callback manipulates views. This callback
can take place before onCreateView() has been called. Moved the callback's
execution to after the views have been created.

Change-Id: I055fb0f7087ce0bf0c9116805ec64a9d2812c99d
Issue-Id: CYNGNOS-2815
(cherry picked from commit 388f6362)
parent f8b4de95
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -255,7 +255,6 @@ public class CallLogFragment extends Fragment implements CallLogQueryHandler.Lis
                mVoicemailPlaybackPresenter,
                mBlockContactPresenter,
                isShowingRecentsTab);
        areDeepLinkEnabled();
    }

    /** Called by the CallLogQueryHandler when the list of calls has been fetched or updated. */
@@ -348,7 +347,7 @@ public class CallLogFragment extends Fragment implements CallLogQueryHandler.Lis
                }
            }
        });

        areDeepLinksEnabled();
        fetchCalls();
        return view;
    }
@@ -388,8 +387,7 @@ public class CallLogFragment extends Fragment implements CallLogQueryHandler.Lis
            refreshData();
            mAdapter.startCache();
        }

        areDeepLinkEnabled();
        areDeepLinksEnabled();
    }

    @Override
@@ -525,7 +523,7 @@ public class CallLogFragment extends Fragment implements CallLogQueryHandler.Lis
        }
    }

    private void areDeepLinkEnabled() {
    private void areDeepLinksEnabled() {
        DeepLinkIntegrationManager.getInstance().isApplicationTypeEnabled(
                DeepLinkApplicationType.NOTE, mDeepLinkEnabledCallback);
    }