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;
    }
  • 相关阅读:
    Metabase研究 开源的数据报表
    Redis配置不当致使root被提权漏洞
    一个程序员被骗去养猪
    调度器简介,以及Linux的调度策略
    Linux的内存分页管理
    在地铁11号线上写书
    为什么说“概率”带来一场现代革命?
    快速学习Bash
    用树莓派玩转蓝牙
    树莓派的GPIO编程
  • 原文地址:https://www.cnblogs.com/feng9exe/p/5716015.html
Copyright © 2011-2022 走看看