您的当前位置:首页正文

【译】Android 6.0接口变化(三)(Android 6.

来源:花图问答

一、关键点

13、运行时:Runtime
14、APK校验:APK Validation
15、USB连接:USB Connection
16、Android企业版变化:Android for Work Changes

二、详述:

13、Runtime

14、APK Validation

The platform now performs stricter validation of APKs. An APK is considered corrupt if a file is declared in the manifest but not present in the APK itself. An APK must be re-signed if any of the contents are removed.
平台现在执行严格的APK校验,如果一个文件在manifest中定义了但没有在APK中出现会被认为是一个坏APK。如果有内容改变APK必须重新签名。

15、USB Connection

Device connections through the USB port are now set to charge-only mode by default. To access the device and its content over a USB connection, users must explicitly grant permission for such interactions. If your app supports user interactions with the device over a USB port, take into consideration that the interaction must be explicitly enabled.
设备通过USB端口连接现在会默认设置为“仅充电”模式。想通过USB访问设备内容必须明确通过用户交互完成授权。如果你的应用支持通过USB端口的交互,要考虑到这种交互必须被明确的启用。

16、Android for Work Changes

This release includes the following behavior changes for Android for Work:

  • Download device policy controller via Google account addition: When a Google account that requires management via a device policy controller (DPC) app is added to a device outside of a managed context, the add account flow now prompts the user to install the appropriate WPC. This behavior also applies to accounts added via Settings > Accounts and in the initial device setup wizard.

    • The DevicePolicyManager.createAndInitializeUser()
      and DevicePolicyManager.createUser()
      methods have been deprecated.

    • Device initializer APIs which existed in the Android 6.0 (API level 23) are now removed.

    • EXTRA_PROVISIONING_RESET_PROTECTION_PARAMETERS
      is removed so NFC bump provisioning cannot programmatically unlock a factory reset protected device.

  • Changes to global settings:

      • BLUETOOTH_ON
      • DEVELOPMENT_SETTINGS_ENABLED
      • MODE_RINGER
      • NETWORK_PREFERENCE
      • WIFI_ON