fix ShareToSeafileActivity not closed properly bug
additional: source code clean-up and refactoring