private String getProperSummary(Preference preference) {
    if (preference == mLeft) {
      mString = Settings.System.SPEN_ACTIONS[SWIPE_LEFT];
    } else if (preference == mRight) {
      mString = Settings.System.SPEN_ACTIONS[SWIPE_RIGHT];
    } else if (preference == mUp) {
      mString = Settings.System.SPEN_ACTIONS[SWIPE_UP];
    } else if (preference == mDown) {
      mString = Settings.System.SPEN_ACTIONS[SWIPE_DOWN];
    } else if (preference == mDouble) {
      mString = Settings.System.SPEN_ACTIONS[TAP_DOUBLE];
    } else if (preference == mLong) {
      mString = Settings.System.SPEN_ACTIONS[PRESS_LONG];
    }

    String uri = Settings.System.getString(getActivity().getContentResolver(), mString);
    if (TextUtils.isEmpty(uri)) {
      return getResources().getString(R.string.navbar_action_none);
    }

    String newString = getResources().getString(R.string.navbar_action_none);
    AwesomeConstant AwesomeEnum = fromString(uri);
    switch (AwesomeEnum) {
      case ACTION_HOME:
        newString = getResources().getString(R.string.navbar_action_home);
        break;
      case ACTION_BACK:
        newString = getResources().getString(R.string.navbar_action_back);
        break;
      case ACTION_RECENTS:
        newString = getResources().getString(R.string.navbar_action_recents);
        break;
      case ACTION_RECENTS_GB:
        newString = getResources().getString(R.string.navbar_action_recents_gb);
        break;
      case ACTION_SEARCH:
        newString = getResources().getString(R.string.navbar_action_search);
        break;
      case ACTION_MENU:
        newString = getResources().getString(R.string.navbar_action_menu);
        break;
      case ACTION_IME:
        newString = getResources().getString(R.string.navbar_action_ime);
        break;
      case ACTION_KILL:
        newString = getResources().getString(R.string.navbar_action_kill);
        break;
      case ACTION_POWER:
        newString = getResources().getString(R.string.navbar_action_power);
        break;
      case ACTION_NOTIFICATIONS:
        newString = getResources().getString(R.string.navbar_action_notifications);
        break;
      case ACTION_LAST_APP:
        newString = getResources().getString(R.string.navbar_action_lastapp);
        break;
      case ACTION_NULL:
        newString = getResources().getString(R.string.navbar_action_none);
        break;
      case ACTION_APP:
        newString = mPicker.getFriendlyNameForUri(uri);
        break;
    }
    return newString;
  }