/** * Returns the path to the user's profile directory via a callback. The callback may be called * synchronously or asynchronously. */ public void getProfilePath(ProfilePathCallback callback) { if (!TextUtils.isEmpty(sProfilePath)) { callback.onGotProfilePath(sProfilePath); } else { nativeGetProfilePath(callback); } }
@CalledByNative private static void onGotProfilePath(String profilePath, ProfilePathCallback callback) { sProfilePath = profilePath; callback.onGotProfilePath(profilePath); }