@Override
 public boolean onLongClick(View view) {
   mCurrentButton = view;
   switch (view.getId()) {
     case R.id.del:
       saveHistory(mFormulaEditText.getCleanText(), mResultEditText.getCleanText(), true);
       onClear();
       return true;
     case R.id.lparen:
     case R.id.rparen:
       mFormulaEditText.setText('(' + mFormulaEditText.getCleanText() + ')');
       return true;
     case R.id.fun_sin:
       insert(getString(R.string.fun_arcsin) + "(");
       return true;
     case R.id.fun_cos:
       insert(getString(R.string.fun_arccos) + "(");
       return true;
     case R.id.fun_tan:
       insert(getString(R.string.fun_arctan) + "(");
       return true;
   }
   return false;
 }
 @Override
 protected void onPause() {
   super.onPause();
   saveHistory(mFormulaEditText.getCleanText(), mResultEditText.getCleanText(), true);
   mPersist.save();
 }