summaryrefslogtreecommitdiffstats
path: root/src/com/android/calendar/AllInOneActivity.java
diff options
context:
space:
mode:
authorMichael Chan <chanm@google.com>2012-05-31 12:24:11 -0700
committerMichael Chan <chanm@google.com>2012-05-31 12:43:01 -0700
commit693ca60d79650af15ab226f7ce6958f61fb7de39 (patch)
treed2c7e839906dbfb48a77255d28f59233ab592f44 /src/com/android/calendar/AllInOneActivity.java
parent132eeb8acba46be5d0a3dc69b3a4dc0876430b08 (diff)
downloadandroid_packages_apps_Calendar-693ca60d79650af15ab226f7ce6958f61fb7de39.tar.gz
android_packages_apps_Calendar-693ca60d79650af15ab226f7ce6958f61fb7de39.tar.bz2
android_packages_apps_Calendar-693ca60d79650af15ab226f7ce6958f61fb7de39.zip
Modify app so it will run in ICS MR1
Change-Id: I56e516f87269bf973e256b156a20ec5b06809289
Diffstat (limited to 'src/com/android/calendar/AllInOneActivity.java')
-rw-r--r--src/com/android/calendar/AllInOneActivity.java16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/com/android/calendar/AllInOneActivity.java b/src/com/android/calendar/AllInOneActivity.java
index ed55d6cd..47d8db93 100644
--- a/src/com/android/calendar/AllInOneActivity.java
+++ b/src/com/android/calendar/AllInOneActivity.java
@@ -40,9 +40,7 @@ import android.content.AsyncQueryHandler;
import android.content.BroadcastReceiver;
import android.content.ContentResolver;
import android.content.ContentUris;
-import android.content.Context;
import android.content.Intent;
-import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
import android.content.res.Configuration;
@@ -51,6 +49,7 @@ import android.database.ContentObserver;
import android.database.Cursor;
import android.graphics.drawable.LayerDrawable;
import android.net.Uri;
+import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.provider.CalendarContract;
@@ -758,10 +757,15 @@ public class AllInOneActivity extends Activity implements EventHandler,
mControlsMenu.setTitle(mHideControls ? mShowString : mHideString);
}
- // replace the default top layer drawable of the today icon with a custom drawable
- // that shows the day of the month of today
- LayerDrawable icon = (LayerDrawable)menu.findItem(R.id.action_today).getIcon();
- Utils.setTodayIcon(icon, this, mTimeZone);
+ MenuItem menuItem = menu.findItem(R.id.action_today);
+ if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) {
+ menuItem.setIcon(R.drawable.ic_menu_today_no_date_holo_light);
+ } else {
+ // replace the default top layer drawable of the today icon with a
+ // custom drawable that shows the day of the month of today
+ LayerDrawable icon = (LayerDrawable) menuItem.getIcon();
+ Utils.setTodayIcon(icon, this, mTimeZone);
+ }
return true;
}