Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1839)

Unified Diff: components/policy/android/java/src/org/chromium/policy/AbstractAppRestrictionsProvider.java

Issue 1538643003: fix to run Webview Policy initialization on the UI thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2526
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/policy/android/java/src/org/chromium/policy/AbstractAppRestrictionsProvider.java
diff --git a/components/policy/android/java/src/org/chromium/policy/AbstractAppRestrictionsProvider.java b/components/policy/android/java/src/org/chromium/policy/AbstractAppRestrictionsProvider.java
index 3fc27327530627d127db420cc5baad5299fa57a8..bf77ebfa1003273a6055fb90e7392d80e3f19158 100644
--- a/components/policy/android/java/src/org/chromium/policy/AbstractAppRestrictionsProvider.java
+++ b/components/policy/android/java/src/org/chromium/policy/AbstractAppRestrictionsProvider.java
@@ -85,7 +85,12 @@ public void startListeningForPolicyChanges() {
public void refresh() {
final Bundle cachedResult = getCachedPolicies();
if (cachedResult != null) {
- notifySettingsAvailable(cachedResult);
+ ThreadUtils.runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ notifySettingsAvailable(cachedResult);
+ }
+ });
}
mExecutor.execute(new Runnable() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698