app/src/main/java/com/geekyouup/android/ustopwatch/fragments/StopwatchCustomVectorView.java
/**
     * Dump state to the provided Bundle. Typically called when the
     * Activity is being suspended.
     */
Dump state to the provided Bundle. Typically called when the
Activity is being suspended.
Dump state to the provided Bundle . Typically called when the Activity is being suspended .
public void saveState(SharedPreferences.Editor map) {
        if (!mIsStopwatch || mDisplayTimeMillis > 0) {
            if (!mIsStopwatch && mDisplayTimeMillis > 0 && mIsRunning) {
                AlarmUpdater.setCountdownAlarm(getContext(), (long) mDisplayTimeMillis);
            } else {
                AlarmUpdater.cancelCountdownAlarm(getContext()); 
            }
            map.putBoolean(KEY_STATE + (mStopwatchMode ? "" : KEY_COUNTDOWN_SUFFIX), mIsRunning);
            map.putLong(KEY_LASTTIME + (mStopwatchMode ? "" : KEY_COUNTDOWN_SUFFIX), mLastTime);
            map.putInt(KEY_NOWTIME + (mStopwatchMode ? "" : KEY_COUNTDOWN_SUFFIX), mDisplayTimeMillis);
        } else {
            map.clear();
        }
    }
public void saveState ( SharedPreferences . Editor map ) { if ( ! mIsStopwatch || mDisplayTimeMillis > 0 ) { if ( ! mIsStopwatch && mDisplayTimeMillis > 0 && mIsRunning ) { AlarmUpdater . setCountdownAlarm ( getContext ( ) , ( long ) mDisplayTimeMillis ) ; } else { AlarmUpdater . cancelCountdownAlarm ( getContext ( ) ) ; } map . putBoolean ( KEY_STATE + ( mStopwatchMode ? "" : KEY_COUNTDOWN_SUFFIX ) , mIsRunning ) ; map . putLong ( KEY_LASTTIME + ( mStopwatchMode ? "" : KEY_COUNTDOWN_SUFFIX ) , mLastTime ) ; map . putInt ( KEY_NOWTIME + ( mStopwatchMode ? "" : KEY_COUNTDOWN_SUFFIX ) , mDisplayTimeMillis ) ; } else { map . clear ( ) ; } }
Dump state to the provided Bundle.
Dump state to the provided Bundle .
//just to be sure