This seems to be doing the same as getAccessTokenFilePath(Context) except in File instead of String form. Can this logic be centralized so it's not duplicated in both these places? Maybe make a getAccessTokenFile(Context) and if you really need the string form, you can just use getAccessTokenFile(Context).toString()