Exemplo n.º 1
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();
        }
Exemplo n.º 2
0
        /// <summary>
        /// Perform instantiation of the process's
        /// <see cref="Application">Application</see>
        /// object.  The
        /// default implementation provides the normal system behavior.
        /// </summary>
        /// <param name="clazz">The class used to create an Application object from.</param>
        /// <param name="context">The context to initialize the application with</param>
        /// <returns>The newly instantiated Application object.</returns>
        /// <exception cref="java.lang.InstantiationException"></exception>
        /// <exception cref="System.MemberAccessException"></exception>
        /// <exception cref="System.TypeLoadException"></exception>
        internal static Application newApplication(Type klass, Context context)
        {
            Application app = (Application)Activator.CreateInstance(klass);

            app.attach(context);
            return(app);
        }
Exemplo n.º 3
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 ();
		}