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

Commit 8a99ff69 authored by blong's avatar blong Committed by Gerrit - the friendly Code Review server
Browse files

Fix delete call log screen force close in split mode

- When drag call log screen down in split mode, the fragment will
  recreate several times and missed to set listener,so use the
  static variable for it.contacts screen will have same issue,
  we will set it again after activity create

Change-Id: Iff6752240e76e47e83710e715684fc84cfb7bc57
CRs-Fixed: 1069312
parent b4551733
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -714,6 +714,10 @@ public class MultiPickContactsActivity extends Activity implements ViewPager.OnP
        }
    }

    public CheckListListener createListener() {
        return new CheckListListener();
    }

    private void configureSearchMode() {
        TextView topDividerLine = (TextView) findViewById(R.id.multi_pick_top_divider);
        if (mSearchUiVisible) {
+3 −0
Original line number Diff line number Diff line
@@ -254,6 +254,9 @@ public class ContactsFragment extends ListFragment {
                checkedList = new ArrayList<String>();
            }
        }
        if (mCheckListListener == null)
            mCheckListListener = ((MultiPickContactsActivity) getActivity())
                    .createListener();
        mHeaderView = new View(mContext);
        AbsListView.LayoutParams layoutParams = new AbsListView.LayoutParams(
                AbsListView.LayoutParams.MATCH_PARENT,
+4 −0
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@ import android.widget.ListView;
import android.widget.AbsListView;

import com.android.contacts.R;
import com.android.contacts.activities.MultiPickContactsActivity;
import com.android.contacts.list.OnCheckListActionListener;

public class DelCallLogFragment extends ListFragment
@@ -95,6 +96,9 @@ public class DelCallLogFragment extends ListFragment
    public void onActivityCreated(Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);

        if (mCheckListListener == null)
            mCheckListListener = ((MultiPickContactsActivity) getActivity())
                    .createListener();
        if (mDelCallLogAdapter == null) {
            mDelCallLogAdapter = new DelCallLogAdapter(mContext);
            mDelCallLogAdapter.setCheckListListener(mCheckListListener);