Наследование: android.content.ContextWrapper, android.content.ComponentCallbacks
Пример #1
0
		internal void attach (Context context, Application application, Window window)
		{
			mApplication = application;
			mWindow = window;

			attachBaseContext (context);
			mFragments.attachActivity (this);

			mWindow.setCallback (this);
		}
Пример #2
0
		internal ActivityThread ()
		{
			sThreadLocal.set (this);
			mSystemThread = true;

			mInstrumentation = new Instrumentation ();

			ContextImpl context = new ContextImpl ();
			context.init (getSystemContext ().mPackageInfo, null, this);

			var res = context.getResources ();
			mConfiguration = res.getConfiguration ();
			XobotActivityManager.DeviceConfig.updateConfig (mConfiguration);
			res.updateConfiguration (mConfiguration, res.getDisplayMetrics ());
			applyConfigurationToResourcesLocked (mConfiguration, mResCompatibilityInfo);
			applyCompatConfiguration ();

			Application app = new Application ();
			app.attach (context);
			mAllApplications.add (app);
			mInitialApplication = app;
			app.onCreate ();
		}