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;
    }
  • 相关阅读:
    两个单链表的第一个公共节点
    对于混沌定义中三个条件的理解
    sort()函数使用详解
    C++优先队列详解
    第一次只出现一个的字符
    丑数
    把数组排成最小的数
    从1到n整数中1的个数
    git相关知识
    文件处理(如果文件存在则追加,不存在则生成多级文件夹以及txt目录)
  • 原文地址:https://www.cnblogs.com/feng9exe/p/5716015.html
Copyright © 2011-2022 走看看