From 7cf1586ce49a52dbdffa07702fdfc74b42821970 Mon Sep 17 00:00:00 2001 From: Kirill Grouchnikov Date: Tue, 5 Apr 2016 17:25:41 -0400 Subject: [PATCH] Return correct unfocused month date color for pre-Material themes. Also deprecate setter / getter for showWeekNumber field. Bug: 28022795 Change-Id: Ie0c33353f76c2a3d9666959a07f6809b7b85183f --- api/current.txt | 8 ++++---- api/system-current.txt | 8 ++++---- api/test-current.txt | 8 ++++---- core/java/android/widget/CalendarView.java | 4 ++++ core/java/android/widget/CalendarViewLegacyDelegate.java | 2 +- 5 files changed, 17 insertions(+), 13 deletions(-) diff --git a/api/current.txt b/api/current.txt index 7d1ee38b5c1aa..4dc5fea79ef17 100644 --- a/api/current.txt +++ b/api/current.txt @@ -20328,8 +20328,8 @@ package android.media { public class MediaActionSound { ctor public MediaActionSound(); - method public synchronized void load(int); - method public synchronized void play(int); + method public void load(int); + method public void play(int); method public void release(); field public static final int FOCUS_COMPLETE = 1; // 0x1 field public static final int SHUTTER_CLICK = 0; // 0x0 @@ -46266,7 +46266,7 @@ package android.widget { method public long getMinDate(); method public deprecated android.graphics.drawable.Drawable getSelectedDateVerticalBar(); method public deprecated int getSelectedWeekBackgroundColor(); - method public boolean getShowWeekNumber(); + method public deprecated boolean getShowWeekNumber(); method public deprecated int getShownWeekCount(); method public deprecated int getUnfocusedMonthDateColor(); method public int getWeekDayTextAppearance(); @@ -46283,7 +46283,7 @@ package android.widget { method public deprecated void setSelectedDateVerticalBar(int); method public deprecated void setSelectedDateVerticalBar(android.graphics.drawable.Drawable); method public deprecated void setSelectedWeekBackgroundColor(int); - method public void setShowWeekNumber(boolean); + method public deprecated void setShowWeekNumber(boolean); method public deprecated void setShownWeekCount(int); method public deprecated void setUnfocusedMonthDateColor(int); method public void setWeekDayTextAppearance(int); diff --git a/api/system-current.txt b/api/system-current.txt index ff5747a935cfa..1b28db8f76b3a 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -21807,8 +21807,8 @@ package android.media { public class MediaActionSound { ctor public MediaActionSound(); - method public synchronized void load(int); - method public synchronized void play(int); + method public void load(int); + method public void play(int); method public void release(); field public static final int FOCUS_COMPLETE = 1; // 0x1 field public static final int SHUTTER_CLICK = 0; // 0x0 @@ -49363,7 +49363,7 @@ package android.widget { method public long getMinDate(); method public deprecated android.graphics.drawable.Drawable getSelectedDateVerticalBar(); method public deprecated int getSelectedWeekBackgroundColor(); - method public boolean getShowWeekNumber(); + method public deprecated boolean getShowWeekNumber(); method public deprecated int getShownWeekCount(); method public deprecated int getUnfocusedMonthDateColor(); method public int getWeekDayTextAppearance(); @@ -49380,7 +49380,7 @@ package android.widget { method public deprecated void setSelectedDateVerticalBar(int); method public deprecated void setSelectedDateVerticalBar(android.graphics.drawable.Drawable); method public deprecated void setSelectedWeekBackgroundColor(int); - method public void setShowWeekNumber(boolean); + method public deprecated void setShowWeekNumber(boolean); method public deprecated void setShownWeekCount(int); method public deprecated void setUnfocusedMonthDateColor(int); method public void setWeekDayTextAppearance(int); diff --git a/api/test-current.txt b/api/test-current.txt index 5163e95a35812..2b83a70c06778 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -20393,8 +20393,8 @@ package android.media { public class MediaActionSound { ctor public MediaActionSound(); - method public synchronized void load(int); - method public synchronized void play(int); + method public void load(int); + method public void play(int); method public void release(); field public static final int FOCUS_COMPLETE = 1; // 0x1 field public static final int SHUTTER_CLICK = 0; // 0x0 @@ -46340,7 +46340,7 @@ package android.widget { method public long getMinDate(); method public deprecated android.graphics.drawable.Drawable getSelectedDateVerticalBar(); method public deprecated int getSelectedWeekBackgroundColor(); - method public boolean getShowWeekNumber(); + method public deprecated boolean getShowWeekNumber(); method public deprecated int getShownWeekCount(); method public deprecated int getUnfocusedMonthDateColor(); method public int getWeekDayTextAppearance(); @@ -46357,7 +46357,7 @@ package android.widget { method public deprecated void setSelectedDateVerticalBar(int); method public deprecated void setSelectedDateVerticalBar(android.graphics.drawable.Drawable); method public deprecated void setSelectedWeekBackgroundColor(int); - method public void setShowWeekNumber(boolean); + method public deprecated void setShowWeekNumber(boolean); method public deprecated void setShownWeekCount(int); method public deprecated void setUnfocusedMonthDateColor(int); method public void setWeekDayTextAppearance(int); diff --git a/core/java/android/widget/CalendarView.java b/core/java/android/widget/CalendarView.java index cde7604b7e7cb..66896ab70e454 100644 --- a/core/java/android/widget/CalendarView.java +++ b/core/java/android/widget/CalendarView.java @@ -430,9 +430,11 @@ public class CalendarView extends FrameLayout { * Sets whether to show the week number. * * @param showWeekNumber True to show the week number. + * @deprecated No longer used by Material-style CalendarView. * * @attr ref android.R.styleable#CalendarView_showWeekNumber */ + @Deprecated public void setShowWeekNumber(boolean showWeekNumber) { mDelegate.setShowWeekNumber(showWeekNumber); } @@ -441,9 +443,11 @@ public class CalendarView extends FrameLayout { * Gets whether to show the week number. * * @return True if showing the week number. + * @deprecated No longer used by Material-style CalendarView. * * @attr ref android.R.styleable#CalendarView_showWeekNumber */ + @Deprecated public boolean getShowWeekNumber() { return mDelegate.getShowWeekNumber(); } diff --git a/core/java/android/widget/CalendarViewLegacyDelegate.java b/core/java/android/widget/CalendarViewLegacyDelegate.java index 442fb334c4f60..f540479ad6418 100644 --- a/core/java/android/widget/CalendarViewLegacyDelegate.java +++ b/core/java/android/widget/CalendarViewLegacyDelegate.java @@ -404,7 +404,7 @@ class CalendarViewLegacyDelegate extends CalendarView.AbstractCalendarViewDelega @Override public int getUnfocusedMonthDateColor() { - return mFocusedMonthDateColor; + return mUnfocusedMonthDateColor; } @Override