diff options
author | calderwoodra <calderwoodra@google.com> | 2018-05-19 00:05:02 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-05-21 13:17:30 -0700 |
commit | 929539eb864822d669265b142bdcc49b6cf8ea6b (patch) | |
tree | fcaef3fac4068e3669ca5916f7a743d0d5e41bbb /java/com/android/incallui | |
parent | ea7399a7c0c8a3832a6592aee0a0372c300b11f5 (diff) |
Implement a global theme to be easily configured in Dialer.
deleted several colors and unified them across the app
migrated several alert dialogs to support alert dialogs
added many todos
migrated several tests from GoogleRobolectricTestRunner to RobolectricTestRunner
Because of the test migration:
- moved dialpad theme attributes into dialpad/theme
- moved incall ui theme attributes into incallui/theme
Bug: 79883035
Test: tap
PiperOrigin-RevId: 197246477
Change-Id: Ifc534793bc32757bbbf2007a7c40287c8d0817ad
Diffstat (limited to 'java/com/android/incallui')
27 files changed, 118 insertions, 65 deletions
diff --git a/java/com/android/incallui/ConferenceParticipantListAdapter.java b/java/com/android/incallui/ConferenceParticipantListAdapter.java index 597702b2a..5318fdb5f 100644 --- a/java/com/android/incallui/ConferenceParticipantListAdapter.java +++ b/java/com/android/incallui/ConferenceParticipantListAdapter.java @@ -357,9 +357,8 @@ public class ConferenceParticipantListAdapter extends BaseAdapter { statusTextView.setText(onHoldText); statusTextView.setVisibility(View.VISIBLE); - int onHoldColor = getContext().getColor(R.color.dialer_disabled_text_color); - nameTextView.setTextColor(onHoldColor); - numberTextView.setTextColor(onHoldColor); + nameTextView.setEnabled(false); + numberTextView.setEnabled(false); TypedValue alpha = new TypedValue(); getContext().getResources().getValue(R.dimen.alpha_hiden, alpha, true); @@ -373,10 +372,8 @@ public class ConferenceParticipantListAdapter extends BaseAdapter { TextView numberTextView) { statusTextView.setVisibility(View.GONE); - nameTextView.setTextColor( - getContext().getColor(R.color.conference_call_manager_caller_name_text_color)); - numberTextView.setTextColor( - getContext().getColor(R.color.conference_call_manager_secondary_text_color)); + nameTextView.setEnabled(true); + numberTextView.setEnabled(true); TypedValue alpha = new TypedValue(); getContext().getResources().getValue(R.dimen.alpha_enabled, alpha, true); diff --git a/java/com/android/incallui/PostCharDialogFragment.java b/java/com/android/incallui/PostCharDialogFragment.java index 1d06fd487..4bcc68e33 100644 --- a/java/com/android/incallui/PostCharDialogFragment.java +++ b/java/com/android/incallui/PostCharDialogFragment.java @@ -55,8 +55,7 @@ public class PostCharDialogFragment extends DialogFragment { buf.append(getResources().getText(R.string.wait_prompt_str)); buf.append(postDialStr); - final AlertDialog.Builder builder = - new AlertDialog.Builder(getActivity(), R.style.AlertDialogTheme); + final AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); builder.setMessage(buf.toString()); builder.setPositiveButton( diff --git a/java/com/android/incallui/RttRequestDialogFragment.java b/java/com/android/incallui/RttRequestDialogFragment.java index fa9b0e5db..5437cc699 100644 --- a/java/com/android/incallui/RttRequestDialogFragment.java +++ b/java/com/android/incallui/RttRequestDialogFragment.java @@ -83,7 +83,7 @@ public class RttRequestDialogFragment extends DialogFragment { .setOnClickListener(v -> onPositiveButtonClick()); AlertDialog alertDialog = - new AlertDialog.Builder(getActivity(), R.style.AlertDialogTheme) + new AlertDialog.Builder(getActivity()) .setCancelable(false) .setView(dialogView) .setTitle(R.string.rtt_request_dialog_title) diff --git a/java/com/android/incallui/answer/impl/res/layout/fragment_incoming_call.xml b/java/com/android/incallui/answer/impl/res/layout/fragment_incoming_call.xml index 1c8cbfdbd..589a74325 100644 --- a/java/com/android/incallui/answer/impl/res/layout/fragment_incoming_call.xml +++ b/java/com/android/incallui/answer/impl/res/layout/fragment_incoming_call.xml @@ -124,7 +124,7 @@ android:textAllCaps="true" android:textSize="14sp" android:textStyle="bold" - android:textColor="@color/background_dialer_white" + android:textColor="?android:attr/colorBackground" android:background="@drawable/urgent_call_background"/> <FrameLayout diff --git a/java/com/android/incallui/audioroute/res/values/styles.xml b/java/com/android/incallui/audioroute/res/values/styles.xml index 4484b7092..6bf9b4772 100644 --- a/java/com/android/incallui/audioroute/res/values/styles.xml +++ b/java/com/android/incallui/audioroute/res/values/styles.xml @@ -1,14 +1,29 @@ <?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> <style name="AudioRouteItem"> <item name="android:padding">16dp</item> - <item name="android:background">?android:selectableItemBackground</item> + <item name="android:background">?android:attr/selectableItemBackground</item> <item name="android:drawablePadding">24dp</item> <item name="android:gravity">center_vertical</item> <item name="android:textAppearance"> @style/TextAppearance.AppCompat.Light.Widget.PopupMenu.Large </item> - <item name="android:textColor">?android:textColorSecondary</item> + <item name="android:textColor">?android:attr/textColorSecondary</item> </style> </resources> diff --git a/java/com/android/incallui/calllocation/impl/res/layout/location_fragment.xml b/java/com/android/incallui/calllocation/impl/res/layout/location_fragment.xml index d20e32b3f..5d1e2baf7 100644 --- a/java/com/android/incallui/calllocation/impl/res/layout/location_fragment.xml +++ b/java/com/android/incallui/calllocation/impl/res/layout/location_fragment.xml @@ -85,7 +85,7 @@ android:contentDescription="@string/location_map_description" android:scaleType="centerCrop" android:visibility="invisible" - tools:src="?android:colorPrimaryDark" + tools:src="?android:attr/colorPrimaryDark" tools:visibility="visible"/> <TextView diff --git a/java/com/android/incallui/callpending/AndroidManifest.xml b/java/com/android/incallui/callpending/AndroidManifest.xml index 231553e6c..aa316a301 100644 --- a/java/com/android/incallui/callpending/AndroidManifest.xml +++ b/java/com/android/incallui/callpending/AndroidManifest.xml @@ -16,8 +16,8 @@ <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.incallui.callpending"> - <application android:theme="@style/Theme.AppCompat"> - <!-- Identical to .InCallActivity except orientation is locked to portrait --> + <application> + <!-- Identical to .InCallActivity except orientation is locked to portrait --> <activity android:directBootAware="true" android:excludeFromRecents="true" diff --git a/java/com/android/incallui/commontheme/res/values/styles.xml b/java/com/android/incallui/commontheme/res/values/styles.xml index a979cc3fc..464eda5bb 100644 --- a/java/com/android/incallui/commontheme/res/values/styles.xml +++ b/java/com/android/incallui/commontheme/res/values/styles.xml @@ -18,18 +18,18 @@ <resources> <style name="Dialer.Incall.TextAppearance" parent="android:TextAppearance.Material"> - <item name="android:textColor">?android:textColorSecondary</item> + <item name="android:textColor">?android:attr/textColorSecondary</item> <item name="android:textSize">18sp</item> </style> <style name="Dialer.Incall.TextAppearance.Large"> - <item name="android:textColor">?android:textColorPrimary</item> + <item name="android:textColor">?android:attr/textColorPrimary</item> <item name="android:textSize">36sp</item> <item name="android:fontFamily">sans-serif-light</item> </style> <style name="Dialer.Incall.TextAppearance.Label"> - <item name="android:textColor">?android:textColorPrimary</item> + <item name="android:textColor">?android:attr/textColorPrimary</item> <item name="android:textSize">12sp</item> </style> @@ -38,7 +38,7 @@ <item name="android:layout_width">24dp</item> <item name="android:layout_marginEnd">8dp</item> <item name="android:scaleType">fitCenter</item> - <item name="colorControlNormal">?android:textColorSecondary</item> + <item name="colorControlNormal">?android:attr/textColorSecondary</item> </style> <style name="Incall.Button.End" parent="android:Widget.Material.Button"> diff --git a/java/com/android/incallui/incall/impl/res/values/dimens.xml b/java/com/android/incallui/incall/impl/res/values/dimens.xml index 439dc1d33..c4a7be6c3 100644 --- a/java/com/android/incallui/incall/impl/res/values/dimens.xml +++ b/java/com/android/incallui/incall/impl/res/values/dimens.xml @@ -18,7 +18,6 @@ <resources> <dimen name="incall_button_label_margin">8dp</dimen> <dimen name="incall_button_elevation">0dp</dimen> - <dimen name="incall_end_call_spacing">116dp</dimen> <dimen name="incall_button_padding">4dp</dimen> <dimen name="incall_button_vertical_padding">8dp</dimen> <dimen name="incall_avatar_size">0dp</dimen> diff --git a/java/com/android/incallui/res/drawable/incall_background_gradient.xml b/java/com/android/incallui/res/drawable/incall_background_gradient.xml deleted file mode 100644 index 5dd927f0f..000000000 --- a/java/com/android/incallui/res/drawable/incall_background_gradient.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<shape xmlns:android="http://schemas.android.com/apk/res/android"> - <gradient - android:angle="270" - android:startColor="@color/incall_background_gradient_top" - android:centerColor="@color/incall_background_gradient_middle" - android:endColor="@color/incall_background_gradient_bottom"/> -</shape> diff --git a/java/com/android/incallui/res/layout/caller_in_conference.xml b/java/com/android/incallui/res/layout/caller_in_conference.xml index 23bb28512..3f660c5b5 100644 --- a/java/com/android/incallui/res/layout/caller_in_conference.xml +++ b/java/com/android/incallui/res/layout/caller_in_conference.xml @@ -67,8 +67,8 @@ android:id="@+id/conferenceCallerStatus" android:layout_width="wrap_content" android:layout_height="wrap_content" - style="@style/SecondaryText" - android:textColor="@color/dialer_disabled_text_color" + style="@style/Dialer.TextAppearance.Secondary" + android:enabled="false" android:visibility="gone"/> <!-- Number --> @@ -93,12 +93,12 @@ android:id="@+id/conferenceCallerSeparate" android:layout_width="@dimen/conference_call_manager_button_dimension" android:layout_height="@dimen/conference_call_manager_button_dimension" - android:background="?android:selectableItemBackgroundBorderless" + android:background="?android:attr/selectableItemBackgroundBorderless" android:clickable="true" android:contentDescription="@string/goPrivate" android:scaleType="center" android:src="@drawable/ic_call_split_white_24dp" - android:tint="@color/icon_color_grey"/> + android:tint="?colorIcon"/> <!-- "Disconnect" button which terminates the connection with this caller. --> <ImageButton @@ -106,11 +106,11 @@ android:layout_width="@dimen/conference_call_manager_button_dimension" android:layout_height="@dimen/conference_call_manager_button_dimension" android:layout_marginStart="8dp" - android:background="?android:selectableItemBackgroundBorderless" + android:background="?android:attr/selectableItemBackgroundBorderless" android:clickable="true" android:contentDescription="@string/conference_caller_disconnect_content_description" android:scaleType="center" android:src="@drawable/quantum_ic_call_end_white_24" - android:tint="@color/icon_color_grey"/> + android:tint="?colorIcon"/> </LinearLayout> <!-- End of single list element --> diff --git a/java/com/android/incallui/res/layout/frag_rtt_request_dialog.xml b/java/com/android/incallui/res/layout/frag_rtt_request_dialog.xml index ab743eb89..2e40cabd3 100644 --- a/java/com/android/incallui/res/layout/frag_rtt_request_dialog.xml +++ b/java/com/android/incallui/res/layout/frag_rtt_request_dialog.xml @@ -70,7 +70,7 @@ android:layout_gravity="end" android:paddingStart="16dp" android:paddingEnd="16dp" - android:backgroundTint="@color/dialer_theme_color" + android:backgroundTint="?android:attr/colorPrimary" android:fontFamily="sans-serif-medium" android:stateListAnimator="@null" android:text="@string/rtt_button_accept_request" diff --git a/java/com/android/incallui/res/values/strings.xml b/java/com/android/incallui/res/values/strings.xml index c7e5677c7..c18ee495e 100644 --- a/java/com/android/incallui/res/values/strings.xml +++ b/java/com/android/incallui/res/values/strings.xml @@ -16,11 +16,6 @@ --> <resources xmlns:tools="http://schemas.android.com/tools" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - - <!-- Official label of the phone app, as seen in "Manage Applications" - and other settings UIs. --> - <string name="phoneAppLabel" product="default">Phone</string> - <!-- MMI dialog strings --> <!-- Dialog label when an MMI code starts running --> diff --git a/java/com/android/incallui/sessiondata/res/drawable/answer_data_background.xml b/java/com/android/incallui/sessiondata/res/drawable/answer_data_background.xml index 1d481f3f8..cb7663369 100644 --- a/java/com/android/incallui/sessiondata/res/drawable/answer_data_background.xml +++ b/java/com/android/incallui/sessiondata/res/drawable/answer_data_background.xml @@ -19,5 +19,5 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <corners android:radius="16dp"/> - <solid android:color="@color/background_dialer_white"/> + <solid android:color="?android:attr/colorBackground"/> </shape> diff --git a/java/com/android/incallui/sessiondata/res/drawable/spam_container_background.xml b/java/com/android/incallui/sessiondata/res/drawable/spam_container_background.xml index f01fe514a..023012bb2 100644 --- a/java/com/android/incallui/sessiondata/res/drawable/spam_container_background.xml +++ b/java/com/android/incallui/sessiondata/res/drawable/spam_container_background.xml @@ -18,5 +18,5 @@ xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <corners android:radius="16dp"/> - <solid android:color="@color/background_dialer_light"/> + <solid android:color="?android:attr/colorBackgroundFloating"/> </shape>
\ No newline at end of file diff --git a/java/com/android/incallui/sessiondata/res/layout/fragment_composer_text.xml b/java/com/android/incallui/sessiondata/res/layout/fragment_composer_text.xml index b93db63ad..b7b358075 100644 --- a/java/com/android/incallui/sessiondata/res/layout/fragment_composer_text.xml +++ b/java/com/android/incallui/sessiondata/res/layout/fragment_composer_text.xml @@ -39,7 +39,7 @@ android:paddingEnd="32dp" android:minHeight="108dp" android:lineSpacingMultiplier="1.2" - android:textColor="@color/background_dialer_white" + android:textColor="?android:attr/colorBackground" android:textAppearance="@style/Dialer.Incall.TextAppearance.Message" android:background="@drawable/answer_text_only_background" app:autoSizeTextType="uniform" diff --git a/java/com/android/incallui/spam/SpamNotificationActivity.java b/java/com/android/incallui/spam/SpamNotificationActivity.java index 2cf486874..37755fc53 100644 --- a/java/com/android/incallui/spam/SpamNotificationActivity.java +++ b/java/com/android/incallui/spam/SpamNotificationActivity.java @@ -16,7 +16,6 @@ package com.android.incallui.spam; -import android.app.AlertDialog; import android.app.Dialog; import android.app.DialogFragment; import android.content.Context; @@ -27,6 +26,7 @@ import android.provider.CallLog; import android.provider.ContactsContract; import android.support.annotation.Nullable; import android.support.v4.app.FragmentActivity; +import android.support.v7.app.AlertDialog; import android.telephony.PhoneNumberUtils; import com.android.dialer.blocking.BlockedNumbersMigrator; import com.android.dialer.blocking.FilteredNumberAsyncQueryHandler; @@ -230,7 +230,7 @@ public class SpamNotificationActivity extends FragmentActivity { } }, dismissListener) - .show(getFragmentManager(), BlockReportSpamDialogs.NOT_SPAM_DIALOG_TAG); + .show(getSupportFragmentManager(), BlockReportSpamDialogs.NOT_SPAM_DIALOG_TAG); } else { reportNotSpamAndFinish(number, contactLookupResultType); } @@ -257,7 +257,9 @@ public class SpamNotificationActivity extends FragmentActivity { } }, dismissListener) - .show(getFragmentManager(), BlockReportSpamDialogs.BLOCK_REPORT_SPAM_DIALOG_TAG); + .show( + getSupportFragmentManager(), + BlockReportSpamDialogs.BLOCK_REPORT_SPAM_DIALOG_TAG); } }); } else { @@ -539,7 +541,7 @@ public class SpamNotificationActivity extends FragmentActivity { private void showSpamBlockingPromoDialog() { spamBlockingPromoHelper.showSpamBlockingPromoDialog( - getFragmentManager(), + getSupportFragmentManager(), () -> { Logger.get(this) .logImpression( diff --git a/java/com/android/incallui/telecomeventui/InternationalCallOnWifiDialogFragment.java b/java/com/android/incallui/telecomeventui/InternationalCallOnWifiDialogFragment.java index 71a8be483..cd53f26c0 100644 --- a/java/com/android/incallui/telecomeventui/InternationalCallOnWifiDialogFragment.java +++ b/java/com/android/incallui/telecomeventui/InternationalCallOnWifiDialogFragment.java @@ -109,7 +109,7 @@ public class InternationalCallOnWifiDialogFragment extends DialogFragment { alwaysWarn.setChecked(preferences.getBoolean(ALWAYS_SHOW_WARNING_PREFERENCE_KEY, false)); AlertDialog alertDialog = - new AlertDialog.Builder(getActivity(), R.style.AlertDialogTheme) + new AlertDialog.Builder(getActivity()) .setCancelable(false) .setView(dialogView) .setPositiveButton( diff --git a/java/com/android/incallui/telecomeventui/res/layout/frag_international_call_on_wifi_dialog.xml b/java/com/android/incallui/telecomeventui/res/layout/frag_international_call_on_wifi_dialog.xml index 3d8adcb0d..996bc75ba 100644 --- a/java/com/android/incallui/telecomeventui/res/layout/frag_international_call_on_wifi_dialog.xml +++ b/java/com/android/incallui/telecomeventui/res/layout/frag_international_call_on_wifi_dialog.xml @@ -35,7 +35,7 @@ android:id="@+id/always_warn" android:layout_width="match_parent" android:layout_height="wrap_content" - android:buttonTint="@color/dialer_theme_color" + android:buttonTint="?android:attr/colorPrimary" android:text="@string/always_warn" android:textColor="@color/dialer_primary_text_color" android:textSize="14sp"/> diff --git a/java/com/android/incallui/theme/AndroidManifest.xml b/java/com/android/incallui/theme/AndroidManifest.xml new file mode 100644 index 000000000..3b1a459cb --- /dev/null +++ b/java/com/android/incallui/theme/AndroidManifest.xml @@ -0,0 +1,16 @@ +<!-- + ~ 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 + --> +<manifest package="com.android.incallui.theme"/> diff --git a/java/com/android/incallui/theme/res/drawable/incall_background_gradient.xml b/java/com/android/incallui/theme/res/drawable/incall_background_gradient.xml new file mode 100644 index 000000000..996f17245 --- /dev/null +++ b/java/com/android/incallui/theme/res/drawable/incall_background_gradient.xml @@ -0,0 +1,23 @@ +<?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 + --> +<shape xmlns:android="http://schemas.android.com/apk/res/android"> + <gradient + android:angle="270" + android:startColor="@color/incall_background_gradient_top" + android:centerColor="@color/incall_background_gradient_middle" + android:endColor="@color/incall_background_gradient_bottom"/> +</shape> diff --git a/java/com/android/incallui/res/values/colors.xml b/java/com/android/incallui/theme/res/values/colors.xml index 32da57b84..cb894bbb7 100644 --- a/java/com/android/incallui/res/values/colors.xml +++ b/java/com/android/incallui/theme/res/values/colors.xml @@ -23,7 +23,7 @@ <color name="incall_dialpad_background">#ffffff</color> <!-- Background color for status bar. For portrait this will be ignored. --> - <color name="statusbar_background_color">@color/dialer_theme_color</color> + <color name="statusbar_background_color">?android:attr/colorPrimary</color> <!-- 20% opacity, theme color. --> <color name="incall_dialpad_touch_tint">@color/dialer_theme_color_20pct</color> diff --git a/java/com/android/incallui/res/values/dimens.xml b/java/com/android/incallui/theme/res/values/dimens.xml index 5688169ef..a84d8192a 100644 --- a/java/com/android/incallui/res/values/dimens.xml +++ b/java/com/android/incallui/theme/res/values/dimens.xml @@ -27,6 +27,7 @@ @dimen/dialpad_key_letters_default_size_for_single_alphabet </dimen> <dimen name="incall_dialpad_key_numbers_size">36dp</dimen> + <dimen name="incall_end_call_spacing">116dp</dimen> <!-- Dimension used to possibly down-scale high-res photo into what is suitable for notification's large icon. --> diff --git a/java/com/android/incallui/theme/res/values/strings.xml b/java/com/android/incallui/theme/res/values/strings.xml new file mode 100644 index 000000000..c61290565 --- /dev/null +++ b/java/com/android/incallui/theme/res/values/strings.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 + --> +<resources> + <!-- Official label of the phone app, as seen in "Manage Applications" + and other settings UIs. --> + <string name="phoneAppLabel" product="default">Phone</string> +</resources>
\ No newline at end of file diff --git a/java/com/android/incallui/res/values/styles.xml b/java/com/android/incallui/theme/res/values/styles.xml index 269b72111..6bbad4e87 100644 --- a/java/com/android/incallui/res/values/styles.xml +++ b/java/com/android/incallui/theme/res/values/styles.xml @@ -20,12 +20,7 @@ circular reveal animation for a new outgoing call to work correctly. We don't just use Theme.Black.NoTitleBar directly, since we want any popups or dialogs from the InCallActivity to have the correct Material style. --> - <style name="Theme.InCallScreen" parent="@style/Theme.AppCompat.NoActionBar"> - <item name="android:textColorPrimary">#ffffff</item> - <item name="android:textColorSecondary">#DDFFFFFF</item> - <item name="android:colorPrimary">@color/dialer_theme_color</item> - <item name="android:colorPrimaryDark">@color/dialer_theme_color_dark</item> - + <style name="Theme.InCallScreen" parent="@style/Dialer.ThemeBase.NoActionBar.Dark"> <item name="android:statusBarColor">@android:color/transparent</item> <item name="android:navigationBarColor">@android:color/transparent</item> <item name="android:windowDrawsSystemBarBackgrounds">true</item> @@ -33,13 +28,12 @@ <item name="dialpad_key_button_touch_tint">@color/incall_dialpad_touch_tint</item> <item name="dialpad_style">@style/InCallDialpad</item> <item name="android:windowAnimationStyle">@null</item> - <item name="android:alertDialogTheme">@style/AlertDialogTheme</item> <item name="android:windowBackground">@drawable/incall_background_gradient</item> <item name="android:windowShowWallpaper">true</item> </style> - <style name="Theme.InCallScreen.ManageConference" parent="DialerThemeBase"> + <style name="Theme.InCallScreen.ManageConference" parent="Dialer.ThemeBase"> </style> <style name="InCallDialpad" parent="Dialpad.Light"> @@ -65,18 +59,17 @@ @dimen/incall_end_call_spacing </item> <item name="dialpad_elevation">10dp</item> + <item name="dialpad_text_color_secondary">?android:attr/textColorSecondaryInverse</item> </style> <style name="AfterCallNotificationTheme" parent="@android:style/Theme.Material.Light.Dialog"> <!-- This colorAccent is to style checkboxes in the dialogs --> - <item name="colorAccent">@color/dialer_theme_color</item> - <!-- This is needed to make any alert dialogs in this activity take up minimum space --> - <item name="android:alertDialogTheme">@style/AfterCallDialogStyle</item> + <item name="colorAccent">?android:attr/colorPrimary</item> </style> <style name="AfterCallDialogStyle" parent="@android:style/Theme.Material.Light.Dialog"> <!-- This colorAccent is to style text in the dialogs --> - <item name="android:colorAccent">@color/dialer_theme_color</item> + <item name="android:colorAccent">?android:attr/colorPrimary</item> </style> <style name="Theme.Incall.DialogHolder" parent="Theme.AppCompat.Translucent"> diff --git a/java/com/android/incallui/video/impl/VideoChargesAlertDialogFragment.java b/java/com/android/incallui/video/impl/VideoChargesAlertDialogFragment.java index 6762a9d22..799345243 100644 --- a/java/com/android/incallui/video/impl/VideoChargesAlertDialogFragment.java +++ b/java/com/android/incallui/video/impl/VideoChargesAlertDialogFragment.java @@ -117,7 +117,7 @@ public class VideoChargesAlertDialogFragment extends DialogFragment { SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getActivity()); AlertDialog alertDialog = - new AlertDialog.Builder(getActivity(), R.style.AlertDialogTheme) + new AlertDialog.Builder(getActivity()) .setView(dialogView) .setPositiveButton( android.R.string.ok, diff --git a/java/com/android/incallui/video/impl/res/layout/frag_video_charges_alert_dialog.xml b/java/com/android/incallui/video/impl/res/layout/frag_video_charges_alert_dialog.xml index a547c7d69..56e1d794a 100644 --- a/java/com/android/incallui/video/impl/res/layout/frag_video_charges_alert_dialog.xml +++ b/java/com/android/incallui/video/impl/res/layout/frag_video_charges_alert_dialog.xml @@ -41,7 +41,7 @@ android:id="@+id/do_not_show" android:layout_width="match_parent" android:layout_height="wrap_content" - android:buttonTint="@color/dialer_theme_color" + android:buttonTint="?android:attr/colorPrimary" android:focusable="true" android:clickable="true" android:text="@string/do_not_show_again" |