From 31666e420ceab82b7f1cde0da01bbdf8a16f0a34 Mon Sep 17 00:00:00 2001 From: Eric Erfanian Date: Tue, 10 Jul 2018 18:41:39 +0000 Subject: Revert "UI refresh for reply with sms bottom sheet." This reverts commit 27d7f0a5a307c15dee5a048ec36ca256fa90d1bd. Change-Id: I492d6039813499517ca2243b0e04bfea3d957233 --- java/com/android/dialer/theme/base/Theme.java | 3 --- .../dialer/theme/base/impl/AospThemeImpl.java | 17 +--------------- .../theme/base/res/values/theme_dialer_dark.xml | 8 +------- .../theme/base/res/values/theme_dialer_light.xml | 5 ----- .../res/drawable/bottom_sheet_background.xml | 23 ---------------------- .../dialer/theme/common/res/values/styles.xml | 9 --------- .../answer/impl/SmsBottomSheetFragment.java | 13 +++++------- 7 files changed, 7 insertions(+), 71 deletions(-) delete mode 100644 java/com/android/dialer/theme/common/res/drawable/bottom_sheet_background.xml (limited to 'java') diff --git a/java/com/android/dialer/theme/base/Theme.java b/java/com/android/dialer/theme/base/Theme.java index 3356a018c..2a9975b4b 100644 --- a/java/com/android/dialer/theme/base/Theme.java +++ b/java/com/android/dialer/theme/base/Theme.java @@ -44,9 +44,6 @@ public interface Theme { @StyleRes int getApplicationThemeRes(); - @StyleRes - int getBottomSheetStyleRes(); - Context getThemedContext(Context context); LayoutInflater getThemedLayoutInflator(LayoutInflater inflater); diff --git a/java/com/android/dialer/theme/base/impl/AospThemeImpl.java b/java/com/android/dialer/theme/base/impl/AospThemeImpl.java index cd1e16684..35dcef27c 100644 --- a/java/com/android/dialer/theme/base/impl/AospThemeImpl.java +++ b/java/com/android/dialer/theme/base/impl/AospThemeImpl.java @@ -102,25 +102,10 @@ public class AospThemeImpl implements Theme { @Override public @StyleRes int getApplicationThemeRes() { switch (getTheme()) { - case LIGHT: - case LIGHT_M2: - return R.style.Dialer_ThemeBase_NoActionBar; case DARK: return R.style.Dialer_Dark_ThemeBase_NoActionBar; - case UNKNOWN: - default: - throw Assert.createIllegalStateFailException("Theme hasn't been set yet."); - } - } - - @Override - public @StyleRes int getBottomSheetStyleRes() { - switch (getTheme()) { case LIGHT: - case LIGHT_M2: - return R.style.DialerBottomSheetDialogStyle_Light; - case DARK: - return R.style.DialerBottomSheetDialogStyle_Dark; + return R.style.Dialer_ThemeBase_NoActionBar; case UNKNOWN: default: throw Assert.createIllegalStateFailException("Theme hasn't been set yet."); diff --git a/java/com/android/dialer/theme/base/res/values/theme_dialer_dark.xml b/java/com/android/dialer/theme/base/res/values/theme_dialer_dark.xml index 282ddfebb..d2cc0fc9c 100644 --- a/java/com/android/dialer/theme/base/res/values/theme_dialer_dark.xml +++ b/java/com/android/dialer/theme/base/res/values/theme_dialer_dark.xml @@ -64,10 +64,4 @@ @android:color/white @color/dialer_dark_theme_color_20pct - - - - + \ No newline at end of file diff --git a/java/com/android/dialer/theme/base/res/values/theme_dialer_light.xml b/java/com/android/dialer/theme/base/res/values/theme_dialer_light.xml index b0428ee46..69ecba41e 100644 --- a/java/com/android/dialer/theme/base/res/values/theme_dialer_light.xml +++ b/java/com/android/dialer/theme/base/res/values/theme_dialer_light.xml @@ -84,11 +84,6 @@ @android:style/Animation - - diff --git a/java/com/android/dialer/theme/common/res/drawable/bottom_sheet_background.xml b/java/com/android/dialer/theme/common/res/drawable/bottom_sheet_background.xml deleted file mode 100644 index 558277d42..000000000 --- a/java/com/android/dialer/theme/common/res/drawable/bottom_sheet_background.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/java/com/android/dialer/theme/common/res/values/styles.xml b/java/com/android/dialer/theme/common/res/values/styles.xml index ac23bdf98..2c6446ca1 100644 --- a/java/com/android/dialer/theme/common/res/values/styles.xml +++ b/java/com/android/dialer/theme/common/res/values/styles.xml @@ -31,13 +31,4 @@ 20dp 12dp - - - - \ No newline at end of file diff --git a/java/com/android/incallui/answer/impl/SmsBottomSheetFragment.java b/java/com/android/incallui/answer/impl/SmsBottomSheetFragment.java index b06a0c681..6742e4a36 100644 --- a/java/com/android/incallui/answer/impl/SmsBottomSheetFragment.java +++ b/java/com/android/incallui/answer/impl/SmsBottomSheetFragment.java @@ -36,7 +36,6 @@ import android.widget.TextView; import com.android.dialer.common.DpUtil; import com.android.dialer.common.FragmentUtils; import com.android.dialer.common.LogUtil; -import com.android.dialer.theme.base.ThemeComponent; import com.android.incallui.incalluilock.InCallUiLock; import java.util.ArrayList; import java.util.List; @@ -69,8 +68,6 @@ public class SmsBottomSheetFragment extends BottomSheetDialogFragment { } } layout.addView(newTextViewItem(null)); - int paddingVertical = (int) DpUtil.dpToPx(getContext(), 8); - layout.setPadding(0, paddingVertical, 0, paddingVertical); layout.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT)); return layout; } @@ -103,11 +100,11 @@ public class SmsBottomSheetFragment extends BottomSheetDialogFragment { TextView textView = new TextView(context); textView.setText(text == null ? getString(R.string.call_incoming_message_custom) : text); - int paddingHorizontal = (int) DpUtil.dpToPx(context, 24); - int paddingVertical = (int) DpUtil.dpToPx(context, 12); - textView.setPadding(paddingHorizontal, paddingVertical, paddingHorizontal, paddingVertical); + int padding = (int) DpUtil.dpToPx(context, 16); + textView.setPadding(padding, padding, padding, padding); textView.setBackground(background); - textView.setTextAppearance(R.style.Dialer_TextAppearance_Primary2); + textView.setTextColor(context.getColor(R.color.blue_grey_100)); + textView.setTextAppearance(R.style.TextAppearance_AppCompat_Widget_PopupMenu_Large); LayoutParams params = new LinearLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT); @@ -127,7 +124,7 @@ public class SmsBottomSheetFragment extends BottomSheetDialogFragment { @Override public int getTheme() { - return ThemeComponent.get(getContext()).theme().getBottomSheetStyleRes(); + return R.style.Theme_Design_Light_BottomSheetDialog; } @Override -- cgit v1.2.3