@AfterExtras void initData() { if (mAssociationId == null) { // new Exception("mAssociationId null"); } AVQuery<AVObject> query = new AVQuery<>("association"); query.whereEqualTo("objectId", mAssociationId); query.findInBackground(new FindCallback<AVObject>() { @Override public void done(List<AVObject> list, AVException e) { if (e == null) { mAssociation = list.get(0); } } }); }
@AfterExtras public void updateLocaleAndCountry() { try { ActivityManagerNative manager = new ActivityManagerNative(); Configuration configuration = manager.getConfiguration(); Locale locale = requestedLocale(configuration); configuration.locale = locale; manager.updateConfiguration(configuration); Toast.makeText(this, String.format("Locale updated to %s_%s", language, country), Toast.LENGTH_SHORT).show(); } catch (Exception e) { Toast.makeText(this, String.format("Failed to updated locale to %s_%s", language, country), Toast.LENGTH_SHORT).show(); } this.finish(); }
@AfterExtras @Override public final void afterExtrasInject() { this.afterExtras(); }
@AfterExtras void handleIntent() { try { switch (showDialog) { case SHOW_AUTHENTICATE: new AuthenticateDialogFragment().show(fragmentManager, AuthenticateDlgFragmentTag); break; case DISMISS_AUTHENTICATE: ((AuthenticateDialogFragment) fragmentManager.findFragmentByTag (AuthenticateDlgFragmentTag)).dismiss(); break; case SHOW_FIND_BRIDGE: new DiscoverDialogFragment().show(fragmentManager, DiscoverDlgFragmentTag); break; case DISMISS_FIND_BRIDGE: ((DiscoverDialogFragment) fragmentManager.findFragmentByTag(DiscoverDlgFragmentTag)) .dismiss(); break; case SHOW_FIND_BRIDGE_FAILED: new DiscoverFailedDialogFragment().show(fragmentManager, DiscoverFailedDlgFragmentTag); break; case DISMISS_FIND_BRIDGE_FAILED: ((DiscoverFailedDialogFragment) fragmentManager.findFragmentByTag (DiscoverFailedDlgFragmentTag)).dismiss(); break; case SHOW_AUTH_FAILED: new AuthFailedDialogFragment().show(fragmentManager, AuthenticationFailedDlgFragmentTag); break; case DISMISS_AUTH_FAILED: ((AuthFailedDialogFragment) fragmentManager.findFragmentByTag (AuthenticationFailedDlgFragmentTag)).dismiss(); break; case SHOW_ROOT_FAILED: new RootFailedDialogFragment().show(fragmentManager, RootFailedDlgFragmentTag); break; } } catch (NullPointerException ignored) { } if (showDialog != 0) { setIntent(getIntent().putExtra("showDialog", 0)); } }
@AfterExtras void initExtras() { }
@AfterExtras void initData() { }