   (.setText (program-source-editor @this)
             ;; "(doseq [r [1 1.5 2 2.5 3]]\n  (dotimes [_ 360]\n    (forward r)\n    (left 1)))"
             "(forward 100)\n(left 90)\n(forward 100)\n")
-  ;; (.setOnTouchListener (program-source-editor @this)
-  ;;
-  ;;                      (make-double-tap-handler
-  ;;                       (fn [] (log "Double tapped source editor twice"))))
-  ;; (.setOnTouchListener (error-output @this)
-  ;;                      (make-double-tap-handler
-  ;;                       (fn [] (log "Double tapped error output twice"))))
-  )
+
+  (when bundle
+    (doseq [[key _ restore] save-state-config]
+      (restore key this bundle))))
 
 (defn ^boolean -onCreateOptionsMenu [^org.turtle.geometry.TurtleGraphics this
                                      ^Menu menu]




(defn -onCreate [^org.turtle.geometry.TurtleGraphics this
                 ^Bundle bundle]
  (reset! *activity* this)

                       width
                       height]
  (log "surfaceChanged")
  (let [interm-bitmap ^Bitmap (get-in @this [:draw-state :intermediate-bitmap])
        use-old-bitmap? (and (not (nil? interm-bitmap))
                             (= width (.getWidth interm-bitmap))
                             (= height (.getHeight interm-bitmap)))
        new-bitmap
        (if use-old-bitmap?
          interm-bitmap
          (Bitmap/createBitmap width height
                               Bitmap$Config/ARGB_8888))
        canvas (Canvas. new-bitmap)]
