From 22375e147e1a4e3b7479ed7c60ef84ef77fb652d Mon Sep 17 00:00:00 2001 From: Brandon Maxwell Date: Tue, 15 Mar 2016 16:29:23 -0700 Subject: Updating GreatWall to use modifiable flag + Rather than using a runtime flag which has to be set for the build, this CL changes the GreatWall feature to be enableable at runtime. Bug: 26664600 Change-Id: Ib0e3229da41a08c67076b7bd171ebbc4b35a4c69 --- src/com/android/dialer/compat/FilteredNumberCompat.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/com/android/dialer/compat') diff --git a/src/com/android/dialer/compat/FilteredNumberCompat.java b/src/com/android/dialer/compat/FilteredNumberCompat.java index 232504796..08bf6c82a 100644 --- a/src/com/android/dialer/compat/FilteredNumberCompat.java +++ b/src/com/android/dialer/compat/FilteredNumberCompat.java @@ -14,7 +14,7 @@ * limitations under the License */ - package com.android.dialer.compat; +package com.android.dialer.compat; import com.google.common.base.Preconditions; @@ -43,6 +43,7 @@ import com.android.dialer.filterednumber.BlockNumberDialogFragment.Callback; import com.android.dialer.filterednumber.BlockedNumbersMigrator; import com.android.dialer.filterednumber.BlockedNumbersSettingsActivity; import com.android.dialer.filterednumber.MigrateBlockedNumbersDialogFragment; +import com.android.dialerbind.ObjectFactory; import java.util.ArrayList; import java.util.List; @@ -58,10 +59,6 @@ public class FilteredNumberCompat { protected static final String HAS_MIGRATED_TO_NEW_BLOCKING_KEY = "migratedToNewBlocking"; - // Flag to enable feature. - // TODO(maxwelb) remove when ready to enable new filtering. - private static final boolean isNewFilteringEnabled = false; - private static Boolean isEnabledForTest; /** @@ -122,7 +119,8 @@ public class FilteredNumberCompat { if (isEnabledForTest != null) { return CompatUtils.isNCompatible() && isEnabledForTest; } - return CompatUtils.isNCompatible() && isNewFilteringEnabled; + return CompatUtils.isNCompatible() && ObjectFactory + .isNewBlockingEnabled(DialerApplication.getContext()); } /** -- cgit v1.2.3