private void updateNavDrawerUserInfo() { AppUser defaultUser = AppData.defaultUser; if (defaultUser != null) { mUserNameTextView.setText(defaultUser.getFirstName() + " " + defaultUser.getLastName()); mUserEmailTextView.setText(defaultUser.getEmail()); } }
@Override protected void onPostExecute(Boolean hasNetwork) { if (hasNetwork) { if (isUserLogged(MainActivity.this)) { AppUser defaultUser = AppData.defaultUser; new CheckKeyExpirationTaskMain( defaultUser.getUsername(), defaultUser.getApiKey(), defaultUser.getApiId()) .executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); } else { finish(); Intent slideIntent = new Intent(MainActivity.this, SlideActivity.class); startActivity(slideIntent); } } else { CustomedDialog.showInternetNotConnectDialog(MainActivity.this); } }