Sets or clears the flag to keep the screen on.
505527
def _observe_keep_screen_on(self, change):
        
        def set_screen_on(window):
            from .android_window import Window
            window = Window(__id__=window)
            if self.keep_screen_on:
                window.addFlags(Window.FLAG_KEEP_SCREEN_ON)
            else:
                window.clearFlags(Window.FLAG_KEEP_SCREEN_ON)

        self.widget.getWindow().then(set_screen_on)
45864
public static void setTheManager() {
    if ("true".equalsIgnoreCase(System.getProperty(ACTIVATE_FLAG))) {
      if (!(System.getSecurityManager() instanceof DnsMonitorSecurityManager)) {
        System.setSecurityManager(theManager);
      }
    }
  }
1006761
def clearScreen(cls):
        """"""
        if "win32" in sys.platform:
            os.system('cls')
        elif "linux" in sys.platform:
            os.system('clear')
        elif 'darwin' in sys.platform:
            os.system('clear')
        else:
            cit.err("No clearScreen for " + sys.platform)
272766
function() {
      var t = this;

      // Detach any prior monitor
      if (t.monitor) {
        t.monitor.off('change', t.onMonitorChange, t);
        delete t.monitor;
      }
    }
1109093
public void setCurrentSubScreen(BasePanel subScreen)
    {
        m_screenParent = null;      // Screen's parent
        m_iScreenSeq = -1;
        if (subScreen != null)
            m_screenParent = subScreen.getParentScreen();   // Screen's parent
        if (m_screenParent == null) if (this.getOwner() != null) if (this.getOwner().getRecord() != null)
            m_screenParent = (BaseScreen)this.getOwner().getRecord().getRecordOwner();
        if (m_screenParent == null) if (this.getOwner() != null) if (this.getOwner().getComponent(0) instanceof ScreenField)
            m_screenParent = ((ScreenField)this.getOwner().getComponent(0)).getParentScreen();
        if (m_screenParent == null)
            return;
        int iBestGuess = -1;
        for (m_iScreenSeq = 0; m_iScreenSeq < m_screenParent.getSFieldCount(); m_iScreenSeq++)
        {
            ScreenField sField = m_screenParent.getSField(m_iScreenSeq);
            if (sField == subScreen)
                return;     // Found (m_iScreenSeq is correct)
            if (sField instanceof BaseScreen)
                iBestGuess = m_iScreenSeq;
        }
        m_iScreenSeq = iBestGuess;
    }
310488
def set_sorting(self, flag):
        """"""
        self.sorting['status'] = flag
        self.header().setSectionsClickable(flag == ON)
93076
def remove_flag(self, flag):
        
        if self.has_flag(flag):
            del self._flags[flag.lower()]
1008316
def setFlag(self, flag, state=True):
        
        if state:
            self.setFlags(self.flags() | flag)
        else:
            self.setFlags(self.flags() & ~flag)
1145680
def set_flag(self, request, val, fld):
        """"""
        if val is not None:
            val = bool(val)
            request.set(fld, val)
1308212
def erase_screen(self):
        
        self.vt100_output.erase_screen()
        self.vt100_output.cursor_goto(0, 0)
        self.vt100_output.flush()
846318
def set_flagstate(flagset):
    
    if not flagset <= _all_flags:
        raise ValueError("unrecognized flags in flagset")

    for f in flagset:
        set_flag(f)
    for f in _all_flags - flagset:
        clear_flag(f)
1258034
function () {
        if (this._clearStack.length > 0) {
            var opt = this._clearStack.pop();
            this.clearColor = opt.clearColor;
            this.clearBit = opt.clearBit;
        }
    }
516184
public void setActionFlags() {

        m_checkinBean.setFetchAndResetBeforeImport(m_fetchAndReset.getValue().booleanValue());
        switch (m_mode) {
            case checkOut:
                m_checkinBean.setCheckout(true);
                m_checkinBean.setResetHead(false);
                m_checkinBean.setResetRemoteHead(false);
                break;
            case checkIn:
                m_checkinBean.setCheckout(false);
                m_checkinBean.setResetHead(false);
                m_checkinBean.setResetRemoteHead(false);
                break;
            case resetHead:
                m_checkinBean.setCheckout(false);
                m_checkinBean.setResetHead(true);
                m_checkinBean.setResetRemoteHead(false);
                break;
            case resetRemoteHead:
                m_checkinBean.setCheckout(false);
                m_checkinBean.setResetHead(false);
                m_checkinBean.setResetRemoteHead(true);
                break;
            default:
                break;
        }

    }
923777
function exitFullScreen() {
  if (document.exitFullscreen) {
    document.exitFullscreen();
  } else if (document.msExitFullscreen) {
    document.msExitFullscreen();
  } else if (document.webkitExitFullscreen) {
    document.webkitExitFullscreen();
  }
}
112200
def ontop_toggled(self, settings, key, user_data):
        
        self.guake.window.set_keep_above(settings.get_boolean(key))
767720
@TargetApi(VERSION_CODES.KITKAT)
    public static void hideSystemUI(Activity activity) {
        // Set the IMMERSIVE flag.
        // Set the content to appear under the system bars so that the content
        // doesn't resize when the system bars hideSelf and show.
        View decorView = activity.getWindow().getDecorView();
        decorView.setSystemUiVisibility(
                View.SYSTEM_UI_FLAG_LAYOUT_STABLE
                        | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
                        | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
                        | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION // hideSelf nav bar
                        | View.SYSTEM_UI_FLAG_FULLSCREEN // hideSelf status bar
                        | View.SYSTEM_UI_FLAG_IMMERSIVE
        );
    }
428410
def clear_screen():
    import os, platform
    
    if platform.system() == "Windows":
        tmp = os.system('cls') #for window
    else:
        tmp = os.system('clear') #for Linux
    return True