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

Commit 6559aed2 authored by Bai Tao's avatar Bai Tao
Browse files

Avoid showing empty call log when activity is paused

Change-Id: I480444933af797fc0dda43745d197b0691bc786b
parent 82dc5b62
Loading
Loading
Loading
Loading
+12 −4
Original line number Diff line number Diff line
@@ -730,8 +730,10 @@ public class RecentCallsListActivity extends ListActivity
        sFormattingType = FORMATTING_TYPE_INVALID;
    }


    @Override
    protected void onResume() {
    protected void onStart() {
        super.onStart();
        // The adapter caches looked up numbers, clear it so they will get
        // looked up again.
        if (mAdapter != null) {
@@ -739,19 +741,25 @@ public class RecentCallsListActivity extends ListActivity
        }

        startQuery();
        resetNewCallsFlag();
    }

    @Override
    protected void onResume() {
        resetNewCallsFlag();
        super.onResume();

        mAdapter.mPreDrawListener = null; // Let it restart the thread after next draw
    }

    @Override
    protected void onPause() {
        super.onPause();

        // Kill the requests thread
        mAdapter.stopRequestProcessing();
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        mAdapter.changeCursor(null);
    }