diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2017-10-24 22:41:00 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-10-24 22:41:00 +0000 |
commit | daa1c44c00f3c598223639c9b80a52cf41db51ba (patch) | |
tree | e4c88a1862b157dc858abe73e52b077bf7b96948 /java/com/android/dialer/assisteddialing/Constraints.java | |
parent | ef7338cf787301c573fde8129bf8880d7faba040 (diff) | |
parent | 938468da6f5c225ebb161a68bd949c9cf3261892 (diff) |
Merge "Rename the new bubble package name from "bubble" to "newbubble"."
Diffstat (limited to 'java/com/android/dialer/assisteddialing/Constraints.java')
-rw-r--r-- | java/com/android/dialer/assisteddialing/Constraints.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/java/com/android/dialer/assisteddialing/Constraints.java b/java/com/android/dialer/assisteddialing/Constraints.java index c4b5278cb..3766a6daa 100644 --- a/java/com/android/dialer/assisteddialing/Constraints.java +++ b/java/com/android/dialer/assisteddialing/Constraints.java @@ -25,6 +25,8 @@ import android.telephony.PhoneNumberUtils; import android.text.TextUtils; import android.util.ArraySet; import com.android.dialer.common.LogUtil; +import com.android.dialer.logging.DialerImpression; +import com.android.dialer.logging.Logger; import com.google.i18n.phonenumbers.NumberParseException; import com.google.i18n.phonenumbers.PhoneNumberUtil; import com.google.i18n.phonenumbers.Phonenumber.PhoneNumber; @@ -216,6 +218,8 @@ final class Constraints { // framework return Optional.of(phoneNumberUtil.parseAndKeepRawInput(numberToParse, userHomeCountryCode)); } catch (NumberParseException e) { + Logger.get(context) + .logImpression(DialerImpression.Type.ASSISTED_DIALING_CONSTRAINT_PARSING_FAILURE); LogUtil.i("Constraints.parsePhoneNumber", "could not parse the number"); return Optional.empty(); } @@ -227,6 +231,8 @@ final class Constraints { if (parsedPhoneNumber.get().hasCountryCode() && parsedPhoneNumber.get().getCountryCodeSource() != CountryCodeSource.FROM_DEFAULT_COUNTRY) { + Logger.get(context) + .logImpression(DialerImpression.Type.ASSISTED_DIALING_CONSTRAINT_NUMBER_HAS_COUNTRY_CODE); LogUtil.i( "Constraints.isNotInternationalNumber", "phone number already provided the country code"); return false; @@ -244,6 +250,8 @@ final class Constraints { if (parsedPhoneNumber.get().hasExtension() && !TextUtils.isEmpty(parsedPhoneNumber.get().getExtension())) { + Logger.get(context) + .logImpression(DialerImpression.Type.ASSISTED_DIALING_CONSTRAINT_NUMBER_HAS_EXTENSION); LogUtil.i("Constraints.doesNotHaveExtension", "phone number has an extension"); return false; } |