Commit f819c828 by Lee Jaebin

初回起動時の編集確認処理除去

parent fe870d7b
......@@ -242,39 +242,6 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
webView.setWebViewClient(new WebViewClient() {
@Override
public WebResourceResponse shouldInterceptRequest(WebView view, final String url) {
if (mXWalkOpenType == Constant.XWalkOpenType.PANO_EDIT) {
// 360編集画面時に以下の処理でステータスコードのチェックを行う
if (!url.contains("%")) {
new Thread(new Runnable() {
@Override
public void run() {
HttpGet httpGet = new HttpGet(url);
HttpResponse response;
HttpClient client = new DefaultHttpClient();
try {
response = client.execute(httpGet);
final int statusCode = response.getStatusLine().getStatusCode();
Logger.d("shouldInterceptRequest url :" + url + " status code : " + statusCode);
if (statusCode >= 400) {
handler.post(new Runnable() {
@Override
public void run() {
commonOnReceivedResponseHeaders(url, statusCode);
}
});
}
} catch (IOException e) {
Logger.e(TAG, e);
}
}
}).start();
}
}
return null;
}
@Override
public void onLoadResource(WebView view, String url) {
backCheckFlg = view.canGoBack();
forwardCheckFlg = view.canGoForward();
......
......@@ -252,11 +252,6 @@ public class HTMLXWalkWebViewActivity extends ParentWebViewActivity {
});
webView.setResourceClient(new XWalkResourceClient(webView) {
@Override
public void onReceivedResponseHeaders (XWalkView view, XWalkWebResourceRequest request, XWalkWebResourceResponse response) {
String uri = request.getUrl().toString();
commonOnReceivedResponseHeaders(uri, response.getStatusCode());
}
@Override
public void onReceivedLoadError (XWalkView view, int errorCode, String description, String failingUrl) {
......
......@@ -99,33 +99,6 @@ public class ParentWebViewActivity extends ABVContentViewActivity {
}
}
protected void commonOnReceivedResponseHeaders(String uri, int statusCode) {
if (uri.contains("vtour") || uri.contains("authByCheck")) {
if(statusCode >= 400) {
// エラーのため、空のURLをロードさせ、白い画面で表示させる
webViewLoadUrl("");
ABookAlertDialog alertDialog = AlertDialogUtil.createAlertDialog(this, R.string.app_name);
// リソースパターンの適用
alertDialog.setMessage(String.format(PatternStringUtil.patternToString(getApplicationContext(),
R.string.error_msg_open_pano_edit,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)),
statusCode + ""));
// リソースパターンの適用
alertDialog.setPositiveButton(PatternStringUtil.patternToInt(getApplicationContext(),
R.string.ok,
getUserPref(AppDefType.UserPrefKey.RESOURCE_PATTERN_TYPE, 0)),
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
finish();
}
});
alertDialog.show();
}
}
}
protected void commonProgressChanged(int progress) {
setVisbilityProgress(true);
if (progress >= 100) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment