private final void giveKeyEnventToBrowser() { boolean b1 = mBrowser.isLockBackKey(); boolean b2 = mBrowser.isSpaceShown(); if (b1 && !b2) { mBrowser.onAppKeyPress(EUExCallback.F_C_Key_Back); } else { mBrowser.goBack(); } }
public void handleIntent(Intent intent) { if (intent == null) { return; } try { Intent firstIntent = getIntent(); int type = intent.getIntExtra("ntype", 0); ; switch (type) { case ENotification.F_TYPE_PUSH: if (null != mBrowser) { String data = intent.getStringExtra("data"); String pushMessage = intent.getStringExtra("message"); SharedPreferences sp = getSharedPreferences(PushReportConstants.PUSH_DATA_SHAREPRE, Context.MODE_PRIVATE); Editor editor = sp.edit(); editor.putString(PushReportConstants.PUSH_DATA_SHAREPRE_DATA, data); editor.putString(PushReportConstants.PUSH_DATA_SHAREPRE_MESSAGE, pushMessage); editor.commit(); mBrowser.pushNotify(); } break; case ENotification.F_TYPE_USER: break; case ENotification.F_TYPE_SYS: break; default: getIntentData(intent); firstIntent.putExtras(intent); break; } } catch (Exception e) { e.printStackTrace(); } }
@Override public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); if (null != mBrowser) { mBrowser.onConfigurationChanged(newConfig); } }
public void loadByOtherApp() { if (OtherAppData != null) { if (isPageFinish()) { mBrowser.onLoadAppData(OtherAppData); OtherAppData = null; } } }
public void uexOnAuthorize(String id) { if (null != mBrowser) { if (isPageFinish()) { mBrowser.uexOnAuthorize(id); } else { mAuthorID = id; } } }
private final void clean() { if (null != mBrowser) { mBrowser.clean(); } if (null != mScreen) { mScreen.removeAllViews(); } WidgetOneApplication app = (WidgetOneApplication) getApplication(); app.exitApp(); mEHandler.clean(); mBrowserAround.clean(); mFinish = true; Runtime.getRuntime().gc(); }
@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 public final boolean onKeyUp(int keyCode, KeyEvent event) { if (!mKeyDown) { return true; } mKeyDown = false; switch (keyCode) { case KeyEvent.KEYCODE_BACK: if (customViewShown()) { hideCustomView(); } else { giveKeyEnventToBrowser(); } return true; case KeyEvent.KEYCODE_MENU: if (mBrowser.isLockMenuKey() && !mBrowser.isSpaceShown()) { mBrowser.onAppKeyPress(EUExCallback.F_C_Key_Menu); return true; } break; } return super.onKeyUp(keyCode, event); }
@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"); }
public final void exitBrowser() { if (mSipBranch) { Intent intent = new Intent(Intent.ACTION_MAIN); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.addCategory(Intent.CATEGORY_HOME); startActivity(intent); return; } if (null != mBrowser) { mBrowser.onAppStop(); } mBrowserAround.removeViewImmediate(); LocalActivityManager lm = getLocalActivityManager(); lm.removeAllActivities(); clean(); finish(); Process.killProcess(Process.myPid()); }
private final void initEngine(Message resultMsg) { if (resultMsg.arg1 == 0) { loadResError(); return; } ACEDes.getObfuscationList(); WWidgetData rootWidget = (WWidgetData) resultMsg.obj; // String[] plugins = {"uexXmlHttpMgr", "uexCamera"}; // rootWidget.disablePlugins = plugins; changeConfiguration(rootWidget.m_orientation); EBrowserWidgetPool eBrwWidPo = new EBrowserWidgetPool(mBrowser, mEBrwMainFrame, mBrowserAround); mBrowser.init(eBrwWidPo); // rootWidget.m_indexUrl = "http://xhsnbjlxt.cloud7.com.cn"; // rootWidget.m_indexUrl = "http://192.168.1.38:8080/ldx/index.html"; eBrwWidPo.init(rootWidget); mBrowserAround.init(eBrwWidPo); mEBrwMainFrame.init(mBrowser); mBrowserAround.setSpaceFlag(rootWidget.getSpaceStatus()); mEHandler.sendMessageDelayed(mEHandler.obtainMessage(EHandler.F_MSG_LOAD_DELAY), 100); WidgetOneApplication app = (WidgetOneApplication) getApplication(); app.widgetRegist(rootWidget, this); }
public final Bitmap getImage(String bgPath) { if (null != mBrowser) { return mBrowser.getImage(bgPath); } return null; }