zoukankan      html  css  js  c++  java
  • Activity

    final void attach(Context context, ActivityThread aThread,
    Instrumentation instr, IBinder token, int ident,
    Application application, Intent intent, ActivityInfo info,
    CharSequence title, Activity parent, String id,
    NonConfigurationInstances lastNonConfigurationInstances,
    Configuration config, String referrer, IVoiceInteractor voiceInteractor) {
    attachBaseContext(context);

    mFragments.attachHost(null /*parent*/);

    mWindow = new PhoneWindow(this);
    mWindow.setCallback(this);
    mWindow.setOnWindowDismissedCallback(this);
    mWindow.getLayoutInflater().setPrivateFactory(this);
    if (info.softInputMode != WindowManager.LayoutParams.SOFT_INPUT_STATE_UNSPECIFIED) {
    mWindow.setSoftInputMode(info.softInputMode);
    }
    if (info.uiOptions != 0) {
    mWindow.setUiOptions(info.uiOptions);
    }
    mUiThread = Thread.currentThread();

    mMainThread = aThread;
    mInstrumentation = instr;
    mToken = token;
    mIdent = ident;
    mApplication = application;
    mIntent = intent;
    mReferrer = referrer;
    mComponent = intent.getComponent();
    mActivityInfo = info;
    mTitle = title;
    mParent = parent;
    mEmbeddedID = id;
    mLastNonConfigurationInstances = lastNonConfigurationInstances;
    if (voiceInteractor != null) {
    if (lastNonConfigurationInstances != null) {
    mVoiceInteractor = lastNonConfigurationInstances.voiceInteractor;
    } else {
    mVoiceInteractor = new VoiceInteractor(voiceInteractor, this, this,
    Looper.myLooper());
    }
    }

    mWindow.setWindowManager(
    (WindowManager)context.getSystemService(Context.WINDOW_SERVICE),
    mToken, mComponent.flattenToString(),
    (info.flags & ActivityInfo.FLAG_HARDWARE_ACCELERATED) != 0);
    if (mParent != null) {
    mWindow.setContainer(mParent.getWindow());
    }
    mWindowManager = mWindow.getWindowManager();
    mCurrentConfig = config;
    }
  • 相关阅读:
    Jzoj5542 董先生的钦点
    Jzoj5542 董先生的钦点
    (各种)FFT模板
    (各种)FFT模板
    Jzoj3528 图书馆
    Jzoj3528 图书馆
    Jzoj5317 Func
    Jzoj5317 Func
    Jzoj3591 数据
    【UVa11021】Tribles
  • 原文地址:https://www.cnblogs.com/feng9exe/p/5716015.html
Copyright © 2011-2022 走看看