Method is used internally for starting default activity or activity added in delegate

@param context current context
502626
public void startChatActivity(Context context, Peer peer, boolean compose) {
        Bundle b = new Bundle();
        b.putLong(Intents.EXTRA_CHAT_PEER, peer.getUnuqueId());
        b.putBoolean(Intents.EXTRA_CHAT_COMPOSE, compose);
        if (!startDelegateActivity(context, delegate.getChatIntent(peer, compose), b, new int[]{Intent.FLAG_ACTIVITY_SINGLE_TOP})) {
            startActivity(context, b, ChatActivity.class);
        }
    }
336036
@SuppressWarnings("unused")
    public Intent newIntent(Context context) {
        Intent lockIntent = new Intent(context, PasswordlessLockActivity.class);
        lockIntent.putExtra(Constants.OPTIONS_EXTRA, options);
        lockIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        return lockIntent;
    }
881125
public static void beginContext(ControlContainerContext context)
    {
        Stack<ControlContainerContext> contextStack = _threadContexts.get();
        if (contextStack == null)
        {
            contextStack = new Stack<ControlContainerContext>();
            _threadContexts.set(contextStack);
        }
        contextStack.push(context);
    }
500347
@Override
    public void contextInitialized(ServletContextEvent event) {
        // Uncomment the next line to enable the default hotspot events.
        // DefaultExports.initialize();

        metrics = new Metrics();
        ServletContext context = event.getServletContext();
        context.addServlet("Metrics", new MetricsServlet()).addMapping("");
    }
877176
protected final void setContext(@NonNull final Context context) {
        Condition.INSTANCE.ensureNotNull(context, "The context may not be null");
        this.context = context;
    }
1162593
public static void init(Context context) {
        if (sInitCalled) {
            return;
        }

        sInitCalled = true;

        try {
            DateTimeZone.setProvider(new ResourceZoneInfoProvider(context));
        }
        catch (IOException e) {
            throw new RuntimeException("Could not read ZoneInfoMap. You are probably using Proguard wrong.", e);
        }

        context.getApplicationContext()
            .registerReceiver(new TimeZoneChangedReceiver(), new IntentFilter(Intent.ACTION_TIMEZONE_CHANGED));
    }
239853
public void contextInitialized(ServletContextEvent event) {
        this.context = event.getServletContext();

        // Output a simple message to the server's console
        System.out.println("The Simple Web App. Is Ready");

        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
                "/client.xml");
        LocatorService client = (LocatorService) context
                .getBean("locatorService");

        String serviceHost = this.context.getInitParameter("serviceHost");

        try {
            client.registerEndpoint(new QName(
                    "http://talend.org/esb/examples/", "GreeterService"),
                    serviceHost, BindingType.SOAP_11, TransportType.HTTP, null);
        } catch (InterruptedExceptionFault e) {
            e.printStackTrace();
        } catch (ServiceLocatorFault e) {
            e.printStackTrace();
        }
    }
148033
protected void configureContext(Context context) {
		this.contextLifecycleListeners.forEach(context::addLifecycleListener);
		new DisableReferenceClearingContextCustomizer().customize(context);
		this.tomcatContextCustomizers
				.forEach((customizer) -> customizer.customize(context));
	}
619637
protected void init(String appId, I_CmsAppUIContext context) {

        m_dialogContext = new ToolbarContext(appId);
        m_appContext = context;
        initContextMenu();
        m_itemsRight.addComponent(m_quickLaunchDropDown);
        m_itemsRight.addComponent(m_userDropDown);
        enableDefaultButtons(true);
    }
693231
protected void activate(ComponentContext context) {
        Dictionary<String, ?> props = context.getProperties();
        final boolean trace = TraceComponent.isAnyTracingEnabled();
        if (trace && tc.isEntryEnabled())
            Tr.entry(this, tc, "activate", props);

        name = (String) props.get("config.displayId");
        lock.writeLock().lock();
        try {
            properties = props;
        } finally {
            lock.writeLock().unlock();
        }

        if ("file".equals(props.get("config.source"))) {
            if (name.startsWith(AppDefinedResource.PREFIX)) // avoid conflicts with application defined data sources
                throw new IllegalArgumentException(ConnectorService.getMessage("UNSUPPORTED_VALUE_J2CA8011", name, ID, JDBC_DRIVER));
        }
        if (trace && tc.isEntryEnabled())
            Tr.exit(this, tc, "activate");
    }
567694
@Override
    public void setContext(DisplayContext context) {
        super.setContext(context);
        if (!capitalizationInfoIsSet &&
              (context==DisplayContext.CAPITALIZATION_FOR_UI_LIST_OR_MENU || context==DisplayContext.CAPITALIZATION_FOR_STANDALONE)) {
            initCapitalizationContextInfo(locale);
            capitalizationInfoIsSet = true;
        }
        if (capitalizationBrkIter == null && (context==DisplayContext.CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE ||
              (context==DisplayContext.CAPITALIZATION_FOR_UI_LIST_OR_MENU && capitalizationForListOrMenu) ||
              (context==DisplayContext.CAPITALIZATION_FOR_STANDALONE && capitalizationForStandAlone) )) {
            capitalizationBrkIter = BreakIterator.getSentenceInstance(locale);
        }
    }
707268
@Override
    public void contextInitialized(ServletContextEvent event) {
        // On Windows, URL caches can cause problems, particularly with
        // undeployment
        // So, here we attempt to disable them if we detect that we are running
        // on Windows
        try {
            String osName = System.getProperty("os.name");

            if (osName != null && osName.toLowerCase().contains("windows")) {
                URL url = new URL("http://localhost/");
                URLConnection urlConn = url.openConnection();
                urlConn.setDefaultUseCaches(false);
            }
        } catch (Throwable t) {
            // Any errors thrown in disabling the caches aren't significant to
            // the normal execution of the application, so we ignore them
        }
    }
616488
public void init(ServletContext context) {
        if (profiles != null) {
            for (IDiagramProfile profile : profiles) {
                profile.init(context);
                _registry.put(profile.getName(),
                              profile);
            }
        }
    }
267380
public static void init(Context context) {
    String apiKey = readApiKey(context);
    init(context, apiKey);
  }
843624
public void startAuthActivity(Context context, Bundle extras) {
        if (!startDelegateActivity(context, delegate.getAuthStartIntent(), extras)) {
            startActivity(context, extras, AuthActivity.class);
        }
    }
183509
public static void startActivity(Context context, Intent intent,
                                     Bundle options) {
        ThemeManager.startActivity(context, intent, -1, options);
    }
900283
public void initialize(HttpContext context)
    {
        if (_context==null)
            _context=context;
        else if (_context!=context)
            throw new IllegalStateException("Can't initialize handler for different context");
    }