summaryrefslogtreecommitdiffstats
path: root/src/com/android/calendar/month/MonthWeekEventsView.java
diff options
context:
space:
mode:
authorMatt Garnes <matt@cyngn.com>2014-11-11 17:56:17 -0800
committerMatt Garnes <matt@cyngn.com>2014-11-13 16:20:27 -0800
commitc4512530510ac5808a5effbf53c2b4176e89df95 (patch)
treef5df4670a3e3c5f31e2b471b5a3a260e17dfc3d6 /src/com/android/calendar/month/MonthWeekEventsView.java
parent47851abf10de03162f18eb0620650f1f0b0c4232 (diff)
downloadandroid_packages_apps_Calendar-c4512530510ac5808a5effbf53c2b4176e89df95.tar.gz
android_packages_apps_Calendar-c4512530510ac5808a5effbf53c2b4176e89df95.tar.bz2
android_packages_apps_Calendar-c4512530510ac5808a5effbf53c2b4176e89df95.zip
Revert "Calendar: Support display the lunar info."
This reverts commit d18341a463bee0b027785ed0f3cee9d0a7f00763.
Diffstat (limited to 'src/com/android/calendar/month/MonthWeekEventsView.java')
-rw-r--r--src/com/android/calendar/month/MonthWeekEventsView.java57
1 files changed, 0 insertions, 57 deletions
diff --git a/src/com/android/calendar/month/MonthWeekEventsView.java b/src/com/android/calendar/month/MonthWeekEventsView.java
index a5dd5dae..e1c78c67 100644
--- a/src/com/android/calendar/month/MonthWeekEventsView.java
+++ b/src/com/android/calendar/month/MonthWeekEventsView.java
@@ -19,8 +19,6 @@ package com.android.calendar.month;
import com.android.calendar.Event;
import com.android.calendar.R;
import com.android.calendar.Utils;
-import com.android.lunar.ILunarService;
-import com.android.lunar.LunarUtils;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
@@ -36,7 +34,6 @@ import android.graphics.Paint.Align;
import android.graphics.Paint.Style;
import android.graphics.Typeface;
import android.graphics.drawable.Drawable;
-import android.os.RemoteException;
import android.provider.CalendarContract.Attendees;
import android.text.TextPaint;
import android.text.TextUtils;
@@ -67,7 +64,6 @@ public class MonthWeekEventsView extends SimpleWeekView {
/* NOTE: these are not constants, and may be multiplied by a scale factor */
private static int TEXT_SIZE_MONTH_NUMBER = 32;
- private static int TEXT_SIZE_LUNAR = 18;
private static int TEXT_SIZE_EVENT = 12;
private static int TEXT_SIZE_EVENT_TITLE = 14;
private static int TEXT_SIZE_MORE_EVENTS = 12;
@@ -700,12 +696,6 @@ public class MonthWeekEventsView extends SimpleWeekView {
boolean isFocusMonth = mFocusDay[i];
boolean isBold = false;
mMonthNumPaint.setColor(isFocusMonth ? mMonthNumColor : mMonthNumOtherColor);
-
- // Get the julian monday used to show the lunar info.
- int julianMonday = Utils.getJulianMondayFromWeeksSinceEpoch(mWeek);
- Time time = new Time(mTimeZone);
- time.setJulianDay(julianMonday);
-
for (; i < numCount; i++) {
if (mHasToday && todayIndex == i) {
mMonthNumPaint.setColor(mMonthNumTodayColor);
@@ -724,53 +714,6 @@ public class MonthWeekEventsView extends SimpleWeekView {
if (isBold) {
mMonthNumPaint.setFakeBoldText(isBold = false);
}
-
- ILunarService service = LunarUtils.getService();
- if (LunarUtils.showLunar() && service != null) {
- // adjust the year and month
- int year = time.year;
- int month = time.month;
- int julianMondayDay = time.monthDay;
- int monthDay = Integer.parseInt(mDayNumbers[i]);
- if (monthDay != julianMondayDay) {
- int offsetDay = monthDay - julianMondayDay;
- if (offsetDay > 0 && offsetDay > 6) {
- month = month - 1;
- if (month < 0) {
- month = 11;
- year = year - 1;
- }
- } else if (offsetDay < 0 && offsetDay < -6) {
- month = month + 1;
- if (month > 11) {
- month = 0;
- year = year + 1;
- }
- }
- }
-
- try {
- String display = service.getLunarDay(year, month, monthDay);
- if (!TextUtils.isEmpty(display)) {
- float originalTextSize = mMonthNumPaint.getTextSize();
- mMonthNumPaint.setTextSize(TEXT_SIZE_LUNAR);
- Resources res = getResources();
- int mOrientation = res.getConfiguration().orientation;
- if (mOrientation == Configuration.ORIENTATION_LANDSCAPE) {
- canvas.drawText(display, x - mMonthNumHeight - TOP_PADDING_MONTH_NUMBER,
- y , mMonthNumPaint);
- } else {
- canvas.drawText(display, x, y + mMonthNumHeight
- + TOP_PADDING_MONTH_NUMBER, mMonthNumPaint);
- }
- // restore the text size.
- mMonthNumPaint.setTextSize(originalTextSize);
- }
- } catch (RemoteException e) {
- Log.e(TAG, "RemoteException e:" + e.toString());
- e.printStackTrace();
- }
- }
}
}