summaryrefslogtreecommitdiff
path: root/src/com
diff options
context:
space:
mode:
authorBrandon Maxwell <maxwelb@google.com>2016-03-16 00:31:01 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-03-16 00:31:01 +0000
commit136338e18ecfc99558689a01b95729fb05101e0c (patch)
treed9cac0a17faaaca87854302c1b961641aecdef35 /src/com
parent234f705cc0e0e3799939777e7cccf5d05dd44fb6 (diff)
parente1473ca3cafa69f9c51031a9cfeb1aebb6821d2c (diff)
Updating GreatWall to use modifiable flag am: 22375e147e
am: e1473ca3ca * commit 'e1473ca3cafa69f9c51031a9cfeb1aebb6821d2c': Updating GreatWall to use modifiable flag
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/dialer/compat/FilteredNumberCompat.java10
-rw-r--r--src/com/android/dialerbind/ObjectFactory.java5
2 files changed, 9 insertions, 6 deletions
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());
}
/**
diff --git a/src/com/android/dialerbind/ObjectFactory.java b/src/com/android/dialerbind/ObjectFactory.java
index 9f75e3912..875a89308 100644
--- a/src/com/android/dialerbind/ObjectFactory.java
+++ b/src/com/android/dialerbind/ObjectFactory.java
@@ -52,6 +52,11 @@ public class ObjectFactory {
return false;
}
+ public static boolean isNewBlockingEnabled(Context context) {
+ // TODO(maxwelb) - Set to true when ready to enable feature
+ return false;
+ }
+
@Nullable
public static ExtendedBlockingButtonRenderer newExtendedBlockingButtonRenderer(
Context context, ExtendedBlockingButtonRenderer.Listener listener) {