diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2017-10-06 23:31:58 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-10-06 23:31:58 +0000 |
commit | 30842b209934a98a0220673e2ab6b4bf500c15d3 (patch) | |
tree | 97dfa798809e8d909538eeaac34b4dba8725059d /java/com/android/dialer | |
parent | 087329e9256f56b5ba8252fd7c0d5b468797cb96 (diff) | |
parent | 2ee642d42907e76de3ffb7b13f12961b82892a9a (diff) |
Merge changes I620aacf3,Ie5fe2fc1,I41f98fe2
* changes:
Adding Future method for DialerPhoneNumberUtil
Show on hold in management screen for conference call.
Allow for multi-line transcription error messages
Diffstat (limited to 'java/com/android/dialer')
5 files changed, 28 insertions, 6 deletions
diff --git a/java/com/android/dialer/app/res/layout/call_log_list_item.xml b/java/com/android/dialer/app/res/layout/call_log_list_item.xml index 39dcbacf5..4382008d4 100644 --- a/java/com/android/dialer/app/res/layout/call_log_list_item.xml +++ b/java/com/android/dialer/app/res/layout/call_log_list_item.xml @@ -170,8 +170,7 @@ android:layout_height="wrap_content" android:textColor="@color/call_log_voicemail_transcript_branding_color" android:textSize="@dimen/call_log_voicemail_transcription_text_size" - android:paddingTop="2dp" - android:maxLines="1"/> + android:paddingTop="2dp"/> </LinearLayout> diff --git a/java/com/android/dialer/common/concurrent/DialerExecutors.java b/java/com/android/dialer/common/concurrent/DialerExecutors.java index 81b3c5cb3..850c28cdd 100644 --- a/java/com/android/dialer/common/concurrent/DialerExecutors.java +++ b/java/com/android/dialer/common/concurrent/DialerExecutors.java @@ -21,7 +21,7 @@ import android.support.annotation.NonNull; import com.android.dialer.common.Assert; import com.android.dialer.common.LogUtil; import com.android.dialer.common.concurrent.DialerExecutor.Worker; -import java.util.concurrent.Executor; +import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.ThreadFactory; @@ -136,7 +136,7 @@ public final class DialerExecutors { return new DefaultDialerExecutorFactory().createNonUiTaskBuilder(Assert.isNotNull(worker)); } - private static final Executor lowPriorityThreadPool = + private static final ExecutorService lowPriorityThreadPool = Executors.newFixedThreadPool( 5, new ThreadFactory() { @@ -155,7 +155,7 @@ public final class DialerExecutors { * <p>This exists to prevent each individual dialer component from having to create its own * threads/pools, which would result in the application having more threads than really necessary. */ - public static Executor getLowPriorityThreadPool() { + public static ExecutorService getLowPriorityThreadPool() { return lowPriorityThreadPool; } } diff --git a/java/com/android/dialer/phonenumberproto/DialerPhoneNumberUtil.java b/java/com/android/dialer/phonenumberproto/DialerPhoneNumberUtil.java index cc509f41b..a00ee75bf 100644 --- a/java/com/android/dialer/phonenumberproto/DialerPhoneNumberUtil.java +++ b/java/com/android/dialer/phonenumberproto/DialerPhoneNumberUtil.java @@ -16,6 +16,7 @@ package com.android.dialer.phonenumberproto; +import android.support.annotation.AnyThread; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.annotation.WorkerThread; @@ -24,6 +25,8 @@ import com.android.dialer.DialerPhoneNumber; import com.android.dialer.DialerPhoneNumber.RawInput; import com.android.dialer.common.Assert; import com.android.dialer.common.LogUtil; +import com.google.common.util.concurrent.ListenableFuture; +import com.google.common.util.concurrent.ListeningExecutorService; import com.google.i18n.phonenumbers.NumberParseException; import com.google.i18n.phonenumbers.PhoneNumberUtil; import com.google.i18n.phonenumbers.PhoneNumberUtil.MatchType; @@ -46,7 +49,7 @@ public class DialerPhoneNumberUtil { /** * Parses the provided raw phone number into a {@link DialerPhoneNumber}. * - * @see PhoneNumberUtil#parse(String, String) + * @see PhoneNumberUtil#parse(CharSequence, String) */ @WorkerThread public DialerPhoneNumber parse(@Nullable String numberToParse, @Nullable String defaultRegion) { @@ -73,6 +76,21 @@ public class DialerPhoneNumberUtil { } /** + * Parses the provided raw phone number into a Future result of {@link DialerPhoneNumber}. + * + * <p>Work is run on the provided {@link ListeningExecutorService}. + * + * @see PhoneNumberUtil#parse(CharSequence, String) + */ + @AnyThread + public ListenableFuture<DialerPhoneNumber> parse( + @Nullable String numberToParse, + @Nullable String defaultRegion, + @NonNull ListeningExecutorService service) { + return service.submit(() -> parse(numberToParse, defaultRegion)); + } + + /** * Returns true if the two numbers were parseable by libphonenumber and are an {@link * MatchType#EXACT_MATCH} or if they have the same raw input. */ diff --git a/java/com/android/dialer/theme/res/values/colors.xml b/java/com/android/dialer/theme/res/values/colors.xml index 0e6f54fb6..3c8cabbc5 100644 --- a/java/com/android/dialer/theme/res/values/colors.xml +++ b/java/com/android/dialer/theme/res/values/colors.xml @@ -42,6 +42,8 @@ <!-- Secondary text color in the Phone app --> <color name="dialer_secondary_text_color">#636363</color> + <!-- 38% opacity --> + <color name="dialer_secondary_text_color_hiden">#61000000</color> <!-- Color of the theme of the Dialer app --> <color name="dialtacts_theme_color">@color/dialer_theme_color</color> diff --git a/java/com/android/dialer/theme/res/values/dimens.xml b/java/com/android/dialer/theme/res/values/dimens.xml index ee52c97e6..972cb535c 100644 --- a/java/com/android/dialer/theme/res/values/dimens.xml +++ b/java/com/android/dialer/theme/res/values/dimens.xml @@ -38,4 +38,7 @@ <dimen name="actionbar_contentInsetStart">72dp</dimen> <dimen name="call_log_icon_margin">2dp</dimen> + + <item name="alpha_enabled" format="float" type="dimen">1.0</item> + <item name="alpha_hiden" format="float" type="dimen">0.54</item> </resources> |