@@ -325,20 +325,17 @@ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
325
325
highlightedDays = (HashSet <Calendar >) savedInstanceState .getSerializable (KEY_HIGHLIGHTED_DAYS );
326
326
mThemeDark = savedInstanceState .getBoolean (KEY_THEME_DARK );
327
327
mThemeDarkChanged = savedInstanceState .getBoolean (KEY_THEME_DARK_CHANGED );
328
- mAccentColor = savedInstanceState .getInt (KEY_ACCENT , Integer .MAX_VALUE );
329
- if (mAccentColor == Integer .MAX_VALUE ) mAccentColor = null ;
328
+ if (savedInstanceState .containsKey (KEY_ACCENT )) mAccentColor = savedInstanceState .getInt (KEY_ACCENT );
330
329
mVibrate = savedInstanceState .getBoolean (KEY_VIBRATE );
331
330
mDismissOnPause = savedInstanceState .getBoolean (KEY_DISMISS );
332
331
mAutoDismiss = savedInstanceState .getBoolean (KEY_AUTO_DISMISS );
333
332
mTitle = savedInstanceState .getString (KEY_TITLE );
334
333
mOkResid = savedInstanceState .getInt (KEY_OK_RESID );
335
334
mOkString = savedInstanceState .getString (KEY_OK_STRING );
336
- mOkColor = savedInstanceState .getInt (KEY_OK_COLOR , Integer .MAX_VALUE );
337
- if (mOkColor == Integer .MAX_VALUE ) mOkColor = null ;
335
+ if (savedInstanceState .containsKey (KEY_OK_COLOR )) mOkColor = savedInstanceState .getInt (KEY_OK_COLOR );
338
336
mCancelResid = savedInstanceState .getInt (KEY_CANCEL_RESID );
339
337
mCancelString = savedInstanceState .getString (KEY_CANCEL_STRING );
340
- mCancelColor = savedInstanceState .getInt (KEY_CANCEL_COLOR , Integer .MAX_VALUE );
341
- if (mCancelColor == Integer .MAX_VALUE ) mCancelColor = null ;
338
+ if (savedInstanceState .containsKey (KEY_CANCEL_COLOR )) mCancelColor = savedInstanceState .getInt (KEY_CANCEL_COLOR );
342
339
mVersion = (Version ) savedInstanceState .getSerializable (KEY_VERSION );
343
340
mScrollOrientation = (ScrollOrientation ) savedInstanceState .getSerializable (KEY_SCROLL_ORIENTATION );
344
341
mTimezone = (TimeZone ) savedInstanceState .getSerializable (KEY_TIMEZONE );
0 commit comments