示例#1
0
		internal void performResume()
		{
			performRestart();
			mFragments.execPendingActions();
			mLastNonConfigurationInstances = null;
			mCalled = false;
			mInstrumentation.callActivityOnResume(this);
			if (!mCalled)
			{
				throw new android.app.SuperNotCalledException("Activity " + mComponent.toShortString
					() + " did not call through to super.onResume()");
			}
			mCalled = false;
			mFragments.dispatchResume();
			mFragments.execPendingActions();
			onPostResume();
			if (!mCalled)
			{
				throw new android.app.SuperNotCalledException("Activity " + mComponent.toShortString
					() + " did not call through to super.onPostResume()");
			}
		}
示例#2
0
		internal virtual android.app.Activity.NonConfigurationInstances retainNonConfigurationInstances
			()
		{
			object activity = onRetainNonConfigurationInstance();
			java.util.HashMap<string, object> children = onRetainNonConfigurationChildInstances
				();
			java.util.ArrayList<android.app.Fragment> fragments = mFragments.retainNonConfig(
				);
			bool retainLoaders = false;
			if (mAllLoaderManagers != null)
			{
				{
					for (int i = mAllLoaderManagers.size() - 1; i >= 0; i--)
					{
						android.app.LoaderManagerImpl lm = mAllLoaderManagers.valueAt(i);
						if (lm.mRetaining)
						{
							retainLoaders = true;
						}
						else
						{
							lm.doDestroy();
							mAllLoaderManagers.removeAt(i);
						}
					}
				}
			}
			if (activity == null && children == null && fragments == null && !retainLoaders)
			{
				return null;
			}
			android.app.Activity.NonConfigurationInstances nci = new android.app.Activity.NonConfigurationInstances
				();
			nci.activity = activity;
			nci.children = children;
			nci.fragments = fragments;
			nci.loaders = mAllLoaderManagers;
			return nci;
		}
示例#3
0
		internal void attach(android.content.Context context, android.app.ActivityThread 
			aThread, android.app.Instrumentation instr, android.os.IBinder token, int ident, 
			android.app.Application application, android.content.Intent intent, android.content.pm.ActivityInfo
			 info, java.lang.CharSequence title, android.app.Activity parent, string id, android.app.Activity
			.NonConfigurationInstances lastNonConfigurationInstances, android.content.res.Configuration
			 config)
		{
			attachBaseContext(context);
			mFragments.attachActivity(this);
			mWindow = [email protected](this);
			mWindow.setCallback(this);
			mWindow.getLayoutInflater().setPrivateFactory(this);
			if (info.softInputMode != android.view.WindowManagerClass.LayoutParams.SOFT_INPUT_STATE_UNSPECIFIED)
			{
				mWindow.setSoftInputMode(info.softInputMode);
			}
			if (info.uiOptions != 0)
			{
				mWindow.setUiOptions(info.uiOptions);
			}
			mUiThread = java.lang.Thread.currentThread();
			mMainThread = aThread;
			mInstrumentation = instr;
			mToken = token;
			mIdent = ident;
			mApplication = application;
			mIntent = intent;
			mComponent = intent.getComponent();
			mActivityInfo = info;
			mTitle = title;
			mParent = parent;
			mEmbeddedID = id;
			mLastNonConfigurationInstances = lastNonConfigurationInstances;
			mWindow.setWindowManager(null, mToken, mComponent.flattenToString(), (info.flags 
				& android.content.pm.ActivityInfo.FLAG_HARDWARE_ACCELERATED) != 0);
			if (mParent != null)
			{
				mWindow.setContainer(mParent.getWindow());
			}
			mWindowManager = mWindow.getWindowManager();
			mCurrentConfig = config;
		}