diff options
author | Eric Erfanian <erfanian@google.com> | 2018-05-30 16:17:27 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-05-30 16:17:27 +0000 |
commit | 2c3d81eeac82472d06027bc65d661e16735c8608 (patch) | |
tree | 293aeb0012d8db8f3f4606a75a422cf4da328477 /java/com/android/dialer/theme/hidden/res | |
parent | 4efd0ebf003e985e7cbe40d8ffd9f7ff227a9611 (diff) | |
parent | 152c3fd58f83a1882bcdc8bc55f46bbb8f3173c9 (diff) |
Merge changes Ica13ee39,I5e0fedc8,I8e7efad0,I0ecc1f91,Iee1e658a, ...
* changes:
Drop maps.impl from packages.mk
Check if ID column is null before retrieving data from the smart dial database.
Rename theme/private to theme/hidden.
Some improvements to the answer fragment layouts.
Better a11y for the bottom sheet.
Fix a few UI bugs.
Log IMS video call available state
Better a11y for contact badge in the new call log.
Use lookup key to determine the letter tile color
Use Dialer Light Theme for SpeakEasyFragment
Better a11y for new call log entries.
Use Maps SDK lite mode instead of static API for emergency call.
Updating locations where PrimaryInfo#setPhoto is used to also PrimaryInfo#setPhotoUri for new GlidePhotoManager implementation. As part of this addition, we also are cleaning the setPhoto(null) because this is not explicitly needed.
Converted ThemeUtil into a DaggerModule.
Delete AppCompatConstants
Remove photo support in PhoneNumberService
Began implementation of Dialer dark theme.
Diffstat (limited to 'java/com/android/dialer/theme/hidden/res')
9 files changed, 280 insertions, 0 deletions
diff --git a/java/com/android/dialer/theme/hidden/res/color/dialer_dark_primary_text_color.xml b/java/com/android/dialer/theme/hidden/res/color/dialer_dark_primary_text_color.xml new file mode 100644 index 000000000..82e79c631 --- /dev/null +++ b/java/com/android/dialer/theme/hidden/res/color/dialer_dark_primary_text_color.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2018 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 + --> +<!-- Primary text color in the Phone app --> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:state_enabled="false" android:color="@color/dialer_dark_text_color_disabled"/> + <item android:color="@color/dialer_dark_primary_text_color_enabled"/> +</selector> diff --git a/java/com/android/dialer/theme/hidden/res/color/dialer_dark_secondary_text_color.xml b/java/com/android/dialer/theme/hidden/res/color/dialer_dark_secondary_text_color.xml new file mode 100644 index 000000000..d057f9e65 --- /dev/null +++ b/java/com/android/dialer/theme/hidden/res/color/dialer_dark_secondary_text_color.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2018 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 + --> +<!-- Secondary text color in the Phone app --> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:state_enabled="false" android:color="@color/dialer_dark_text_color_disabled"/> + <item android:color="@color/dialer_dark_secondary_text_color_enabled"/> +</selector> diff --git a/java/com/android/dialer/theme/hidden/res/color/dialer_primary_text_color.xml b/java/com/android/dialer/theme/hidden/res/color/dialer_primary_text_color.xml new file mode 100644 index 000000000..6612b17ab --- /dev/null +++ b/java/com/android/dialer/theme/hidden/res/color/dialer_primary_text_color.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2018 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 + --> +<!-- Primary text color in the Phone app --> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:state_enabled="false" android:color="@color/dialer_text_color_disabled"/> + <item android:color="@color/dialer_primary_text_color_enabled"/> +</selector>
\ No newline at end of file diff --git a/java/com/android/dialer/theme/hidden/res/color/dialer_secondary_text_color.xml b/java/com/android/dialer/theme/hidden/res/color/dialer_secondary_text_color.xml new file mode 100644 index 000000000..e1c000aef --- /dev/null +++ b/java/com/android/dialer/theme/hidden/res/color/dialer_secondary_text_color.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2018 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 + --> +<!-- Secondary text color in the Phone app --> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:state_enabled="false" android:color="@color/dialer_text_color_disabled"/> + <item android:color="@color/dialer_secondary_text_color_enabled"/> +</selector>
\ No newline at end of file diff --git a/java/com/android/dialer/theme/hidden/res/color/settings_text_color_primary.xml b/java/com/android/dialer/theme/hidden/res/color/settings_text_color_primary.xml new file mode 100644 index 000000000..7a14d22fa --- /dev/null +++ b/java/com/android/dialer/theme/hidden/res/color/settings_text_color_primary.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* + * Copyright (C) 2015 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. + */ +--> + +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:color="@color/dialer_text_color_disabled" android:state_enabled="false"/> + <item android:color="@color/dialer_primary_text_color_enabled"/> +</selector> diff --git a/java/com/android/dialer/theme/hidden/res/color/settings_text_color_secondary.xml b/java/com/android/dialer/theme/hidden/res/color/settings_text_color_secondary.xml new file mode 100644 index 000000000..c4baefd33 --- /dev/null +++ b/java/com/android/dialer/theme/hidden/res/color/settings_text_color_secondary.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* + * Copyright (C) 2015 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. + */ +--> + +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:color="@color/dialer_text_color_disabled" android:state_enabled="false"/> + <item android:color="@color/dialer_secondary_text_color_enabled"/> +</selector> diff --git a/java/com/android/dialer/theme/hidden/res/values/colors_dialer_dark.xml b/java/com/android/dialer/theme/hidden/res/values/colors_dialer_dark.xml new file mode 100644 index 000000000..7dc894be9 --- /dev/null +++ b/java/com/android/dialer/theme/hidden/res/values/colors_dialer_dark.xml @@ -0,0 +1,40 @@ +<!-- + ~ Copyright (C) 2018 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> + <!-- Essential theme colors --> + <color name="dialer_dark_theme_color">#2A56C6</color> + <color name="dialer_dark_theme_color_dark">#1C3AA9</color> + <color name="dialer_dark_secondary_color">#F50057</color> + <color name="dialer_dark_theme_color_20pct">#332A56C6</color> + + <!-- Text colors --> + <color name="dialer_dark_primary_text_color_enabled">#FFFFFF</color> + <color name="dialer_dark_secondary_text_color_enabled">#DDFFFFFF</color> + <color name="dialer_dark_text_color_disabled">#333333</color> + <color name="dialer_dark_text_hint_color">#DE78909C</color> + <color name="dialer_dark_primary_text_color_inverse">#212121</color> + <color name="dialer_dark_secondary_text_color_inverse">#636363</color> + <color name="dialer_dark_snackbar_action_text_color">#4285F4</color> + + <!-- Background colors --> + <color name="dialer_dark_background">#212121</color> + <color name="dialer_dark_background_floating">#000000</color> + + <!-- Other useful colors --> + <color name="dialer_dark_icon_color">#C4000000</color> + <color name="dialer_icon_color_secondary">#E1E1E1</color> + <color name="dialer_icon_color_white">#FFFFFF</color> +</resources> diff --git a/java/com/android/dialer/theme/hidden/res/values/colors_dialer_light.xml b/java/com/android/dialer/theme/hidden/res/values/colors_dialer_light.xml new file mode 100644 index 000000000..1d5a1e7ee --- /dev/null +++ b/java/com/android/dialer/theme/hidden/res/values/colors_dialer_light.xml @@ -0,0 +1,51 @@ +<!-- + ~ Copyright (C) 2018 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 + --> + <!-- Essential theme colors --> + <color name="dialer_theme_color">#2A56C6</color> + <color name="dialer_theme_color_dark">#1C3AA9</color> + <color name="dialer_secondary_color">#F50057</color> + <color name="dialer_theme_color_20pct">#332A56C6</color> + + <!-- Text colors --> + <color name="dialer_primary_text_color_enabled">#212121</color> + <color name="dialer_secondary_text_color_enabled">#636363</color> + <color name="dialer_text_color_disabled">#9E9E9E</color> + <color name="dialer_text_hint_color">#DE78909C</color> + <color name="dialer_primary_text_color_inverse">#FFFFFF</color> + <color name="dialer_secondary_text_color_inverse">#DDFFFFFF</color> + <color name="dialer_snackbar_action_text_color">#4285F4</color> + + <!-- Background colors --> + <color name="dialer_background_light">#FAFAFA</color> + <color name="dialer_background_floating_light">#FFFFFF</color> + + <!-- Other useful colors --> + <color name="dialer_icon_color">#89000000</color> + <color name="dialer_icon_color_secondary">#E1E1E1</color> + <color name="dialer_icon_color_white">#FFFFFF</color> +</resources> diff --git a/java/com/android/dialer/theme/hidden/res/values/styles.xml b/java/com/android/dialer/theme/hidden/res/values/styles.xml new file mode 100644 index 000000000..90e452993 --- /dev/null +++ b/java/com/android/dialer/theme/hidden/res/values/styles.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2018 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> + <!-- Update to Theme.AppCompat.Light.NoActionBar once we no longer depend on ActionBars. --> + <style name="Dialer" parent="Theme.AppCompat.Light"> + <!-- Used to automatically style all buttons in Dialer --> + <item name="android:textAppearanceButton">@style/DialerButtonTextStyle</item> + <item name="android:colorButtonNormal">?android:attr/colorPrimary</item> + + <!-- Used to style link text --> + <item name="android:textColorLink">@color/dialer_theme_color</item> + + <!-- Used to automatically style AlertDialogs --> + <item name="alertDialogTheme">@style/AlertDialogTheme</item> + <item name="android:alertDialogTheme">@style/AlertDialogTheme</item> + </style> + + <style name="Dialer.Dark" parent="Theme.AppCompat"> + <!-- Used to automatically style all buttons in Dialer --> + <item name="android:textAppearanceButton">@style/DialerButtonTextStyle</item> + <item name="android:colorButtonNormal">?android:attr/colorPrimary</item> + + <!-- Used to style link text --> + <item name="android:textColorLink">@color/dialer_theme_color</item> + + <!-- Used to automatically style AlertDialogs --> + <item name="alertDialogTheme">@style/AlertDialogTheme</item> + <item name="android:alertDialogTheme">@style/AlertDialogTheme</item> + </style> + + <!-- Used to style all Dialer's button's text. Every button is awarded this for free if the parent + activity's theme extends from Dialer.ThemeBase(.NoActionBar) or doesn't specify a theme. --> + <style name="DialerButtonTextStyle" parent="@android:style/TextAppearance.Material.Widget.Button"> + <item name="android:textColor">?android:attr/textColorPrimaryInverse</item> + </style> + + <!-- Used to style all Dialer's AlertDialogs. Every button is awarded this for free if the parent + activity's theme extends from Dialer.ThemeBase(.NoActionBar) or doesn't specify a theme. --> + <style name="AlertDialogTheme" parent="Theme.AppCompat.Light.Dialog.Alert"> + <item name="android:textColorPrimary">@color/dialer_primary_text_color</item> + <!-- TODO(a bug): figure out why ?android:attr/colorPrimary doesn't work here --> + <item name="android:colorAccent">@color/dialer_theme_color</item> + <item name="colorAccent">@color/dialer_theme_color</item> + </style> +</resources> |