Commit 735e1d74 authored by Tanmoy Mollik's avatar Tanmoy Mollik Committed by Commit Bot

[Android] Fix settings screen crash

ProfileDataCache attempts to access ProfileData from ProfileDataSource
without first registering an observer. Detailed stack trace is linked to
the bug.

Bug: 1131499
Change-Id: Ifdfcedf1c4974a2cb3812ecaef93c4f490a01e71
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2426503
Commit-Queue: Tanmoy Mollik <triploblastic@chromium.org>
Commit-Queue: Alice Wang <aliceywang@chromium.org>
Reviewed-by: default avatarAlice Wang <aliceywang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#809813}
parent b00f1ed7
......@@ -197,8 +197,8 @@ public class ProfileDataCache implements ProfileDownloader.Observer, ProfileData
ThreadUtils.assertOnUiThread();
if (mObservers.isEmpty()) {
if (mProfileDataSource != null) {
updateCacheFromProfileDataSource();
mProfileDataSource.addObserver(this);
updateCacheFromProfileDataSource();
} else {
ProfileDownloader.addObserver(this);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment