Fixing a resource loading issue.
Bug: 2500266
Change-Id: I3ae726c20cf222fa19d4b2fdbd18c961f4004504
diff --git a/src/com/android/contacts/model/Sources.java b/src/com/android/contacts/model/Sources.java
index b6422fb..c786752 100644
--- a/src/com/android/contacts/model/Sources.java
+++ b/src/com/android/contacts/model/Sources.java
@@ -51,6 +51,7 @@
public class Sources extends BroadcastReceiver implements OnAccountsUpdateListener {
private static final String TAG = "Sources";
+ private Context mContext;
private Context mApplicationContext;
private AccountManager mAccountManager;
@@ -79,6 +80,7 @@
* Internal constructor that only performs initial parsing.
*/
private Sources(Context context) {
+ mContext = context;
mApplicationContext = context.getApplicationContext();
mAccountManager = AccountManager.get(mApplicationContext);
@@ -288,7 +290,7 @@
return source;
} else {
// Not inflated, but requested that we force-inflate
- source.ensureInflated(mApplicationContext, inflateLevel);
+ source.ensureInflated(mContext, inflateLevel);
return source;
}
}