Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package com.android.webview.chromium; | 5 package com.android.webview.chromium; |
| 6 | 6 |
| 7 import android.Manifest; | 7 import android.Manifest; |
| 8 import android.app.ActivityManager; | 8 import android.app.ActivityManager; |
| 9 import android.content.ComponentCallbacks2; | 9 import android.content.ComponentCallbacks2; |
| 10 import android.content.Context; | 10 import android.content.Context; |
| (...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 515 } | 515 } |
| 516 } | 516 } |
| 517 return mStaticMethods; | 517 return mStaticMethods; |
| 518 } | 518 } |
| 519 | 519 |
| 520 @Override | 520 @Override |
| 521 public WebViewProvider createWebView(WebView webView, WebView.PrivateAccess privateAccess) { | 521 public WebViewProvider createWebView(WebView webView, WebView.PrivateAccess privateAccess) { |
| 522 return new WebViewChromium(this, webView, privateAccess, mShouldDisableT hreadChecking); | 522 return new WebViewChromium(this, webView, privateAccess, mShouldDisableT hreadChecking); |
| 523 } | 523 } |
| 524 | 524 |
| 525 // Check this as a workaround for https://crbug.com/622151. | 525 // Check this as a workaround for crbug.com/622151, crbug.com/651706 |
| 526 private boolean shouldDisableThreadChecking(Context context) { | 526 private boolean shouldDisableThreadChecking(Context context) { |
| 527 final String lgeMailPackageId = "com.lge.email"; | |
| 528 if (lgeMailPackageId.equals(context.getPackageName())) { | |
| 529 // TODO(changwan): need to do version check once LGE notifies us. | |
|
aelias_OOO_until_Jul13
2016/10/05 23:01:53
Can you fill in the code with placeholder version
Changwan Ryu
2016/10/06 05:31:41
Done.
| |
| 530 return true; | |
| 531 } | |
| 527 if (Build.VERSION.SDK_INT > Build.VERSION_CODES.M) return false; | 532 if (Build.VERSION.SDK_INT > Build.VERSION_CODES.M) return false; |
| 528 final String htcMailPackageId = "com.htc.android.mail"; | 533 final String htcMailPackageId = "com.htc.android.mail"; |
| 529 if (!htcMailPackageId.equals(context.getPackageName())) return false; | 534 if (!htcMailPackageId.equals(context.getPackageName())) return false; |
| 530 try { | 535 try { |
| 531 PackageInfo packageInfo = | 536 PackageInfo packageInfo = |
| 532 context.getPackageManager().getPackageInfo(htcMailPackageId, 0); | 537 context.getPackageManager().getPackageInfo(htcMailPackageId, 0); |
| 533 if (packageInfo == null) return false; | 538 if (packageInfo == null) return false; |
| 534 | 539 |
| 535 // These values are provided by HTC. | 540 // These values are provided by HTC. |
| 536 if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M | 541 if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 654 mWebViewDatabase = new WebViewDatabaseAdapter(this, awDatabase); | 659 mWebViewDatabase = new WebViewDatabaseAdapter(this, awDatabase); |
| 655 } | 660 } |
| 656 } | 661 } |
| 657 return mWebViewDatabase; | 662 return mWebViewDatabase; |
| 658 } | 663 } |
| 659 | 664 |
| 660 WebViewDelegate getWebViewDelegate() { | 665 WebViewDelegate getWebViewDelegate() { |
| 661 return mWebViewDelegate; | 666 return mWebViewDelegate; |
| 662 } | 667 } |
| 663 } | 668 } |
| OLD | NEW |