Avoid crashing if incorrect view type, and ensure view type is set to a reasonable value beforehand.

Bug: 7441224
Change-Id: I37c1e759f351d6381704cd9b4e5afc805bcca7dd
diff --git a/src/com/android/calendar/CalendarController.java b/src/com/android/calendar/CalendarController.java
index 1994b44..7fd54ae 100644
--- a/src/com/android/calendar/CalendarController.java
+++ b/src/com/android/calendar/CalendarController.java
@@ -146,6 +146,7 @@
         final int WEEK = 3;
         final int MONTH = 4;
         final int EDIT = 5;
+        final int MAX_VALUE = 5;
     }
 
     public static class EventInfo {