@Override
 protected void onResume() {
   super.onResume();
   EUtil.loge("App onResume");
   mVisable = true;
   if (null != mBrowser) {
     mBrowser.onAppResume();
   }
   if (null != mBrowserAround) {
     mBrowserAround.onResume();
   }
   isForground = true;
   reflectionPluginMethod("onActivityResume");
 }
 @Override
 protected void onPause() {
   isForground = false;
   super.onPause();
   EUtil.loge("App onPause");
   mVisable = false;
   if (mFinish) {
     return;
   }
   if (null != mBrowser) {
     mBrowser.onAppPause();
   }
   if (null != mBrowserAround) {
     mBrowserAround.onPause();
   }
   reflectionPluginMethod("onActivityPause");
 }
  private final View initEngineUI() {
    mScreen = new FrameLayout(this);
    FrameLayout.LayoutParams screenPa = new FrameLayout.LayoutParams(Compat.FILL, Compat.FILL);
    mScreen.setLayoutParams(screenPa);

    mEBrwMainFrame = new EBrowserMainFrame(this);
    FrameLayout.LayoutParams mainPagePa = new FrameLayout.LayoutParams(Compat.FILL, Compat.FILL);
    EUtil.viewBaseSetting(mEBrwMainFrame);
    mEBrwMainFrame.setLayoutParams(mainPagePa);
    mScreen.addView(mEBrwMainFrame);

    FrameLayout splash = new FrameLayout(this);
    splash.setClickable(true);

    FrameLayout.LayoutParams shelterPa = new FrameLayout.LayoutParams(Compat.FILL, Compat.FILL);
    splash.setLayoutParams(shelterPa);
    mScreen.addView(splash);

    /*
     * ImageView background = new ImageView(this);
     *
     * FrameLayout.LayoutParams backgroundPa = new
     * FrameLayout.LayoutParams(Compat.FILL, Compat.FILL);
     * background.setLayoutParams(backgroundPa);
     *
     *
     *
     * splash.addView(background);
     */
    /*
     * if(0 < screenWidth && screenWidth < 480){
     * foreground.setBackgroundResource(EResources.startup_fg_small); }else
     * if(480 <= screenWidth && screenWidth < 720){
     * foreground.setBackgroundResource(EResources.startup_fg_normal); }else
     * if(720 <= screenWidth && screenWidth < 1080){ if(0 !=
     * EResources.startup_fg_large){
     * foreground.setBackgroundResource(EResources.startup_fg_large); }else{
     * foreground.setBackgroundResource(EResources.startup_fg_normal); }
     * }else { if(0 != EResources.startup_fg_xlarge){
     * foreground.setBackgroundResource(EResources.startup_fg_xlarge);
     * }else{
     * foreground.setBackgroundResource(EResources.startup_fg_normal); } }
     */
    /*
     * FrameLayout.LayoutParams foregroundPa = new
     * FrameLayout.LayoutParams(Compat.WRAP, Compat.WRAP);
     * foregroundPa.gravity = Gravity.CENTER;
     * foreground.setLayoutParams(foregroundPa); splash.addView(foreground);
     */

    /*
     * ImageView mark = new ImageView(this);
     * mark.setBackgroundResource(EResources.mark_bg);
     * FrameLayout.LayoutParams markPa = new
     * FrameLayout.LayoutParams(Compat.WRAP, Compat.WRAP); markPa.gravity =
     * Gravity.BOTTOM | Gravity.RIGHT; mark.setLayoutParams(markPa);
     * splash.addView(mark); if(develop){ TextView worn = new
     * TextView(this); worn.setText("测试版本仅用于开发测试");
     * worn.setTextColor(0xffff0000);
     * worn.setTextSize(TypedValue.COMPLEX_UNIT_SP, 18);
     * FrameLayout.LayoutParams wornPa = new
     * FrameLayout.LayoutParams(Compat.FILL, Compat.WRAP); wornPa.gravity =
     * Gravity.TOP; wornPa.leftMargin = 10; wornPa.topMargin = 10;
     * worn.setLayoutParams(wornPa); splash.addView(worn); }
     */
    return splash;
  }
 @Override
 protected void onDestroy() {
   EUtil.loge("App onDestroy");
   super.onDestroy();
   reflectionPluginMethod("onActivityDestroy");
 }
 @Override
 protected void onStop() {
   super.onStop();
   EUtil.loge("App onStop");
   reflectionPluginMethod("onActivityStop");
 }
 @Override
 protected void onRestart() {
   super.onRestart();
   EUtil.loge("App onRestart");
   reflectionPluginMethod("onActivityReStart");
 }
 @Override
 protected void onRestoreInstanceState(Bundle savedInstanceState) {
   // super.onRestoreInstanceState(savedInstanceState);
   EUtil.printeBackup(savedInstanceState, "onSaveInstanceState");
 }
 @Override
 protected void onSaveInstanceState(Bundle outState) {
   // super.onSaveInstanceState(outState);
   EUtil.printeBackup(outState, "onSaveInstanceState");
 }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(null);
    if (!EResources.init(this)) {
      loadResError();
      return;
    }
    Intent intent = new Intent(EBrowserActivity.this, TempActivity.class);
    intent.putExtra("isTemp", true);
    startActivity(intent);
    overridePendingTransition(
        EUExUtil.getResAnimID("platform_myspace_no_anim"),
        EUExUtil.getResAnimID("platform_myspace_no_anim"));

    mVisable = true;
    Window activityWindow = getWindow();
    ESystemInfo.getIntence().init(this);
    mBrowser = new EBrowser(this);
    mEHandler = new EHandler(Looper.getMainLooper());
    View splash = initEngineUI();
    mBrowserAround = new EBrowserAround(splash);
    //		mScreen.setVisibility(View.INVISIBLE);
    setContentView(mScreen);
    initInternalBranch();

    ACEDes.setContext(this);

    Message loadDelayMsg = mEHandler.obtainMessage(EHandler.F_MSG_LOAD_HIDE_SH);
    long delay = 3 * 1000L;
    if (mSipBranch) {
      delay = 1000L;
    }
    mEHandler.sendMessageDelayed(loadDelayMsg, delay);
    Message initAppMsg = mEHandler.obtainMessage(EHandler.F_MSG_INIT_APP);
    WidgetOneApplication app = (WidgetOneApplication) getApplication();
    app.initApp(this, initAppMsg);

    EUtil.printeBackup(savedInstanceState, "onCreate");
    // EUtil.checkAndroidProxy(getBaseContext());

    handleIntent(getIntent());
    PushRecieveMsgReceiver.setContext(this);

    globalSlidingMenu = new SlidingMenu(this);
    globalSlidingMenu.setTouchModeAbove(SlidingMenu.TOUCHMODE_FULLSCREEN);

    //        globalSlidingMenu.setShadowWidthRes(EUExUtil.getResDimenID("shadow_width"));
    //        globalSlidingMenu.setShadowDrawable(EUExUtil.getResDrawableID("shadow"));

    //        globalSlidingMenu.setShadowWidthRes(R.dimen.shadow_width);
    //        globalSlidingMenu.setShadowDrawable(R.drawable.shadow);
    //        globalSlidingMenu.setBehindOffsetRes(R.dimen.slidingmenu_offset);
    //        globalSlidingMenu.setFadeDegree(0.35f);
    //        globalSlidingMenu.attachToActivity(this, SlidingMenu.SLIDING_CONTENT);
    //        globalSlidingMenu.setMenu(R.layout.menu_frame);
    //        globalSlidingMenu.setMode(SlidingMenu.LEFT_RIGHT);
    //
    //        globalSlidingMenu.setSecondaryMenu(R.layout.menu_frame_two);
    //        globalSlidingMenu.setSecondaryShadowDrawable(R.drawable.shadowright);
    //        globalSlidingMenu.setBehindWidthRes(R.dimen.slidingmenu_width);
    //        globalSlidingMenu.setBehindWidthRes(0);
    reflectionPluginMethod("onActivityCreate");
    try {
      activityWindow.clearFlags(
          WindowManager.LayoutParams.class.getField("FLAG_NEEDS_MENU_KEY").getInt(null));
    } catch (Exception e) {
      e.printStackTrace();
    }
  }