【译】Android 6.0接口变化(二)(Android 6.0 Changes)

原文:https://developer.android.com/about/versions/marshmallow/android-6.0-changes.html#behavior-runtime-permissions

一、关键点

9、浏览器书签:Browser Bookmark Changes
10、APP签名:Android Keystore Changes
11、WIFI和网络:Wi-Fi and Networking Changes
12、相机服务:Camera Service Changes
13、运行时:Runtime
14、APK校验:APK Validation
15、USB连接:USB Connection
16、Android企业版变化:Android for Work Changes

二、详述:

9、浏览器书签

This release removes support for global bookmarks. The android.provider.Browser.getAllBookmarks()
andandroid.provider.Browser.saveBookmark()
methods are now removed. Likewise, the READ_HISTORY_BOOKMARKS
and WRITE_HISTORY_BOOKMARKS
permissions are removed. If your app targets Android 6.0 (API level 23) or higher, don't access bookmarks from the global provider or use the bookmark permissions. Instead, your app should store bookmarks data internally.

这个发布版移除了对全局标签的支持。android.provider.Browser.getAllBookmarks()
和 android.provider.Browser.saveBookmark()方法现在已经移除了。同样的,READ_HISTORY_BOOKMARKS
和WRITE_HISTORY_BOOKMARKS权限也被移除了。如果你的APP使用了6.0或更高版本,不要通过标签提供者访问全局标签,也不要使用标签权限。你应该将标签数据缓存到你自己的程序内部。

10、APP签名

With this release, the Android Keystore provider no longer supports DSA. ECDSA is still supported.
Keys which do not require encryption at rest will no longer be deleted when secure lock screen is disabled or reset (for example, by the user or a Device Administrator). Keys which require encryption at rest will be deleted during these events.

这个发布版本 Android Keystore provider已经不再支持DSA了,但ECDSA还被支持。
当锁屏被禁用或重置(例如:用户自己或管理员),不需要加密的Key现在不会被删除,需要加密的会被删除。

11、Wi-Fi and Networking Changes

This release introduces the following behavior changes to the Wi-Fi and networking APIs.
发布版介绍了WiFi和网络API的如下变化

10、Camera Service Changes

In This release, the model for accessing shared resources in the camera service has been changed from the previous “first come, first serve” access model to an access model where high-priority processes are favored. Changes to the service behavior include:
这个发布版,以前的“先到先服务”的访问相机共享资源的模式已经被改为高优先级进程优先。改变的服务行为包括:

  • Access to camera subsystem resources, including opening and configuring a camera device, is awarded based on the “priority” of the client application process. Application processes with user-visible or foreground activities are generally given a higher-priority, making camera resource acquisition and use more dependable.
    访问相机子系统的资源包括打开和配置相机设备,是基于客户端(访问者)进程优先级。应用程序进程是用户可见或前台活动通常会被给予高优先级,确保相机获取和使用更加可靠。
  • Active camera clients for lower priority apps may be “evicted” when a higher priority application attempts to use the camera. In the deprecatedCamera
    API, this results in [onError()](https://developer.android.com/reference/android/hardware/Camera.ErrorCallback.html#onError(int, android.hardware.Camera))
    being called for the evicted client. In the Camera2
    API, it results in onDisconnected()
    being called for the evicted client.
    正在活动的低优先级程序可能被尝试使用相机的高优先级程序剥夺。在遗弃的Camera API中,可能会调用onError()通知被剥夺的APP。在Camera2 API中,会调用 onDisconnected() 通知被剥夺的APP。
  • On devices with appropriate camera hardware, separate application processes are able to independently open and use separate camera devices simultaneously. However, multi-process use cases, where simultaneous access causes significant degradation of performance or capabilities of any of the open camera devices, are now detected and disallowed by the camera service. This change may result in “evictions” for lower priority clients even when no other app is directly attempting to access the same camera device.
    在有合适相机的硬件上,多个应用程序进程可以同时打开并使用独立的相机设备。但是,多进程同时接入相机可能引起性能或其他打开相机设备的容量显著降低,但现在这种情况已经不被允许了。这个改变可能导致的结果是低优先级的应用会被“驱逐”,直到没有应用同时接入相机。
  • Changing the current user causes active camera clients in apps owned by the previous user account to be evicted. Access to the camera is limited to user profiles owned by the current device user. In practice, this means that a “Guest” account, for example, will not be able to leave running processes that use the camera subsystem when the user has switched to a different account.
    改变当前使用者会引起之前使用者的应用被“驱逐”而无法使用相机。相机的接入被当前使用用户所限制,实际使用中这个意思就是一个“访问者”客户,比如:当用户切换账户时使用的相机子系统不会脱离正在运行的程序。
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容