diff options
Diffstat (limited to 'java/com/android/dialer/assisteddialing/NumberTransformer.java')
-rw-r--r-- | java/com/android/dialer/assisteddialing/NumberTransformer.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/java/com/android/dialer/assisteddialing/NumberTransformer.java b/java/com/android/dialer/assisteddialing/NumberTransformer.java index f01d1a08f..0156f2ec2 100644 --- a/java/com/android/dialer/assisteddialing/NumberTransformer.java +++ b/java/com/android/dialer/assisteddialing/NumberTransformer.java @@ -57,7 +57,7 @@ final class NumberTransformer { */ @SuppressWarnings("AndroidApiChecker") // Use of optional @TargetApi(VERSION_CODES.N) - public Optional<String> doAssistedDialingTransformation( + public Optional<TransformationInfo> doAssistedDialingTransformation( String numbertoTransform, String userHomeCountryCode, String userRoamingCountryCode) { if (!constraints.meetsPreconditions( @@ -88,6 +88,13 @@ final class NumberTransformer { } // TODO Verify the transformed number is still valid? - return Optional.of(transformedNumber); + return Optional.of( + TransformationInfo.builder() + .setOriginalNumber(numbertoTransform) + .setTransformedNumber(transformedNumber) + .setUserHomeCountryCode(userHomeCountryCode) + .setUserRoamingCountryCode(userRoamingCountryCode) + .setTransformedNumberCountryCallingCode(phoneNumber.getCountryCode()) + .build()); } } |