Called when the signed in status changes, to update the UI
appropriately. After a sign-in, the API is called.
1540
function updateSigninStatus(isSignedIn) {
	if (isSignedIn) {
		authorizeButton.style.display = 'none';
		signoutButton.style.display = 'block';
		listFiles();
	} else {
		authorizeButton.style.display = 'block';
		signoutButton.style.display = 'none';
	}
}
416225
def __update_service_status(self, statuscode):
        """"""
        if self.__service_status != statuscode:
            self.__service_status = statuscode
            self.__send_service_status_to_frontend()
1002585
private void _updateStatus() {
        boolean doneWithoutErrors = true;
        boolean doneWithErrors = true;
        boolean finishedOne = false;
        if (_status == Status.DONE || _status == Status.ERROR) {
            return;
        }
        for (AsyncBatchedMetricQuery query: _queries) {
            Status status = query.getStatus();
            if (status == Status.PROCESSING) {
                _status = Status.PROCESSING;
                return;
            }
            boolean queryFinished = (status == Status.DONE || status == Status.ERROR);
            if (queryFinished) {
                finishedOne = true;
            }
            doneWithErrors &= queryFinished;
            doneWithoutErrors &= (status == Status.DONE);
        }
        if (!doneWithoutErrors && doneWithErrors) {
            _status = Status.ERROR;
        } else if (doneWithoutErrors) {
            _status = Status.DONE;
        } else if (finishedOne) {
            _status = Status.PROCESSING;
        } else {
            _status = Status.QUEUED;
        }
    }
597479
private void switchAccountStatus(Account account, Account.Status status,
            UserIdentityContext userIdentityContext) {
        if (logger.isDebugEnabled()) {
            logger.debug("Switching status for account:" + account.getSid() + ",status:" + status);
        }
        switch (status) {
            case CLOSED:
                sendRVDStatusNotification(account,userIdentityContext);
                // then proceed to dependency removal
                removeAccoundDependencies(account.getSid());
                break;
            default:
                break;

        }
        // finally, set and persist account status
        account = account.setStatus(status);
        accountsDao.updateAccount(account);
    }
111789
private void applyForcedChanges(){
        // Disable the legacy system of API Token only if the new system was not installed
        // in such case it means there was already an upgrade before 
        // and potentially the admin has re-enabled the features
        ApiTokenPropertyConfiguration apiTokenPropertyConfiguration = ApiTokenPropertyConfiguration.get();
        if(!apiTokenPropertyConfiguration.hasExistingConfigFile()){
            LOGGER.log(Level.INFO, "New API token system configured with insecure options to keep legacy behavior");
            apiTokenPropertyConfiguration.setCreationOfLegacyTokenEnabled(false);
            apiTokenPropertyConfiguration.setTokenGenerationOnCreationEnabled(false);
        }
    }
441073
def _process_status(self, status):
        
        self._screen_id = status.get(ATTR_SCREEN_ID)
        self.status_update_event.set()
588464
public void changeStatus(int newStatus)
    {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "changeStatus", new java.lang.Object[] { this, new Integer(newStatus) });

        _status = newStatus;

        if (tc.isEntryEnabled())
            Tr.exit(tc, "changeStatus");
    }
153870
def on_connect(self, client, userdata, flags, result_code):
        
        self.log_info("Connected with result code {}".format(result_code))
        self.state_handler.set_state(State.welcome)
1060516
def update_state_from_api(self):
        
        if self.last_api_call is not None:
            difference = (datetime.datetime.now() - self.last_api_call).seconds
        else:
            # This is the first run, so we need to get the lastest state.
            difference = 301
        if difference >= 300:
            url = BASE_URL + "/rest/item"
            payload = {'usertoken': self.token}
            arequest = requests.get(url, params=payload)
            status = str(arequest.status_code)
            if status == '401':
                _LOGGER.info("Token expired? Trying to get a new one.")
                self.authenticate(True)
                arequest = requests.get(url, params=payload)
                status = arequest.status_code
            elif status == '404':
                _LOGGER.error("No devices associated with this account.")
            elif status != '200':
                _LOGGER.error("API error not updating state. " + status)
            else:
                self.state = arequest.json()
            self.last_api_call = datetime.datetime.now()
            _LOGGER.info("Pulled latest state from API.")
615854
function onApplyAuthSettingsChange() {
  try {
    auth.settings.appVerificationDisabledForTesting =
        $("input[name=enable-app-verification]:checked").val() == 'No';
    alertSuccess('Auth settings changed');
  } catch (error) {
    alertError('Error: ' + error.code);
  }
}
812556
public void onUpgradeAppButtonClicked(View arg0) {
        Log.d(TAG, "Upgrade button clicked; launching purchase flow for upgrade.");

        if (setupDone == null) {
            complain("Billing Setup is not completed yet");
            return;
        }

        if (!setupDone) {
            complain("Billing Setup failed");
            return;
        }

        setWaitScreen(true);

        /* TODO: for security, generate your payload here for verification. See the comments on
         *        verifyDeveloperPayload() for more info. Since this is a SAMPLE, we just use
         *        an empty string, but on a production app you should carefully generate this. */
        String payload = "";

        mHelper.launchPurchaseFlow(this, InAppConfig.SKU_PREMIUM, RC_REQUEST,
                mPurchaseFinishedListener, payload);
    }
1064805
def on_signout_action_activated(self, action, params):
        ''''''
        if self.profile:
            self.upload_page.pause_tasks()
            self.download_page.pause_tasks()
            self.show_signin_dialog(auto_signin=False)
429064
private void updateStateAndNotifyListener(DownloadState downloadState) throws IOException {
    this.downloadState = downloadState;
    if (progressListener != null) {
      progressListener.progressChanged(this);
    }
  }
663376
protected void updatePageStatus() {
		if (this.status.isOK()) {
			setMessage(null, IMessageProvider.NONE);
		} else {
			switch (this.status.getSeverity()) {
			case IStatus.ERROR:
				setMessage(this.status.getMessage(), IMessageProvider.ERROR);
				break;
			case IStatus.INFO:
				setMessage(this.status.getMessage(), IMessageProvider.INFORMATION);
				break;
			case IStatus.WARNING:
				setMessage(this.status.getMessage(), IMessageProvider.WARNING);
				break;
			default:
				break;
			}
		}
		setPageComplete(this.status.isOK() || this.status.getSeverity() == IStatus.INFO);
	}
404078
function onActivateEvent() {
         var _updateLayerFn = this.updateLayer.bind(this); // register to the viewport change notification


         this.vpChangeHdlr = me.event.subscribe(me.event.VIEWPORT_ONCHANGE, _updateLayerFn);
         this.vpResizeHdlr = me.event.subscribe(me.event.VIEWPORT_ONRESIZE, this.resize.bind(this));
         this.vpLoadedHdlr = me.event.subscribe(me.event.LEVEL_LOADED, function () {
           // force a first refresh when the level is loaded
           _updateLayerFn(me.game.viewport.pos);
         }); // in case the level is not added to the root container,
         // the onActivateEvent call happens after the LEVEL_LOADED event
         // so we need to force a first update

         if (this.ancestor.root !== true) {
           this.updateLayer(me.game.viewport.pos);
         }
       }
592689
def refresh(self):
        # type: () -> None
        """"""
        from pykechain.client import API_EXTRA_PARAMS
        src = self._client.reload(self, extra_params=API_EXTRA_PARAMS['activity'])
        self.__dict__.update(src.__dict__)
156860
def set_signed_in(self, me):
        
        self.me = me
        self.sign_in_label.configure(text='Signed in')
        self.sign_in_entry.configure(state=tkinter.NORMAL)
        self.sign_in_entry.delete(0, tkinter.END)
        self.sign_in_entry.insert(tkinter.INSERT, utils.get_display_name(me))
        self.sign_in_entry.configure(state=tkinter.DISABLED)
        self.sign_in_button.configure(text='Log out')
        self.chat.focus()