Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 44961ee2 authored by Isaac Katzenelson's avatar Isaac Katzenelson
Browse files

Fix today icon in search activity for unbundled

Bug: 6881727 [stability/Xoom/ICS ]NPE at android.graphics.drawable.LayerDrawable$LayerState.<init>
Change-Id: Idcd9e99304c2b24dd271d103a40a453fdc6909f3
parent a48bed38
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -250,8 +250,14 @@ public class SearchActivity extends Activity implements CalendarController.Event

        // 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, Utils.getTimeZone(SearchActivity.this, mTimeChangesUpdater));
        MenuItem menuItem = menu.findItem(R.id.action_today);
        if (Utils.isJellybeanOrLater()) {
            LayerDrawable icon = (LayerDrawable) menuItem.getIcon();
            Utils.setTodayIcon(
                    icon, this, Utils.getTimeZone(SearchActivity.this, mTimeChangesUpdater));
        } else {
            menuItem.setIcon(R.drawable.ic_menu_today_no_date_holo_light);
        }

        MenuItem item = menu.findItem(R.id.action_search);
        item.expandActionView();