一、关键点
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的如下变化
- Your apps can now change the state of WifiConfiguration
objects only if you created these objects. You are not permitted to modify or deleteWifiConfiguration
objects created by the user or by other apps.
你的APP只能修改你自己创建的实例的WifiConfiguration状态。修改或删除其他用户创建的实例的WifiConfiguration是不允许的。 - Previously, if an app forced the device to connect to a specific Wi-Fi network by using [enableNetwork()](https://developer.android.com/reference/android/net/wifi/WifiManager.html#enableNetwork(int, boolean))
with the disableAllOthers=true
setting, the device disconnected from other networks such as cellular data. In This release, the device no longer disconnects from such other networks. If your app’s targetSdkVersion
is “20”
or lower, it is pinned to the selected Wi-Fi network. If your app’s targetSdkVersion
is “21”
or higher, use the multinetwork APIs (such as openConnection()
, bindSocket()
, and the new bindProcessToNetwork()
method) to ensure that its network traffic is sent on the selected network.
之前,如果一个APP想强制连接一个特定的WiFi,可以用 [enableNetwork()](https://developer.android.com/reference/android/net/wifi/WifiManager.html#enableNetwork(int, boolean)),并设置disableAllOthers=true。设备会断开与其他网络的数据连接。从这个发布版开始,设备不会再断开其他网络的连接。如果你APP的版本是20或更低,会被固定在所选的网络。如果你APP的版是21或更高,需求使用多网接口(例如: openConnection()
, bindSocket(), 还有新的方法 bindProcessToNetwork())来确保连接到了所选择的网络。
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.
改变当前使用者会引起之前使用者的应用被“驱逐”而无法使用相机。相机的接入被当前使用用户所限制,实际使用中这个意思就是一个“访问者”客户,比如:当用户切换账户时使用的相机子系统不会脱离正在运行的程序。