fix NPE on activity start, acquire sdcard permission