wear/src/main/java/com/geekyouup/android/ustopwatch/wear/fragments/StopwatchCustomVectorView.java
/**
     * Restores state from the indicated Bundle. Called when
     * the Activity is being restored after having been previously
     * destroyed.
     */
Restores state from the indicated Bundle. Called when
the Activity is being restored after having been previously
destroyed.
Restores state from the indicated Bundle . Called when the Activity is being restored after having been previously destroyed .
public synchronized void restoreState(SharedPreferences savedState) {
        if (savedState != null) {
            mIsRunning = (savedState.getBoolean(KEY_STATE + (mStopwatchMode ? "" : KEY_COUNTDOWN_SUFFIX), false));
            mLastTime = savedState.getLong(KEY_LASTTIME + (mStopwatchMode ? "" : KEY_COUNTDOWN_SUFFIX), System.currentTimeMillis());
            mDisplayTimeMillis = savedState.getInt(KEY_NOWTIME + (mStopwatchMode ? "" : KEY_COUNTDOWN_SUFFIX), 0);
            updateWatchState(true);
            removeCallbacks(animator);
            if (mIsRunning) post(animator);
        }
        notifyStateChanged();
        /*AlarmUpdater.cancelCountdownAlarm(getContext()); //just to be sure
        */
    }
public synchronized void restoreState ( SharedPreferences savedState ) { if ( savedState != null ) { mIsRunning = ( savedState . getBoolean ( KEY_STATE + ( mStopwatchMode ? "" : KEY_COUNTDOWN_SUFFIX ) , false ) ) ; mLastTime = savedState . getLong ( KEY_LASTTIME + ( mStopwatchMode ? "" : KEY_COUNTDOWN_SUFFIX ) , System . currentTimeMillis ( ) ) ; mDisplayTimeMillis = savedState . getInt ( KEY_NOWTIME + ( mStopwatchMode ? "" : KEY_COUNTDOWN_SUFFIX ) , 0 ) ; updateWatchState ( true ) ; removeCallbacks ( animator ) ; if ( mIsRunning ) post ( animator ) ; } notifyStateChanged ( ) ; /*AlarmUpdater.cancelCountdownAlarm(getContext()); //just to be sure
        */ }
Restores state from the indicated Bundle.
Restores state from the indicated Bundle .