diff options
author | Eric Erfanian <erfanian@google.com> | 2017-02-22 16:32:36 -0800 |
---|---|---|
committer | Eric Erfanian <erfanian@google.com> | 2017-03-01 09:56:52 -0800 |
commit | ccca31529c07970e89419fb85a9e8153a5396838 (patch) | |
tree | a7034c0a01672b97728c13282a2672771cd28baa /java/com/android/dialer/theme | |
parent | e7ae4624ba6f25cb8e648db74e0d64c0113a16ba (diff) |
Update dialer sources.
Test: Built package and system image.
This change clobbers the old source, and is an export
from an internal Google repository.
The internal repository was forked form Android in March,
and this change includes modifications since then, to
near the v8 release.
Since the fork, we've moved code from monolithic to independent modules. In addition,
we've switched to Blaze/Bazel as the build sysetm. This export, however, still uses make.
New dependencies have been added:
- Dagger
- Auto-Value
- Glide
- Libshortcutbadger
Going forward, development will still be in Google3, and the Gerrit release
will become an automated export, with the next drop happening in ~ two weeks.
Android.mk includes local modifications from ToT.
Abridged changelog:
Bug fixes
● Not able to mute, add a call when using Phone app in multiwindow mode
● Double tap on keypad triggering multiple key and tones
● Reported spam numbers not showing as spam in the call log
● Crash when user tries to block number while Phone app is not set as default
● Crash when user picks a number from search auto-complete list
Visual Voicemail (VVM) improvements
● Share Voicemail audio via standard exporting mechanisms that support file attachment
(email, MMS, etc.)
● Make phone number, email and web sites in VVM transcript clickable
● Set PIN before declining VVM Terms of Service {Carrier}
● Set client type for outbound visual voicemail SMS {Carrier}
New incoming call and incall UI on older devices
(Android M)
● Updated Phone app icon
● New incall UI (large buttons, button labels)
● New and animated Answer/Reject gestures
Accessibility
● Add custom answer/decline call buttons on answer screen for touch exploration
accessibility services
● Increase size of touch target
● Add verbal feedback when a Voicemail fails to load
● Fix pressing of Phone buttons while in a phone call using Switch Access
● Fix selecting and opening contacts in talkback mode
● Split focus for ‘Learn More’ link in caller id & spam to help distinguish similar text
Other
● Backup & Restore for App Preferences
● Prompt user to enable Wi-Fi calling if the call ends due to out of service and Wi-Fi is
connected
● Rename “Dialpad” to “Keypad”
● Show "Private number" for restricted calls
● Delete unused items (vcard, add contact, call history) from Phone menu
Change-Id: I2a7e53532a24c21bf308bf0a6d178d7ddbca4958
Diffstat (limited to 'java/com/android/dialer/theme')
11 files changed, 338 insertions, 0 deletions
diff --git a/java/com/android/dialer/theme/AndroidManifest.xml b/java/com/android/dialer/theme/AndroidManifest.xml new file mode 100644 index 000000000..7c1e4effd --- /dev/null +++ b/java/com/android/dialer/theme/AndroidManifest.xml @@ -0,0 +1,3 @@ +<manifest + package="com.android.dialer.theme"> +</manifest> diff --git a/java/com/android/dialer/theme/res/anim/front_back_switch_button_animation.xml b/java/com/android/dialer/theme/res/anim/front_back_switch_button_animation.xml new file mode 100644 index 000000000..30986457b --- /dev/null +++ b/java/com/android/dialer/theme/res/anim/front_back_switch_button_animation.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<set + xmlns:android="http://schemas.android.com/apk/res/android"> + <set + android:ordering="sequentially"> + <objectAnimator + android:duration="500" + android:propertyName="rotation" + android:valueFrom="0.0" + android:valueTo="-180.0" + android:valueType="floatType" + android:interpolator="@android:interpolator/fast_out_slow_in"/> + </set> +</set>
\ No newline at end of file diff --git a/java/com/android/dialer/theme/res/animator/activated_button_elevation.xml b/java/com/android/dialer/theme/res/animator/activated_button_elevation.xml new file mode 100644 index 000000000..b8ea4e8e6 --- /dev/null +++ b/java/com/android/dialer/theme/res/animator/activated_button_elevation.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item + android:state_enabled="true" + android:state_activated="true"> + <objectAnimator + android:duration="@android:integer/config_shortAnimTime" + android:propertyName="translationZ" + android:valueFrom="0dp" + android:valueTo="4dp" + android:valueType="floatType"/> + </item> + <item> + <objectAnimator + android:duration="@android:integer/config_shortAnimTime" + android:propertyName="translationZ" + android:valueFrom="4dp" + android:valueTo="0dp" + android:valueType="floatType"/> + </item> +</selector> diff --git a/java/com/android/dialer/theme/res/animator/button_elevation.xml b/java/com/android/dialer/theme/res/animator/button_elevation.xml new file mode 100644 index 000000000..8dd019e14 --- /dev/null +++ b/java/com/android/dialer/theme/res/animator/button_elevation.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item + android:state_enabled="true" + android:state_pressed="true"> + <objectAnimator + android:duration="@android:integer/config_shortAnimTime" + android:propertyName="translationZ" + android:valueFrom="0dp" + android:valueTo="4dp" + android:valueType="floatType"/> + </item> + <item> + <objectAnimator + android:duration="@android:integer/config_shortAnimTime" + android:propertyName="translationZ" + android:valueFrom="4dp" + android:valueTo="0dp" + android:valueType="floatType"/> + </item> +</selector> diff --git a/java/com/android/dialer/theme/res/drawable/front_back_switch_button.xml b/java/com/android/dialer/theme/res/drawable/front_back_switch_button.xml new file mode 100644 index 000000000..2dc3eb1fa --- /dev/null +++ b/java/com/android/dialer/theme/res/drawable/front_back_switch_button.xml @@ -0,0 +1,75 @@ +<?xml version="1.0" encoding="utf-8"?> +<vector + xmlns:android="http://schemas.android.com/apk/res/android" + android:name="front_back_switch_button" + android:width="56dp" + android:viewportWidth="56" + android:height="56dp" + android:viewportHeight="56"> + <group + android:name="layer_3_outlines" + android:translateX="32.0015" + android:translateY="27.00208"> + <group + android:name="layer_3_outlines_pivot" + android:translateX="-4.25" + android:translateY="-7.25"> + <group + android:name="group_1" + android:translateX="4.25" + android:translateY="7.25001"> + <path + android:name="path_1" + android:pathData="M 2.0,-5.0 c 0.0,0.0 -2.16999816895,0.0 -2.16999816895,0.0 c 0.0,0.0 -1.83000183105,-2.0 -1.83000183105,-2.0 c 0.0,0.0 -2.0,0.0 -2.0,0.0 c 0.0,0.0 0.0,5.0 0.0,5.0 c 1.65600585938,0.0 3.0,1.34399414062 3.0,3.0 c 0.0,1.65600585938 -1.34399414062,3.0 -3.0,3.0 c 0.0,0.0 -3.0,0.00181579589844 -3.0,0.00181579589844 c 0.0,0.0 0.001953125,2.99415588379 0.001953125,2.99415588379 c 0.0,0.0 2.998046875,0.0040283203125 2.998046875,0.0040283203125 c 0.0,0.0 6.0,0.0 6.0,0.0 c 1.10000610352,0.0 2.0,-0.899993896484 2.0,-2.0 c 0.0,0.0 0.0,-8.0 0.0,-8.0 c 0.0,-1.10000610352 -0.899993896484,-2.0 -2.0,-2.0 Z" + android:fillColor="#FFFFFFFF"/> + </group> + </group> + </group> + <group + android:name="layer_1_outlines" + android:translateX="24.00099" + android:translateY="26.99992"> + <group + android:name="layer_1_outlines_pivot" + android:translateX="-4.249" + android:translateY="-7.25"> + <group + android:name="group_2" + android:translateX="4.249" + android:translateY="7.25"> + <path + android:name="path_2" + android:pathData="M 3.99900817871,4.0 c -1.65501403809,-0.00099182128906 -2.99800109863,-1.34399414062 -2.99800109863,-3.0 c 0.0,-1.6549987793 1.34298706055,-2.99899291992 2.99800109863,-3.0 c 0.0,0.0 1.0,0.00008 1.0,0.00008 c 0.0,0.0 0.0,-5.0 0.0,-5.0 c 0.0,0.0 -1.0,-0.00008 -1.0,-0.00008 c 0.0,0.0 -1.99800109863,0.0 -1.99800109863,0.0 c 0.0,0.0 -1.83000183105,2.0 -1.83000183105,2.0 c 0.0,0.0 -2.17001342773,0.0 -2.17001342773,0.0 c -1.1009979248,0.0 -2.0,0.899993896484 -2.0,2.0 c 0.0,0.0 0.0,8.0 0.0,8.0 c 0.0,1.10000610352 0.899002075195,2.0 2.0,2.0 c 0.0,0.0 5.99801635742,0.0 5.99801635742,0.0 c 0.0,0.0 0.0,-3.0 0.0,-3.0 Z" + android:fillColor="#FFFFFFFF"/> + </group> + </group> + </group> + <group + android:name="layer_10_outlines" + android:translateX="28.00001" + android:translateY="27.99999"> + <group + android:name="layer_10_outlines_pivot" + android:translateX="-19.25" + android:translateY="-19.25005"> + <group + android:name="group_3" + android:translateX="20.25" + android:translateY="9.75001"> + <path + android:name="path_3" + android:pathData="M 12.4349975586,-3.93499755859 c -3.70999145508,-3.71000671387 -8.57299804688,-5.56500244141 -13.4349975586,-5.56500244141 c -4.8630065918,0.0 -9.72500610352,1.85499572754 -13.4349975586,5.56500244141 c -0.337005615234,0.336990356445 -0.652008056641,0.688003540039 -0.956008911133,1.04399108887 c 0.0,0.0 -2.60899353027,-2.60899353027 -2.60899353027,-2.60899353027 c 0.0,0.0 0.0,7.0 0.0,7.0 c 0.0,0.0 7.0,0.0 7.0,0.0 c 0.0,0.0 -2.97300720215,-2.97300720215 -2.97300720215,-2.97300720215 c 0.300003051758,-0.360992431641 0.616012573242,-0.711990356445 0.952011108398,-1.0479888916 c 3.21099853516,-3.21099853516 7.47999572754,-4.97900390625 12.0209960938,-4.97900390625 c 4.54100036621,0.0 8.80999755859,1.76800537109 12.0209960938,4.97900390625 c 3.31401062012,3.31399536133 4.97100830078,7.66799926758 4.97100830078,12.0209960938 c 0.0,0.0 2.00799560547,0.0 2.00799560547,0.0 c 0.0,-4.86199951172 -1.85499572754,-9.72500610352 -5.56500244141,-13.4349975586 Z" + android:fillColor="#FFFFFFFF"/> + </group> + <group + android:name="group_4" + android:translateX="18.25" + android:translateY="28.75011"> + <path + android:name="path_4" + android:pathData="M 18.0,-1.5 c 0.0,0.0 -7.0,0.0 -7.0,0.0 c 0.0,0.0 2.97300720215,2.97300720215 2.97300720215,2.97300720215 c -0.300003051758,0.360992431641 -0.616012573242,0.711990356445 -0.952011108398,1.0479888916 c -3.21099853516,3.21099853516 -7.47999572754,4.97900390625 -12.0209960938,4.97900390625 c -4.54100036621,0.0 -8.80999755859,-1.76800537109 -12.0209960938,-4.97900390625 c -3.31401062012,-3.31399536133 -4.97100830078,-7.66799926758 -4.97100830078,-12.0209960938 c 0.0,0.0 -2.00799560547,0.0 -2.00799560547,0.0 c 0.0,4.86199951172 1.85499572754,9.72500610352 5.56500244141,13.4349975586 c 3.70999145508,3.71000671387 8.57299804688,5.56500244141 13.4349975586,5.56500244141 c 4.8630065918,0.0 9.72500610352,-1.85499572754 13.4349975586,-5.56500244141 c 0.337005615234,-0.336990356445 0.652008056641,-0.688003540039 0.956008911133,-1.04400634766 c 0.0,0.0 2.60899353027,2.60900878906 2.60899353027,2.60900878906 c 0.0,0.0 0.0,-7.0 0.0,-7.0 Z" + android:fillColor="#FFFFFFFF"/> + </group> + </group> + </group> +</vector>
\ No newline at end of file diff --git a/java/com/android/dialer/theme/res/drawable/front_back_switch_button_animation.xml b/java/com/android/dialer/theme/res/drawable/front_back_switch_button_animation.xml new file mode 100644 index 000000000..14cda1ba8 --- /dev/null +++ b/java/com/android/dialer/theme/res/drawable/front_back_switch_button_animation.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8"?> +<animated-vector + xmlns:android="http://schemas.android.com/apk/res/android" + android:drawable="@drawable/front_back_switch_button"> + <target + android:name="layer_10_outlines" + android:animation="@anim/front_back_switch_button_animation"/> +</animated-vector>
\ No newline at end of file diff --git a/java/com/android/dialer/theme/res/values/colors.xml b/java/com/android/dialer/theme/res/values/colors.xml new file mode 100644 index 000000000..bf43e01af --- /dev/null +++ b/java/com/android/dialer/theme/res/values/colors.xml @@ -0,0 +1,64 @@ +<!-- + ~ Copyright (C) 2012 The Android Open Source Project + ~ + ~ Licensed under the Apache License, Version 2.0 (the "License"); + ~ you may not use this file except in compliance with the License. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License + --> + +<resources> + <!-- Note: The following colors are used in the Dialer settings screens. Since Dialer's settings + link into the Telephony settings as well, changes to these colors should be mirrored in + Telephony: + + Android source path: packages/apps/PhoneCommon/res/values/colors.xml + - Local: dialer_theme_color Android Source: dialer_theme_color + - Local: dialer_theme_color_dark Android Source: dialer_theme_color_dark + Android source path: packages/services/Telecomm/res/values/colors.xml + - Local: dialer_theme_color Android Source: theme_color + - Local: dialer_theme_color_dark Android Source: dialer_settings_color_dark + --> + <color name="dialer_theme_color">#2A56C6</color> + <color name="dialer_theme_color_dark">#1C3AA9</color> + + <color name="dialer_snackbar_action_text_color">#4285F4</color> + <color name="dialer_theme_color_20pct">#332A56C6</color> + + <color name="dialer_secondary_color">#e91e63</color> + + <!-- Primary text color in the Phone app --> + <color name="dialer_primary_text_color">#333333</color> + <color name="dialer_edit_text_hint_color">#DE78909C</color> + + <!-- Secondary text color in the Phone app --> + <color name="dialer_secondary_text_color">#636363</color> + + <!-- Color of the theme of the Dialer app --> + <color name="dialtacts_theme_color">@color/dialer_theme_color</color> + + <!-- White background for dialer --> + <color name="background_dialer_white">#ffffff</color> + <color name="background_dialer_call_log_list_item">@color/background_dialer_white</color> + + <!-- Colors for the notification actions --> + <color name="notification_action_accept">#097138</color> + <color name="notification_action_dismiss">#A52714</color> + <color name="notification_action_end_call">#FFFFFF</color> + <color name="notification_action_answer_video">#097138</color> + + <!-- Background color of action bars --> + <color name="actionbar_background_color">@color/dialer_theme_color</color> + + <!-- Background color of title bars in recents --> + <color name="titlebar_in_recents_background_color">@color/dialer_theme_color_dark</color> + + <color name="blue_grey_100">#CFD8DC</color> +</resources> diff --git a/java/com/android/dialer/theme/res/values/dimens.xml b/java/com/android/dialer/theme/res/values/dimens.xml new file mode 100644 index 000000000..2d11ecc84 --- /dev/null +++ b/java/com/android/dialer/theme/res/values/dimens.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <dimen name="call_log_action_icon_margin_start">16dp</dimen> + <dimen name="call_log_action_icon_dimen">24dp</dimen> + <dimen name="call_log_action_horizontal_padding">24dp</dimen> + + <dimen name="call_log_actions_left_padding">64dp</dimen> + <dimen name="call_log_actions_top_padding">8dp</dimen> + <dimen name="call_log_actions_bottom_padding">8dp</dimen> + <dimen name="call_log_primary_text_size">16sp</dimen> + <dimen name="call_log_detail_text_size">12sp</dimen> + <dimen name="call_log_day_group_heading_size">14sp</dimen> + <dimen name="call_log_voicemail_transcription_text_size">14sp</dimen> + <!-- Height of the call log actions section for each call log entry --> + <dimen name="call_log_action_height">48dp</dimen> + <dimen name="call_log_day_group_padding_top">15dp</dimen> + <dimen name="call_log_day_group_padding_bottom">9dp</dimen> + + <!-- Height of the actionBar - this is 8dps bigger than the platform standard to give more + room to the search box--> + <dimen name="action_bar_height">56dp</dimen> + <dimen name="action_bar_height_large">64dp</dimen> + <dimen name="action_bar_elevation">3dp</dimen> + <dimen name="tab_height">48dp</dimen> + <!-- actionbar height + tab height --> + <dimen name="actionbar_and_tab_height">107dp</dimen> + <dimen name="actionbar_contentInsetStart">72dp</dimen> +</resources> diff --git a/java/com/android/dialer/theme/res/values/strings.xml b/java/com/android/dialer/theme/res/values/strings.xml new file mode 100644 index 000000000..3a954ae14 --- /dev/null +++ b/java/com/android/dialer/theme/res/values/strings.xml @@ -0,0 +1,27 @@ +<!-- + ~ Copyright (C) 2016 The Android Open Source Project + ~ + ~ Licensed under the Apache License, Version 2.0 (the "License"); + ~ you may not use this file except in compliance with the License. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License + --> + +<resources> + <!-- String used to display calls from unknown numbers in the call log --> + <string name="unknown">Unknown</string> + + <!-- String used to display calls from pay phone in the call log --> + <string name="payphone">Payphone</string> + + <!-- Title for the activity that dials the phone. This is the name + used in the Launcher icon. --> + <string name="launcherActivityLabel">Phone</string> +</resources> diff --git a/java/com/android/dialer/theme/res/values/styles.xml b/java/com/android/dialer/theme/res/values/styles.xml new file mode 100644 index 000000000..ac94d0687 --- /dev/null +++ b/java/com/android/dialer/theme/res/values/styles.xml @@ -0,0 +1,56 @@ +<!-- + ~ Copyright (C) 2012 The Android Open Source Project + ~ + ~ Licensed under the Apache License, Version 2.0 (the "License"); + ~ you may not use this file except in compliance with the License. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License + --> + +<resources> + + <style name="CallLogCardStyle" parent="CardView"> + <item name="android:layout_width">match_parent</item> + <item name="android:layout_height">wrap_content</item> + <item name="android:layout_margin">4dp</item> + <item name="android:baselineAligned">false</item> + <item name="cardCornerRadius">2dp</item> + <item name="cardBackgroundColor">@color/background_dialer_call_log_list_item</item> + </style> + + <!-- Inherit from Theme.Material.Light.Dialog instead of Theme.Material.Light.Dialog.Alert + since the Alert dialog is private. They are identical anyway. --> + <style name="AlertDialogTheme" parent="@android:style/Theme.Material.Light.Dialog"> + <item name="android:colorAccent">@color/dialtacts_theme_color</item> + </style> + + <style name="TextActionStyle"> + <item name="android:layout_width">wrap_content</item> + <item name="android:layout_height">@dimen/call_log_action_height</item> + <item name="android:gravity">end|center_vertical</item> + <item name="android:paddingStart">@dimen/call_log_action_horizontal_padding</item> + <item name="android:paddingEnd">@dimen/call_log_action_horizontal_padding</item> + <item name="android:textColor">@color/dialtacts_theme_color</item> + <item name="android:fontFamily">"sans-serif-medium"</item> + <item name="android:focusable">true</item> + <item name="android:singleLine">true</item> + <item name="android:textAllCaps">true</item> + </style> + + <style name="DialerButtonTextStyle" parent="@android:style/TextAppearance.Material.Widget.Button"> + <item name="android:textColor">#fff</item> + </style> + + <style name="DialerActionBarBaseStyle" + parent="@style/Widget.AppCompat.Light.ActionBar.Solid.Inverse"> + <item name="android:background">@color/actionbar_background_color</item> + <item name="background">@color/actionbar_background_color</item> + </style> +</resources> diff --git a/java/com/android/dialer/theme/res/values/themes.xml b/java/com/android/dialer/theme/res/values/themes.xml new file mode 100644 index 000000000..452b36929 --- /dev/null +++ b/java/com/android/dialer/theme/res/values/themes.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + + <style name="DialerThemeBase" parent="@style/Theme.AppCompat.Light.DarkActionBar"> + <item name="android:textColorPrimary">@color/dialer_primary_text_color</item> + <item name="android:textColorSecondary">@color/dialer_secondary_text_color</item> + <!-- This is used for title bar color in recents --> + <item name="android:colorPrimary">@color/titlebar_in_recents_background_color</item> + <item name="android:colorPrimaryDark">@color/dialer_theme_color_dark</item> + <item name="android:colorControlActivated">@color/dialer_theme_color</item> + <item name="android:colorButtonNormal">@color/dialer_theme_color</item> + <item name="android:colorAccent">@color/dialtacts_theme_color</item> + <item name="android:alertDialogTheme">@style/AlertDialogTheme</item> + <item name="android:textAppearanceButton">@style/DialerButtonTextStyle</item> + + <item name="android:actionBarStyle">@style/DialerActionBarBaseStyle</item> + <item name="actionBarStyle">@style/DialerActionBarBaseStyle</item> + <item name="android:actionBarSize">@dimen/action_bar_height</item> + <item name="actionBarSize">@dimen/action_bar_height</item> + </style> +</resources> |