private void checkNuxSettings() { if (nuxMode == ToolTipMode.DISPLAY_ALWAYS) { String nuxString = getResources().getString(R.string.com_facebook_tooltip_default); displayNux(nuxString); } else { // kick off an async request final String appId = Utility.getMetadataApplicationId(getContext()); AsyncTask<Void, Void, FetchedAppSettings> task = new AsyncTask<Void, Void, Utility.FetchedAppSettings>() { @Override protected FetchedAppSettings doInBackground(Void... params) { FetchedAppSettings settings = Utility.queryAppSettings(appId, false); return settings; } @Override protected void onPostExecute(FetchedAppSettings result) { showNuxPerSettings(result); } }; task.execute((Void[])null); } }
private void checkNuxSettings() { if (nuxMode == ToolTipMode.DISPLAY_ALWAYS) { String nuxString = getResources().getString(R.string.com_facebook_tooltip_default); displayNux(nuxString); } else { // kick off an async request final String appId = Utility.getMetadataApplicationId(getContext()); AsyncTask<Void, Void, FetchedAppSettings> task = new AsyncTask<Void, Void, Utility.FetchedAppSettings>() { @Override protected FetchedAppSettings doInBackground(Void... params) { FetchedAppSettings settings = Utility.queryAppSettings(appId, false); return settings; } @Override protected void onPostExecute(FetchedAppSettings result) { showNuxPerSettings(result); } }; task.execute((Void[]) null); } }
private void checkNuxSettings() { if (this.nuxMode == ToolTipMode.DISPLAY_ALWAYS) { displayNux(getResources().getString(R.string.com_facebook_tooltip_default)); return; } new AsyncTask() { protected Utility.FetchedAppSettings doInBackground(Void[] paramAnonymousArrayOfVoid) { return Utility.queryAppSettings(this.val$appId, false); } protected void onPostExecute(Utility.FetchedAppSettings paramAnonymousFetchedAppSettings) { LoginButton.this.showNuxPerSettings(paramAnonymousFetchedAppSettings); } } .execute(null); }
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; } }
private void showToolTipPerSettings(FetchedAppSettings settings) { if (settings != null && settings.getNuxEnabled() && getVisibility() == View.VISIBLE) { String toolTipString = settings.getNuxContent(); displayToolTip(toolTipString); } }
private void showNuxPerSettings(FetchedAppSettings settings) { if (settings != null && settings.getNuxEnabled() && getVisibility() == View.VISIBLE) { String nuxString = settings.getNuxContent(); displayNux(nuxString); } }
private void showNuxPerSettings(Utility.FetchedAppSettings paramFetchedAppSettings) { if ((paramFetchedAppSettings != null) && (paramFetchedAppSettings.getNuxEnabled()) && (getVisibility() == 0)) displayNux(paramFetchedAppSettings.getNuxContent()); }