细节参考:https://android.googlesource.com
内容如下:

Prevent apps to overlay other apps via toast windowsIt was possible for apps to put toast type windowsthat overlay other apps which toast winodws aren'tremoved after a timeout.Now for apps targeting SDK greater than N MR1 to add atoast window one needs to have a special token. The tokenis added by the notificatoion manager service only forthe lifetime of the shown toast and is then removedincluding all windows associated with this token. Thisprevents apps to add arbitrary toast windows.Since legacy apps may rely on the ability to directlyadd toasts we mitigate by allowing these apps to stilladd such windows for unlimited duration if this app isthe currently focused one, i.e. the user interacts withit then it can overlay itself, otherwise we make surethese toast windows are removed after a timeout likea toast would be.We don't allow more that one toast window per UID beingadded at a time which prevents 1) legacy apps to put thesame toast after a timeout to go around our new policyof hiding toasts after a while; 2) modern apps to reusethe passed token to add more than one window; Note thatthe notification manager shows toasts one at a time.bug:30150688Change-Id: Icc8f8dbd060762ae1a7b1720e96c5afdb8aff3fd

更多相关文章

  1. Android(安卓)studio实现按钮的点击事件
  2. Android模仿Buttonbar
  3. android:注册时的协议---》方法一:弹出框
  4. android将后台应用置顶及moveTaskToFront的用法
  5. Android如何监听输入框的出现和隐藏
  6. 判断可用的intent和更改Drawable的透明度
  7. android 4.3源码编译
  8. org.gradle.api.GradleException: Lint found fatal errors whil
  9. Android基础之Android的Activity周期

随机推荐

  1. Android 输入法弹出监听,保持标题固定不被
  2. 阅读《Android 从入门到精通》(4)——人机
  3. Android Developers:保存文件
  4. Android 长按home键强制关闭应用后,在哪里
  5. 三年Android技术支持工作总结及心得
  6. android的消息处理机制(Looper,Handler,M
  7. fix android build error : undefined re
  8. gen文件无法生成
  9. Android stutio 中怎么将XML中文件快速fi
  10. Android中dp sp和pt