private void checkToolTipSettings() { switch (toolTipMode) { case AUTOMATIC: // kick off an async request final String appId = Utility.getMetadataApplicationId(getContext()); FacebookSdk.getExecutor() .execute( new Runnable() { @Override public void run() { final FetchedAppSettings settings = Utility.queryAppSettings(appId, false); getActivity() .runOnUiThread( new Runnable() { @Override public void run() { showToolTipPerSettings(settings); } }); } }); break; case DISPLAY_ALWAYS: String toolTipString = getResources().getString(R.string.com_facebook_tooltip_default); displayToolTip(toolTipString); break; case NEVER_DISPLAY: break; } }
GraphRequestAsyncTask executeOnSettingsExecutor() { if (executeOnExecutorMethod != null) { try { executeOnExecutorMethod.invoke(this, FacebookSdk.getExecutor(), null); } catch (InvocationTargetException e) { // fall-through } catch (IllegalAccessException e) { // fall-through } } else { this.execute(); } return this; }