Merge "Reduce code duplication between DocumentsActivity and StandaloneActivity."