Fix build break do to upstream Flags change
am: e79df16981
Change-Id: If8103b4f28043d6c233e727cc2917789fc9110aa
diff --git a/src/com/android/contacts/ContactsDrawerActivity.java b/src/com/android/contacts/ContactsDrawerActivity.java
index 018754a..8126291 100644
--- a/src/com/android/contacts/ContactsDrawerActivity.java
+++ b/src/com/android/contacts/ContactsDrawerActivity.java
@@ -221,8 +221,7 @@
protected void onCreate(Bundle savedState) {
super.onCreate(savedState);
- mShouldShowAccountSwitcher =
- Flags.getInstance(this).getBoolean(Experiments.ACCOUNT_SWITCHER);
+ mShouldShowAccountSwitcher = Flags.getInstance().getBoolean(Experiments.ACCOUNT_SWITCHER);
mContactListFilterController = ContactListFilterController.getInstance(this);
mContactListFilterController.checkFilterValidity(false);
diff --git a/src/com/android/contacts/common/util/AccountFilterUtil.java b/src/com/android/contacts/common/util/AccountFilterUtil.java
index dbe8659..3f8ac41 100644
--- a/src/com/android/contacts/common/util/AccountFilterUtil.java
+++ b/src/com/android/contacts/common/util/AccountFilterUtil.java
@@ -91,8 +91,7 @@
if (filter.filterType == ContactListFilter.FILTER_TYPE_CUSTOM) {
filterController.selectCustomFilter();
} else {
- filterController.setContactListFilter(filter,
- shouldPersistFilter(filterController.getContext(), filter));
+ filterController.setContactListFilter(filter, shouldPersistFilter(filter));
}
}
}
@@ -239,8 +238,8 @@
.getNameLabel().toString();
}
- public static boolean shouldPersistFilter(Context context, ContactListFilter filter) {
- if (Flags.getInstance(context).getBoolean(Experiments.ACCOUNT_SWITCHER)) {
+ public static boolean shouldPersistFilter(ContactListFilter filter) {
+ if (Flags.getInstance().getBoolean(Experiments.ACCOUNT_SWITCHER)) {
return true;
}
return filter != null && filter.isContactsFilterType();
diff --git a/src/com/android/contacts/list/DefaultContactBrowseListFragment.java b/src/com/android/contacts/list/DefaultContactBrowseListFragment.java
index bdc29d6..d491afd 100644
--- a/src/com/android/contacts/list/DefaultContactBrowseListFragment.java
+++ b/src/com/android/contacts/list/DefaultContactBrowseListFragment.java
@@ -458,7 +458,7 @@
mContactListFilterController = ContactListFilterController.getInstance(getContext());
mContactListFilterController.checkFilterValidity(false);
mDeviceLocalFactory = ObjectFactory.getDeviceLocalAccountTypeFactory(getContext());
- if (!Flags.getInstance(getContext()).getBoolean(Experiments.ACCOUNT_SWITCHER)
+ if (!Flags.getInstance().getBoolean(Experiments.ACCOUNT_SWITCHER)
&& !mIsRecreatedInstance) {
// Use FILTER_TYPE_ALL_ACCOUNTS filter if the instance is not a re-created one.
// This is useful when user upgrades app while an account filter was
@@ -962,7 +962,7 @@
*/
private void setContactListFilter(ContactListFilter filter) {
mContactListFilterController.setContactListFilter(filter,
- AccountFilterUtil.shouldPersistFilter(getContext(), filter));
+ AccountFilterUtil.shouldPersistFilter(filter));
}
@Override