AppwidgetServiceImpl.java

    private void sendEnableIntentLocked(Provider p) {        Intent intent = new Intent(AppWidgetManager.ACTION_APPWIDGET_ENABLED);        intent.setComponent(p.info.provider);        intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);//hujiye 20181225 add        sendBroadcastAsUser(intent, p.info.getProfile());    }    private void sendUpdateIntentLocked(Provider provider, int[] appWidgetIds) {        Intent intent = new Intent(AppWidgetManager.ACTION_APPWIDGET_UPDATE);        intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, appWidgetIds);        intent.setComponent(provider.info.provider);        intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);//hujiye 20181225 add        sendBroadcastAsUser(intent, provider.info.getProfile());    }

更多相关文章

  1. 代码中设置drawableleft
  2. android 3.0 隐藏 系统标题栏
  3. Android开发中activity切换动画的实现
  4. Android(安卓)学习 笔记_05. 文件下载
  5. Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
  6. 技术博客汇总
  7. android 2.3 wifi (一)
  8. AndRoid Notification的清空和修改
  9. Android中的Chronometer

随机推荐

  1. Android 2.3用户增长到10%
  2. android:scaleType、android:layout_alig
  3. 暮拾晨花,回望流年——我的2016
  4. Android应用程序进程启动过程(前篇)
  5. Android接入WebView(五)——浏览器制作总结
  6. ANDROID基础部分的总结
  7. android与Unity3d交互
  8. Android实现录屏直播(二)需求才是硬道理之
  9. Android签名证书生成
  10. Android有用代码片段2