summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerfanian <erfanian@google.com>2017-10-25 16:27:25 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-10-25 16:27:25 +0000
commit45f81b3dc6551d0dd38c70dba361695a30ec97ed (patch)
tree6be745c52fff43a474773931608c28a3096f41ac
parent1c67992f40db93ad0b8aeb38656222370276ede7 (diff)
parent951b417e5793d816dac9cfe8c255059654de086a (diff)
Merge "Refactor client platform checks to be DRY."
am: 951b417e57 Change-Id: I3690af879b544e4ad2c462e13b8f0580227ac6c1
-rw-r--r--java/com/android/dialer/assisteddialing/AssistedDialingMediatorImpl.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/java/com/android/dialer/assisteddialing/AssistedDialingMediatorImpl.java b/java/com/android/dialer/assisteddialing/AssistedDialingMediatorImpl.java
index 202760751..1cc9732bb 100644
--- a/java/com/android/dialer/assisteddialing/AssistedDialingMediatorImpl.java
+++ b/java/com/android/dialer/assisteddialing/AssistedDialingMediatorImpl.java
@@ -17,9 +17,9 @@
package com.android.dialer.assisteddialing;
import android.annotation.TargetApi;
-import android.os.Build;
import android.os.Build.VERSION_CODES;
import android.support.annotation.NonNull;
+import android.support.annotation.RequiresApi;
import com.android.dialer.common.LogUtil;
import java.util.Optional;
@@ -30,6 +30,7 @@ import java.util.Optional;
* call is eligible for assisted dialing, and performing the transformation of numbers eligible for
* assisted dialing.
*/
+@RequiresApi(VERSION_CODES.N)
final class AssistedDialingMediatorImpl implements AssistedDialingMediator {
private final LocationDetector locationDetector;
@@ -50,8 +51,9 @@ final class AssistedDialingMediatorImpl implements AssistedDialingMediator {
@Override
public boolean isPlatformEligible() {
- return Build.VERSION.SDK_INT >= Build.VERSION_CODES.N
- && Build.VERSION.SDK_INT <= Build.VERSION_CODES.O;
+ // This impl is only instantiated if it passes platform checks in ConcreteCreator,
+ // so we return true here.
+ return true;
}
/**