9.0 重启桌面时间小部件加载慢

    [MTK8163-P][appwidget]Restart the desktop clock widget to load slowly

diff --git a/frameworks/base/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java b/frameworks/base/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
index 7797f89d11..5cd6a92be8 100755
--- a/frameworks/base/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
+++ b/frameworks/base/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
@@ -2321,12 +2321,14 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
 
     private void sendEnableIntentLocked(Provider p) {
         Intent intent = new Intent(AppWidgetManager.ACTION_APPWIDGET_ENABLED);
+        intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);//add dengli for Restart the desktop clock widget to load slowly
         intent.setComponent(p.info.provider);
         sendBroadcastAsUser(intent, p.info.getProfile());
     }
 
     private void sendUpdateIntentLocked(Provider provider, int[] appWidgetIds) {
         Intent intent = new Intent(AppWidgetManager.ACTION_APPWIDGET_UPDATE);
+        intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);//add dengli for Restart the desktop clock widget to load slowly
         intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, appWidgetIds);
         intent.setComponent(provider.info.provider);
         sendBroadcastAsUser(intent, provider.info.getProfile());
 

你可能感兴趣的:(9.0 重启桌面时间小部件加载慢)