diff options
author | Android Dialer <noreply@google.com> | 2018-06-27 13:13:29 -0700 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2018-06-27 13:13:29 -0700 |
commit | 95194792e7f479979bef3290165952480a97af58 (patch) | |
tree | 3a32e17e1d9c79e8306119d817fd7964fbef82d1 /java/com/android/dialer/assisteddialing/NumberTransformer.java | |
parent | 9f15322971cf09dfed32517a575db887ca180f02 (diff) | |
parent | cd5228be7f4f00d3972343c5c30ca6faebf86986 (diff) |
Merge changes I0f1ed20a,Ia68d3b13,I72047d59,Ieff3c7fb,I53c3896a, ... am: 1b4ec7b954
am: cd5228be7f
Change-Id: I47f0dcffa5d58cf182bfd59a01ef8baac9e69204
Diffstat (limited to 'java/com/android/dialer/assisteddialing/NumberTransformer.java')
-rw-r--r-- | java/com/android/dialer/assisteddialing/NumberTransformer.java | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/java/com/android/dialer/assisteddialing/NumberTransformer.java b/java/com/android/dialer/assisteddialing/NumberTransformer.java index 8bbad329d..eabf8564e 100644 --- a/java/com/android/dialer/assisteddialing/NumberTransformer.java +++ b/java/com/android/dialer/assisteddialing/NumberTransformer.java @@ -16,9 +16,6 @@ package com.android.dialer.assisteddialing; -import android.annotation.TargetApi; -import android.os.Build.VERSION_CODES; -import android.support.annotation.NonNull; import android.text.TextUtils; import com.android.dialer.common.LogUtil; import com.android.dialer.strictmode.StrictModeUtils; @@ -33,21 +30,9 @@ final class NumberTransformer { private final PhoneNumberUtil phoneNumberUtil; private final Constraints constraints; - public NumberTransformer(Constraints constraints) { + NumberTransformer(Constraints constraints) { this.constraints = constraints; - this.phoneNumberUtil = StrictModeUtils.bypass(() -> PhoneNumberUtil.getInstance()); - } - - /** - * Returns a boolean for callers to quickly determine whether or not the AssistedDialingMediator - * thinks an attempt at assisted dialing is likely to succeed. - */ - public boolean canDoAssistedDialingTransformation( - @NonNull String numberToCheck, - @NonNull String userHomeCountryCode, - @NonNull String userRoamingCountryCode) { - return constraints.meetsPreconditions( - numberToCheck, userHomeCountryCode, userRoamingCountryCode); + this.phoneNumberUtil = StrictModeUtils.bypass(PhoneNumberUtil::getInstance); } /** @@ -57,9 +42,7 @@ final class NumberTransformer { * transformation fails, we return an empty optional. The operation can be considered a success * when the Optional we return has a value set. */ - @SuppressWarnings("AndroidApiChecker") // Use of optional - @TargetApi(VERSION_CODES.N) - public Optional<TransformationInfo> doAssistedDialingTransformation( + Optional<TransformationInfo> doAssistedDialingTransformation( String numbertoTransform, String userHomeCountryCode, String userRoamingCountryCode) { if (!constraints.meetsPreconditions( |