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

Commit b369c499 authored by Dmitri Plotnikov's avatar Dmitri Plotnikov
Browse files

Clearing photo cache on cursor change

Bug: 2539327
Change-Id: I8173490a3d40c73a23f5c4be2faa53ce7a84c1b4
parent fd8015f3
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -201,6 +201,11 @@ public class ContactPhotoLoader implements Callback {
        mBitmapCache.clear();
    }

    public void clear() {
        mPendingRequests.clear();
        mBitmapCache.clear();
    }

    /**
     * Temporarily stops loading photos from the database.
     */
+2 −0
Original line number Diff line number Diff line
@@ -3337,6 +3337,8 @@ public class ContactsListActivity extends ListActivity implements View.OnCreateC
                foundContactsText.setText(text);
            }

            mPhotoLoader.clear();

            super.changeCursor(cursor);
            // Update the indexer for the fast scroll widget
            updateIndexer(cursor);