Loading services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java +6 −6 Original line number Original line Diff line number Diff line Loading @@ -1142,7 +1142,7 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku } else { } else { // For any widget other then the first one, we just send update intent // For any widget other then the first one, we just send update intent // as we normally would. // as we normally would. sendUpdateIntentLocked(provider, new int[]{appWidgetId}); sendUpdateIntentLocked(provider, new int[]{appWidgetId}, true); } } // Schedule the future updates. // Schedule the future updates. Loading Loading @@ -2379,7 +2379,7 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku if (!canSendCombinedBroadcast) { if (!canSendCombinedBroadcast) { // If this function is called by mistake, send two separate broadcasts instead // If this function is called by mistake, send two separate broadcasts instead sendEnableIntentLocked(p); sendEnableIntentLocked(p); sendUpdateIntentLocked(p, appWidgetIds); sendUpdateIntentLocked(p, appWidgetIds, true); return; return; } } Loading @@ -2399,12 +2399,12 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku sendBroadcastAsUser(intent, p.id.getProfile(), true); sendBroadcastAsUser(intent, p.id.getProfile(), true); } } private void sendUpdateIntentLocked(Provider provider, int[] appWidgetIds) { private void sendUpdateIntentLocked(Provider provider, int[] appWidgetIds, boolean interactive) { Intent intent = new Intent(AppWidgetManager.ACTION_APPWIDGET_UPDATE); Intent intent = new Intent(AppWidgetManager.ACTION_APPWIDGET_UPDATE); intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, appWidgetIds); intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, appWidgetIds); intent.setComponent(provider.id.componentName); intent.setComponent(provider.id.componentName); // Periodic background widget update heartbeats are not an interactive use case sendBroadcastAsUser(intent, provider.id.getProfile(), interactive); sendBroadcastAsUser(intent, provider.id.getProfile(), false); } } private void sendDeletedIntentLocked(Widget widget) { private void sendDeletedIntentLocked(Widget widget) { Loading Loading @@ -3589,7 +3589,7 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku scheduleNotifyProviderChangedLocked(widget); scheduleNotifyProviderChangedLocked(widget); } } // Now that we've told the host, push out an update. // Now that we've told the host, push out an update. sendUpdateIntentLocked(provider, appWidgetIds); sendUpdateIntentLocked(provider, appWidgetIds, false); } } } } providersUpdated = true; providersUpdated = true; Loading Loading
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java +6 −6 Original line number Original line Diff line number Diff line Loading @@ -1142,7 +1142,7 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku } else { } else { // For any widget other then the first one, we just send update intent // For any widget other then the first one, we just send update intent // as we normally would. // as we normally would. sendUpdateIntentLocked(provider, new int[]{appWidgetId}); sendUpdateIntentLocked(provider, new int[]{appWidgetId}, true); } } // Schedule the future updates. // Schedule the future updates. Loading Loading @@ -2379,7 +2379,7 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku if (!canSendCombinedBroadcast) { if (!canSendCombinedBroadcast) { // If this function is called by mistake, send two separate broadcasts instead // If this function is called by mistake, send two separate broadcasts instead sendEnableIntentLocked(p); sendEnableIntentLocked(p); sendUpdateIntentLocked(p, appWidgetIds); sendUpdateIntentLocked(p, appWidgetIds, true); return; return; } } Loading @@ -2399,12 +2399,12 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku sendBroadcastAsUser(intent, p.id.getProfile(), true); sendBroadcastAsUser(intent, p.id.getProfile(), true); } } private void sendUpdateIntentLocked(Provider provider, int[] appWidgetIds) { private void sendUpdateIntentLocked(Provider provider, int[] appWidgetIds, boolean interactive) { Intent intent = new Intent(AppWidgetManager.ACTION_APPWIDGET_UPDATE); Intent intent = new Intent(AppWidgetManager.ACTION_APPWIDGET_UPDATE); intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, appWidgetIds); intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, appWidgetIds); intent.setComponent(provider.id.componentName); intent.setComponent(provider.id.componentName); // Periodic background widget update heartbeats are not an interactive use case sendBroadcastAsUser(intent, provider.id.getProfile(), interactive); sendBroadcastAsUser(intent, provider.id.getProfile(), false); } } private void sendDeletedIntentLocked(Widget widget) { private void sendDeletedIntentLocked(Widget widget) { Loading Loading @@ -3589,7 +3589,7 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku scheduleNotifyProviderChangedLocked(widget); scheduleNotifyProviderChangedLocked(widget); } } // Now that we've told the host, push out an update. // Now that we've told the host, push out an update. sendUpdateIntentLocked(provider, appWidgetIds); sendUpdateIntentLocked(provider, appWidgetIds, false); } } } } providersUpdated = true; providersUpdated = true; Loading