Fix crash in QC during orientation change
- Also made the ContactLoader a little more robust. The cached result
is now a new instance so that it is recognized by the LoaderManager
as new data
Bug:6356584
Change-Id: I4e2eca92501308a8724b00771038555fa59b3260
diff --git a/src/com/android/contacts/ContactLoader.java b/src/com/android/contacts/ContactLoader.java
index c0399e4..5f5c1cb 100644
--- a/src/com/android/contacts/ContactLoader.java
+++ b/src/com/android/contacts/ContactLoader.java
@@ -1297,6 +1297,9 @@
* new result will be delivered
*/
public void upgradeToFullContact() {
+ // Everything requested already? Nothing to do, so let's bail out
+ if (mLoadGroupMetaData && mLoadInvitableAccountTypes && mLoadStreamItems) return;
+
mLoadGroupMetaData = true;
mLoadInvitableAccountTypes = true;
mLoadStreamItems = true;
@@ -1346,6 +1349,6 @@
* contact. If the next load is for a different contact, the cached result will be dropped
*/
public void cacheResult() {
- sCachedResult = mContact;
+ sCachedResult = new Result(mContact);
}
}