@Override
      public void run() {
        if (isWriteSafeModality(modalityState)) {
          ApplicationManager.getApplication().assertWriteIntentLockAcquired();
          runWithWritingAllowed(runnable);
        }
        else {
          runnable.run();
        }
      }
@Override
      public void run()