diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2017-10-25 16:24:25 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-10-25 16:24:25 +0000 |
commit | 951b417e5793d816dac9cfe8c255059654de086a (patch) | |
tree | 6be745c52fff43a474773931608c28a3096f41ac /java/com/android/dialer/assisteddialing/AssistedDialingMediatorImpl.java | |
parent | daa1c44c00f3c598223639c9b80a52cf41db51ba (diff) | |
parent | 35ec9146f0f44898f2249be3e505ff7bef171e11 (diff) |
Merge "Refactor client platform checks to be DRY."
Diffstat (limited to 'java/com/android/dialer/assisteddialing/AssistedDialingMediatorImpl.java')
-rw-r--r-- | java/com/android/dialer/assisteddialing/AssistedDialingMediatorImpl.java | 8 |
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; } /** |