|
|
@ -1185,7 +1185,7 @@ public class BrowserActivity extends ActionBarActivity implements BrowserControl |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected synchronized void newTab(String url, boolean show) { |
|
|
|
protected synchronized boolean newTab(String url, boolean show) { |
|
|
|
mIsNewIntent = false; |
|
|
|
mIsNewIntent = false; |
|
|
|
LightningView startingTab = new LightningView(mActivity, url); |
|
|
|
LightningView startingTab = new LightningView(mActivity, url); |
|
|
|
if (mIdGenerator == 0) { |
|
|
|
if (mIdGenerator == 0) { |
|
|
@ -1199,6 +1199,7 @@ public class BrowserActivity extends ActionBarActivity implements BrowserControl |
|
|
|
mDrawerListLeft.setItemChecked(mWebViews.size() - 1, true); |
|
|
|
mDrawerListLeft.setItemChecked(mWebViews.size() - 1, true); |
|
|
|
showTab(startingTab); |
|
|
|
showTab(startingTab); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private synchronized void deleteTab(int position) { |
|
|
|
private synchronized void deleteTab(int position) { |
|
|
@ -2064,9 +2065,9 @@ public class BrowserActivity extends ActionBarActivity implements BrowserControl |
|
|
|
Message click = mClickHandler.obtainMessage(); |
|
|
|
Message click = mClickHandler.obtainMessage(); |
|
|
|
if (click != null) { |
|
|
|
if (click != null) { |
|
|
|
click.setTarget(mClickHandler); |
|
|
|
click.setTarget(mClickHandler); |
|
|
|
} |
|
|
|
|
|
|
|
mCurrentView.getWebView().requestFocusNodeHref(click); |
|
|
|
mCurrentView.getWebView().requestFocusNodeHref(click); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void onShowCustomView(View view, int requestedOrientation, CustomViewCallback callback) { |
|
|
|
public void onShowCustomView(View view, int requestedOrientation, CustomViewCallback callback) { |
|
|
@ -2077,7 +2078,11 @@ public class BrowserActivity extends ActionBarActivity implements BrowserControl |
|
|
|
callback.onCustomViewHidden(); |
|
|
|
callback.onCustomViewHidden(); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
try{ |
|
|
|
view.setKeepScreenOn(true); |
|
|
|
view.setKeepScreenOn(true); |
|
|
|
|
|
|
|
} catch (SecurityException e){ |
|
|
|
|
|
|
|
Log.e(Constants.TAG, "WebView is not allowed to keep the screen on"); |
|
|
|
|
|
|
|
} |
|
|
|
mOriginalOrientation = getRequestedOrientation(); |
|
|
|
mOriginalOrientation = getRequestedOrientation(); |
|
|
|
FrameLayout decor = (FrameLayout) getWindow().getDecorView(); |
|
|
|
FrameLayout decor = (FrameLayout) getWindow().getDecorView(); |
|
|
|
mFullscreenContainer = new FullscreenHolder(this); |
|
|
|
mFullscreenContainer = new FullscreenHolder(this); |
|
|
@ -2103,7 +2108,11 @@ public class BrowserActivity extends ActionBarActivity implements BrowserControl |
|
|
|
} |
|
|
|
} |
|
|
|
Log.d(Constants.TAG, "onHideCustomView"); |
|
|
|
Log.d(Constants.TAG, "onHideCustomView"); |
|
|
|
mCurrentView.setVisibility(View.VISIBLE); |
|
|
|
mCurrentView.setVisibility(View.VISIBLE); |
|
|
|
|
|
|
|
try{ |
|
|
|
mCustomView.setKeepScreenOn(false); |
|
|
|
mCustomView.setKeepScreenOn(false); |
|
|
|
|
|
|
|
} catch (SecurityException e){ |
|
|
|
|
|
|
|
Log.e(Constants.TAG, "WebView is not allowed to keep the screen on"); |
|
|
|
|
|
|
|
} |
|
|
|
setFullscreen(mPreferences.getBoolean(PreferenceConstants.HIDE_STATUS_BAR, false)); |
|
|
|
setFullscreen(mPreferences.getBoolean(PreferenceConstants.HIDE_STATUS_BAR, false)); |
|
|
|
FrameLayout decor = (FrameLayout) getWindow().getDecorView(); |
|
|
|
FrameLayout decor = (FrameLayout) getWindow().getDecorView(); |
|
|
|
if (decor != null) { |
|
|
|
if (decor != null) { |
|
|
@ -2217,11 +2226,12 @@ public class BrowserActivity extends ActionBarActivity implements BrowserControl |
|
|
|
if (resultMsg == null) { |
|
|
|
if (resultMsg == null) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
newTab("", true); |
|
|
|
if (newTab("", true)) { |
|
|
|
WebView.WebViewTransport transport = (WebView.WebViewTransport) resultMsg.obj; |
|
|
|
WebView.WebViewTransport transport = (WebView.WebViewTransport) resultMsg.obj; |
|
|
|
transport.setWebView(mCurrentView.getWebView()); |
|
|
|
transport.setWebView(mCurrentView.getWebView()); |
|
|
|
resultMsg.sendToTarget(); |
|
|
|
resultMsg.sendToTarget(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
/** |
|
|
|
/** |
|
|
|