diff options
Diffstat (limited to 'src/com/android/calendar/SearchActivity.java')
-rw-r--r-- | src/com/android/calendar/SearchActivity.java | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/com/android/calendar/SearchActivity.java b/src/com/android/calendar/SearchActivity.java index ef175e7b..4775b8d7 100644 --- a/src/com/android/calendar/SearchActivity.java +++ b/src/com/android/calendar/SearchActivity.java @@ -273,22 +273,22 @@ public class SearchActivity extends Activity implements CalendarController.Event @Override public boolean onOptionsItemSelected(MenuItem item) { Time t = null; - switch (item.getItemId()) { - case R.id.action_today: - t = new Time(); - t.setToNow(); - mController.sendEvent(this, EventType.GO_TO, t, null, -1, ViewType.CURRENT); - return true; - case R.id.action_search: - return false; - case R.id.action_settings: - mController.sendEvent(this, EventType.LAUNCH_SETTINGS, null, null, 0, 0); - return true; - case android.R.id.home: - Utils.returnToCalendarHome(this); - return true; - default: - return false; + final int itemId = item.getItemId(); + if (itemId == R.id.action_today) { + t = new Time(); + t.setToNow(); + mController.sendEvent(this, EventType.GO_TO, t, null, -1, ViewType.CURRENT); + return true; + } else if (itemId == R.id.action_search) { + return false; + } else if (itemId == R.id.action_settings) { + mController.sendEvent(this, EventType.LAUNCH_SETTINGS, null, null, 0, 0); + return true; + } else if (itemId == android.R.id.home) { + Utils.returnToCalendarHome(this); + return true; + } else { + return false; } } |