Home | History | Annotate | Download | only in marshmallow
      1 page.title=Android 6.0 Changes
      2 page.keywords=marshmallow,android60,sdk,compatibility
      3 meta.tags=marshmallow,api23,android60,androidm
      4 sdk.platform.apiLevel=23
      5 page.image=images/cards/samples-new_2x.png
      6 @jd:body
      7 
      8 <div id="qv-wrapper">
      9 <div id="qv">
     10 
     11 <h2>In this document</h2>
     12 
     13 <ol id="toc44" class="hide-nested">
     14     <li><a href="#behavior-runtime-permissions">Runtime Permissions</a></li>
     15     <li><a href="#behavior-power">Doze and App Standby</a></li>
     16     <li><a href="#behavior-apache-http-client">Apache HTTP Client Removal</a></li>
     17     <li><a href="#behavior-apache-http-client">BoringSSL</a></li>
     18     <li><a href="#behavior-hardware-id">Access to Hardware Identifiers</a></li>
     19     <li><a href="#behavior-notifications">Notifications</a></li>
     20     <li><a href="#behavior-audiomanager-Changes">AudioManager Changes</a></li>
     21     <li><a href="#behavior-text-selection">Text Selection</a></li>
     22     <li><a href="#behavior-bookmark-browser">Browser Bookmark Changes</a></li>
     23     <li><a href="#behavior-keystore">Android Keystore Changes</a></li>
     24     <li><a href="#behavior-network">Wi-Fi and Networking Changes</a></li>
     25     <li><a href="#behavior-camera">Camera Service Changes</a></li>
     26     <li><a href="#behavior-runtime">Runtime</a></li>
     27     <li><a href="#behavior-apk-validation">APK Validation</a></li>
     28     <li><a href="#behavior-usb">USB Connection</a></li>
     29     <li><a href="#behavior-afw">Android for Work Changes</a></li>
     30 </ol>
     31 
     32 <h2>API Differences</h2>
     33 <ol>
     34 <li><a href="{@docRoot}sdk/api_diff/23/changes.html">API level 22 to 23 &raquo;</a> </li>
     35 </ol>
     36 
     37 
     38 <h2>See Also</h2>
     39 <ol>
     40 <li><a href="{@docRoot}about/versions/marshmallow/android-6.0.html">Android 6.0 API Overview</a> </li>
     41 </ol>
     42 
     43 </div>
     44 </div>
     45 
     46 <p>Along with new features and capabilities, Android 6.0 (API level 23) includes a variety of
     47 system changes and API behavior changes. This document highlights
     48 some of the key changes that you should understand and account for in your apps.</p>
     49 
     50 <p>If you have previously published an app for Android, be aware that these changes in the
     51 platform affect your app.</p>
     52 
     53 <h2 id="behavior-runtime-permissions">Runtime Permissions</h1>
     54 <p>This release introduces a new permissions model, where users can now directly manage
     55 app permissions at runtime. This model gives users improved visibility and control over
     56 permissions, while streamlining the installation and auto-update processes for app developers.
     57 Users can grant or revoke permissions individually for installed apps. </p>
     58 
     59 <p>On your apps that target Android 6.0 (API level 23) or higher, make sure to check for and request
     60 permissions at runtime. To determine if your app has been granted a permission, call the
     61 new {@link android.content.Context#checkSelfPermission(java.lang.String) checkSelfPermission()}
     62 method. To request a permission, call the new
     63 {@link android.app.Activity#requestPermissions(java.lang.String[], int) requestPermissions()}
     64 method. Even if your app is not targeting Android 6.0 (API level 23), you should test your app under
     65 the new permissions model.</p>
     66 
     67 <p>For details on supporting the new permissions model in your app, see
     68 <a href="{@docRoot}training/permissions/index.html">
     69 Working with System Permissions</a>. For tips on how to assess the impact on your app,
     70 see <a href="{@docRoot}training/permissions/best-practices.html#testing">Permissions Best Practices</a>.</p>
     71 
     72 <h2 id="behavior-power">Doze and App Standby</h2>
     73 <p>This release introduces new power-saving optimizations for idle devices and apps. These
     74 features affect all apps so make sure to test your apps in these new modes.</p>
     75 <ul>
     76 <li><strong>Doze</strong>: If a user unplugs a device and leaves it stationary, with its screen off,
     77 for a period of time, the device goes into <em>Doze</em> mode, where it attempts to keep the system
     78 in a sleep state. In this mode, devices periodically resume normal operations for brief periods of
     79 time so that app syncing can occur and the system can perform any pending operations.
     80 <li><strong>App Standby</strong>: App Standby allows the system to determine that an app is idle
     81 when the user is not actively using it. The system makes this determination when the user does not
     82 touch the app for a certain period of time. If the device is unplugged, the system disables network
     83 access and suspends syncs and jobs for the apps it deems idle.</li>
     84 </ul>
     85 
     86 <p>To learn more about these power-saving changes, see
     87 <a href="{@docRoot}training/monitoring-device-state/doze-standby.html">Optimizing for Doze and App Standby</a>.</p>
     88 
     89 <h2 id="behavior-apache-http-client">Apache HTTP Client Removal</h2>
     90 
     91 <p>Android 6.0 release removes support for the Apache HTTP client. If your app is using this client and
     92 targets Android 2.3 (API level 9) or higher, use the {@link java.net.HttpURLConnection} class
     93 instead. This API is more efficient because it reduces network use through transparent compression
     94 and response caching, and minimizes power consumption. To continue using the Apache HTTP APIs, you
     95 must first declare the following compile-time dependency in your {@code build.gradle} file:
     96 </p>
     97 <pre>
     98 android {
     99     useLibrary 'org.apache.http.legacy'
    100 }
    101 </pre>
    102 
    103 <h2 id="boringSSL">BoringSSL </h2>
    104 
    105 <p>Android is moving away from OpenSSL to the
    106 <a href="https://boringssl.googlesource.com/boringssl/" class="external-link">BoringSSL</a>
    107 library. If youre using the Android NDK in your app, don't link against cryptographic libraries
    108 that are not a part of the NDK API, such as {@code libcrypto.so} and {@code libssl.so}. These
    109 libraries are not public APIs, and may change or break without notice across releases and devices.
    110 In addition, you may expose yourself to security vulnerabilities. Instead, modify your
    111 native code to call the Java cryptography APIs via JNI or to statically link against a
    112 cryptography library of your choice.</p>
    113 
    114 <h2 id="behavior-hardware-id">Access to Hardware Identifier</h2>
    115 <p>To provide users with greater data protection, starting in this release, Android
    116 removes programmatic access to the devices local hardware identifier for
    117 apps using the Wi-Fi and Bluetooth APIs. The
    118 {@link android.net.wifi.WifiInfo#getMacAddress() WifiInfo.getMacAddress()} and the
    119 {@link android.bluetooth.BluetoothAdapter#getAddress() BluetoothAdapter.getAddress()} methods
    120 now return a constant value of {@code 02:00:00:00:00:00}.</p>
    121 
    122 <p>To access the hardware identifiers of nearby external devices via Bluetooth and Wi-Fi scans,
    123 your app must now have the {@link android.Manifest.permission#ACCESS_FINE_LOCATION} or
    124 {@link android.Manifest.permission#ACCESS_COARSE_LOCATION} permissions:</p>
    125 <ul>
    126 <li>{@link android.net.wifi.WifiManager#getScanResults() WifiManager.getScanResults()}</li>
    127 <li>{@link android.bluetooth.BluetoothDevice#ACTION_FOUND BluetoothDevice.ACTION_FOUND}</li>
    128 <li>{@link android.bluetooth.le.BluetoothLeScanner#startScan(android.bluetooth.le.ScanCallback)
    129 BluetoothLeScanner.startScan()}</li>
    130 </ul>
    131 
    132 <p class="note"><strong>Note</strong>: When a device running Android 6.0 (API level 23) initiates a
    133 background Wi-Fi or Bluetooth scan, the operation is visible to external devices as
    134 originating from a randomized MAC address.</p>
    135 
    136 <h2 id="behavior-notifications">Notifications</h2>
    137 <p>
    138 This release removes the {@code Notification.setLatestEventInfo()} method. Use the
    139 {@link android.app.Notification.Builder} class instead to construct notifications. To update a
    140 notification repeatedly, reuse the {@link android.app.Notification.Builder} instance. Call the
    141 {@link android.app.Notification.Builder#build()} method to get
    142 updated {@link android.app.Notification} instances.
    143 </p>
    144 <p>The {@code adb shell dumpsys notification} command no longer prints out your notification text.
    145 Use the {@code adb shell dumpsys notification --noredact} command instead to print out the text
    146 in a notification object.</p>
    147 
    148 <h2 id="behavior-audiomanager-Changes">AudioManager Changes</h2>
    149 <p>Setting the volume directly or muting specific streams via the {@link android.media.AudioManager}
    150 class is no longer supported. The {@link android.media.AudioManager#setStreamSolo(int,boolean)
    151 setStreamSolo()} method is deprecated, and you should call the
    152 {@link android.media.AudioManager#requestAudioFocus(android.media.AudioManager.OnAudioFocusChangeListener, int, int) requestAudioFocus()}
    153 method instead. Similarly, the
    154 {@link android.media.AudioManager#setStreamMute(int,boolean) setStreamMute()} method is
    155 deprecated; instead, call the {@link android.media.AudioManager#adjustStreamVolume(int, int, int)
    156 adjustStreamVolume()} method and pass in the direction value
    157 {@link android.media.AudioManager#ADJUST_MUTE} or
    158 {@link android.media.AudioManager#ADJUST_UNMUTE}.</p>
    159 
    160 
    161 <h2 id="behavior-text-selection">Text Selection</h2>
    162 
    163 <img src="{@docRoot}images/android-6.0/text-selection.gif"
    164 style="float:right; margin:0 0 20px 30px" width="360" height="640" />
    165 
    166 <p>When users select text in your app, you can now display text selection actions such as
    167 <em>Cut</em>, <em>Copy</em>, and <em>Paste</em> in a
    168 <a href="http://www.google.com/design/spec/patterns/selection.html#selection-text-selection"
    169 class="external-link">floating toolbar</a>. The user interaction implementation is similar to that
    170 for the contextual action bar, as described in
    171 <a href="{@docRoot}guide/topics/ui/menus.html#CABforViews">
    172 Enabling the contextual action mode for individual views</a>.</p>
    173 
    174 <p>To implement a floating toolbar for text selection, make the following changes in your existing
    175 apps:</p>
    176 <ol>
    177 <li>In your {@link android.view.View} or {@link android.app.Activity} object, change your
    178 {@link android.view.ActionMode} calls from
    179 {@code startActionMode(Callback)} to {@code startActionMode(Callback, ActionMode.TYPE_FLOATING)}.</li>
    180 <li>Take your existing implementation of {@code ActionMode.Callback} and make it extend
    181 {@link android.view.ActionMode.Callback2} instead.</li>
    182 <li>Override the
    183 {@link android.view.ActionMode.Callback2#onGetContentRect(android.view.ActionMode, android.view.View, android.graphics.Rect) onGetContentRect()}
    184 method to provide the coordinates of the content {@link android.graphics.Rect} object
    185 (such as a text selection rectangle) in the view.</li>
    186 <li>If the rectangle positioning is no longer valid, and this is the only element to be invalidated,
    187 call the {@link android.view.ActionMode#invalidateContentRect() invalidateContentRect()} method.</li>
    188 </ol>
    189 
    190 <p>If you are using <a href="{@docRoot}tools/support-library/index.html">
    191 Android Support Library</a> revision 22.2, be aware that floating toolbars are not
    192 backward-compatible and appcompat takes control over {@link android.view.ActionMode} objects by
    193 default. This prevents floating toolbars from being displayed. To enable
    194 {@link android.view.ActionMode} support in an
    195 {@link android.support.v7.app.AppCompatActivity}, call
    196 {@link android.support.v7.app.AppCompatActivity#getDelegate()}, then call
    197 {@link android.support.v7.app.AppCompatDelegate#setHandleNativeActionModesEnabled(boolean)
    198 setHandleNativeActionModesEnabled()} on the returned
    199 {@link android.support.v7.app.AppCompatDelegate} object and set the input
    200 parameter to {@code false}. This call returns control of {@link android.view.ActionMode} objects to
    201 the framework. In devices running Android 6.0 (API level 23), that allows the framework to support
    202 {@link android.support.v7.app.ActionBar} or floating toolbar modes, while on devices running
    203 Android 5.1 (API level 22) or lower, only the {@link android.support.v7.app.ActionBar} modes are
    204 supported.</p>
    205 
    206 <h2 id="behavior-bookmark-browser">Browser Bookmark Changes</h2>
    207 <p>This release removes support for global bookmarks. The
    208 {@code android.provider.Browser.getAllBookmarks()} and {@code android.provider.Browser.saveBookmark()}
    209 methods are now removed. Likewise, the {@code READ_HISTORY_BOOKMARKS} and {@code WRITE_HISTORY_BOOKMARKS}
    210 permissions are removed. If your app targets Android 6.0 (API level 23) or higher, don't access
    211 bookmarks from the global provider or use the bookmark permissions. Instead, your app should store
    212 bookmarks data internally.</p>
    213 
    214 <h2 id="behavior-keystore">Android Keystore Changes</h2>
    215 <p>With this release, the
    216 <a href="{@docRoot}training/articles/keystore.html">Android Keystore provider</a> no longer supports
    217 DSA. ECDSA is still supported.</p>
    218 
    219 <p>Keys which do not require encryption at rest will no longer be deleted when secure lock screen
    220 is disabled or reset (for example, by the user or a Device Administrator). Keys which require
    221 encryption at rest will be deleted during these events.</p>
    222 
    223 <h2 id="behavior-network">Wi-Fi and Networking Changes</h2>
    224 
    225 <p>This release introduces the following behavior changes to the Wi-Fi and networking APIs.</p>
    226 <ul>
    227 <li>Your apps can now change the state of {@link android.net.wifi.WifiConfiguration} objects only
    228 if you created these objects. You are not permitted to modify or delete
    229 {@link android.net.wifi.WifiConfiguration} objects created by the user or by other apps.
    230 </li>
    231 <li>
    232 Previously, if an app forced the device to connect to a specific Wi-Fi network by using
    233 {@link android.net.wifi.WifiManager#enableNetwork(int,boolean) enableNetwork()} with the
    234 {@code disableAllOthers=true} setting, the device disconnected from other networks such as
    235 cellular data. In This release, the device no longer disconnects from such other networks. If
    236 your apps {@code targetSdkVersion} is {@code 20} or lower, it is pinned to the selected
    237 Wi-Fi network. If your apps {@code targetSdkVersion} is {@code 21} or higher, use the
    238 multinetwork APIs (such as
    239 {@link android.net.Network#openConnection(java.net.URL) openConnection()},
    240 {@link android.net.Network#bindSocket(java.net.Socket) bindSocket()}, and the new
    241 {@link android.net.ConnectivityManager#bindProcessToNetwork(android.net.Network)
    242 bindProcessToNetwork()} method) to ensure that its network traffic is sent on the selected network.</li>
    243 </ul>
    244 
    245 <h2 id="behavior-camera">Camera Service Changes</h2>
    246 <p>In This release, the model for accessing shared resources in the camera service has been changed
    247 from the previous first come, first serve access model to an access model where high-priority
    248 processes are favored.  Changes to the service behavior include:</p>
    249 <ul>
    250 <li>Access to camera subsystem resources, including opening and configuring a camera device, is
    251 awarded based on the priority of the client application process. Application processes with
    252 user-visible or foreground activities are generally given a higher-priority, making camera resource
    253 acquisition and use more dependable.</li>
    254 <li>Active camera clients for lower priority apps may be evicted when a higher priority
    255 application attempts to use the camera.  In the deprecated {@link android.hardware.Camera} API,
    256 this results in
    257 {@link android.hardware.Camera.ErrorCallback#onError(int,android.hardware.Camera) onError()} being
    258 called for the evicted client. In the {@link android.hardware.camera2 Camera2} API, it results in
    259 {@link android.hardware.camera2.CameraDevice.StateCallback#onDisconnected(android.hardware.camera2.CameraDevice) onDisconnected()}
    260 being called for the evicted client.</li>
    261 <li>On devices with appropriate camera hardware, separate application processes are able to
    262 independently open and use separate camera devices simultaneously. However, multi-process use
    263 cases, where simultaneous access causes significant degradation of performance or capabilities of
    264 any of the open camera devices, are now detected and disallowed by the camera service. This change
    265 may result in evictions for lower priority clients even when no other app is directly
    266 attempting to access the same camera device.
    267 </li>
    268 <li>
    269 Changing the current user causes active camera clients in apps owned by the previous user account
    270 to be evicted.  Access to the camera is limited to user profiles owned by the current device user.
    271 In practice, this means that a Guest account, for example, will not be able to leave running
    272 processes that use the camera subsystem when the user has switched to a different account.
    273 </li>
    274 </ul>
    275 
    276 <h2 id="behavior-runtime">Runtime</h2>
    277 <p>The ART runtime now properly implements access rules for the
    278 {@link java.lang.reflect.Constructor#newInstance(java.lang.Object...) newInstance()} method. This
    279 change fixes a problem where Dalvik was checking access rules incorrectly in previous versions.
    280 If your app uses the
    281 {@link java.lang.reflect.Constructor#newInstance(java.lang.Object...) newInstance()} method and you
    282 want to override access checks, call the
    283 {@link java.lang.reflect.Constructor#setAccessible(boolean) setAccessible()} method with the input
    284 parameter set to {@code true}. If your app uses the
    285 <a href="{@docRoot}tools/support-library/features.html#v7-appcompat">v7 appcompat library</a> or the
    286 <a href="{@docRoot}tools/support-library/features.html#v7-recyclerview">v7 recyclerview library</a>,
    287 you must update your app to use to the latest versions of these libraries. Otherwise, make sure that
    288 any custom classes referenced from XML are updated so that their class constructors are accessible.</p>
    289 
    290 <p>This release updates the behavior of the dynamic linker. The dynamic linker now understands the
    291 difference between a librarys {@code soname} and its path
    292 (<a href="https://code.google.com/p/android/issues/detail?id=6670" class="external-link">
    293 public bug 6670</a>), and search by {@code soname} is now
    294 implemented. Apps which previously worked that have bad {@code DT_NEEDED} entries
    295 (usually absolute paths on the build machines file system) may fail when loaded.</p>
    296 
    297 <p>The {@code dlopen(3) RTLD_LOCAL} flag is now correctly implemented. Note that
    298 {@code RTLD_LOCAL} is the default, so calls to {@code dlopen(3)} that didnt explicitly use
    299 {@code RTLD_LOCAL} will be affected (unless your app explicitly used {@code RTLD_GLOBAL}). With
    300 {@code RTLD_LOCAL}, symbols will not be made available to libraries loaded by later calls to
    301 {@code dlopen(3)} (as opposed to being referenced by {@code DT_NEEDED} entries).</p>
    302 </p>
    303 
    304 <p>
    305 On previous versions of Android, if your app requested the system to load a shared library with
    306 text relocations, the system displayed a warning but still allowed the library to be loaded.
    307 Beginning in this release, the system rejects this library if your app's target SDK version is 23
    308 or higher. To help you detect if a library failed to load, your app should log the
    309 {@code dlopen(3)} failure, and include the problem description text that the {@code dlerror(3)}
    310 call returns. To learn more about handling text relocations, see this
    311 <a href="https://wiki.gentoo.org/wiki/Hardened/Textrels_Guide" class="external-link">guide</a>.</p>
    312 
    313 <h2 id="behavior-apk-validation">APK Validation</h2>
    314 <p>The platform now performs stricter validation of APKs. An APK is considered corrupt if a file is
    315 declared in the manifest but not present in the APK itself. An APK must be re-signed if any of the
    316 contents are removed.</p>
    317 
    318 <h2 id="behavior-usb">USB Connection</h2>
    319 <p>Device connections through the USB port are now set to charge-only mode by default. To access
    320 the device and its content over a USB connection, users must explicitly grant permission for such
    321 interactions. If your app supports user interactions with the device over a USB port, take into
    322 consideration that the interaction must be explicitly enabled.
    323 </p>
    324 
    325 <h2 id="behavior-afw">Android for Work Changes</h2>
    326 <p>This release includes the following behavior changes for Android for Work:</p>
    327 <ul>
    328   <li><strong>Work contacts in personal contexts.</strong> The Google Dialer
    329 Call Log now displays work contacts when the user views past calls.
    330 Setting
    331 {@link android.app.admin.DevicePolicyManager#setCrossProfileCallerIdDisabled(android.content.ComponentName, boolean) setCrossProfileCallerIdDisabled()}
    332 to {@code true} hides the work profile contacts in the Google Dialer Call Log. Work contacts can be
    333 displayed along with personal contacts to devices over Bluetooth only if
    334 you set {@link android.app.admin.DevicePolicyManager#setBluetoothContactSharingDisabled(android.content.ComponentName, boolean)
    335 setBluetoothContactSharingDisabled()} to {@code false}. By default, it is set to {@code true}.
    336   </li>
    337   <li><strong>Wi-Fi configuration removal:</strong> Wi-Fi configurations added by a Profile Owner
    338 (for example, through calls to the
    339 {@link android.net.wifi.WifiManager#addNetwork(android.net.wifi.WifiConfiguration)
    340 addNetwork()} method) are now removed if that work profile is deleted.
    341   </li>
    342   <li><strong>Wi-Fi configuration lockdown:</strong> Any Wi-Fi configuration created by
    343   an active Device Owner can no longer be modified or deleted by the user if
    344   {@link android.provider.Settings.Global#WIFI_DEVICE_OWNER_CONFIGS_LOCKDOWN} is non-zero.
    345   The user can still create and modify their own Wi-Fi configurations. Active Device
    346   Owners have the privilege of editing or removing any Wi-Fi configurations, including
    347   those not created by them.
    348   </li>
    349 <li><strong>Download device policy controller via Google account addition:</strong> When a Google
    350 account that requires management via a device policy controller (DPC) app is added to a device
    351 outside of a managed context, the add account flow now prompts the user to install the
    352 appropriate WPC. This behavior also applies to accounts added via
    353 <strong>Settings > Accounts</strong> and in the initial device setup wizard.</li>
    354 <li><strong>Changes to specific {@link android.app.admin.DevicePolicyManager} API behaviors:</strong>
    355   <ul>
    356   <li>Calling the
    357 {@link android.app.admin.DevicePolicyManager#setCameraDisabled(android.content.ComponentName,boolean) setCameraDisabled()}
    358 method affects the camera for the calling user only; calling it from the managed profile doesnt
    359 affect camera apps running on the primary user.</li>
    360   <li>In addition, the
    361 {@link android.app.admin.DevicePolicyManager#setKeyguardDisabledFeatures(android.content.ComponentName,int) setKeyguardDisabledFeatures()}
    362     method is now available for Profile Owners, as well as to Device Owners. </li>
    363   <li>A Profile Owner can set these keyguard restrictions:
    364     <ul>
    365     <li>{@link android.app.admin.DevicePolicyManager#KEYGUARD_DISABLE_TRUST_AGENTS} and
    366     {@link android.app.admin.DevicePolicyManager#KEYGUARD_DISABLE_FINGERPRINT}, which affect the
    367     keyguard settings for the profiles parent user.</li>
    368     <li>{@link android.app.admin.DevicePolicyManager#KEYGUARD_DISABLE_UNREDACTED_NOTIFICATIONS}, which
    369     only affects notifications generated by applications in the managed profile.</li>
    370     </ul>
    371   </li>
    372   <li>The {@code DevicePolicyManager.createAndInitializeUser()} and {@code DevicePolicyManager.createUser()} methods have been deprecated.</li>
    373   <li>The {@link android.app.admin.DevicePolicyManager#setScreenCaptureDisabled(android.content.ComponentName, boolean) setScreenCaptureDisabled()}
    374 method now also blocks the assist structure when an app of the given user is in the foreground. </li>
    375   <li>{@link android.app.admin.DevicePolicyManager#EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_CHECKSUM}
    376 now defaults to SHA-256. SHA-1 is still supported for backwards compatibility but will be removed
    377 in future.
    378 {@link android.app.admin.DevicePolicyManager#EXTRA_PROVISIONING_DEVICE_ADMIN_SIGNATURE_CHECKSUM}
    379 now only accepts SHA-256.</li>
    380   <li>Device initializer APIs which existed in the Android 6.0 (API level 23) are now removed.</li>
    381     <li><code>EXTRA_PROVISIONING_RESET_PROTECTION_PARAMETERS</code> is removed so NFC bump
    382 provisioning cannot programmatically unlock a factory reset protected device.</li>
    383 <li>You can now use the {@link android.app.admin.DevicePolicyManager#EXTRA_PROVISIONING_ADMIN_EXTRAS_BUNDLE}
    384 extra to pass data to the device owner app during NFC provisioning of the managed device.</li>
    385     <li>Android for Work APIs are optimized for M runtime permissions, including Work profiles,
    386 assist layer, and others. New {@link android.app.admin.DevicePolicyManager} permission APIs don't
    387 affect pre-M apps.</li>
    388 <li>When users back out of the synchronous part of the setup flow initiated through an
    389 {@link android.app.admin.DevicePolicyManager#ACTION_PROVISION_MANAGED_PROFILE} or
    390 {@link android.app.admin.DevicePolicyManager#ACTION_PROVISION_MANAGED_DEVICE} intent, the system
    391 now returns a {@link android.app.Activity#RESULT_CANCELED} result code.</li>
    392     </ul></li>
    393 
    394 <li><strong>Changes to other APIs</strong>:
    395 <ul>
    396     <li>Data Usage: The {@code android.app.usage.NetworkUsageStats} class has been renamed
    397 {@link android.app.usage.NetworkStats}.</li>
    398 </ul>
    399     </li>
    400 
    401     <li><strong>Changes to global settings</strong>:
    402     <ul>
    403     <li>These settings can no longer be set via {@link android.app.admin.DevicePolicyManager#setGlobalSetting(android.content.ComponentName, java.lang.String, java.lang.String) setGlobalSettings()}</code>:
    404 <ul>
    405     <li><code>BLUETOOTH_ON</code></li>
    406     <li><code>DEVELOPMENT_SETTINGS_ENABLED</code></li>
    407     <li><code>MODE_RINGER</code></li>
    408     <li><code>NETWORK_PREFERENCE</code></li>
    409     <li><code>WIFI_ON</code></li>
    410 </ul>
    411     </li>
    412     <li>These global settings can now be set via {@link android.app.admin.DevicePolicyManager#setGlobalSetting(android.content.ComponentName, java.lang.String, java.lang.String) setGlobalSettings()}:
    413     <ul>
    414     <li>{@link android.provider.Settings.Global#WIFI_DEVICE_OWNER_CONFIGS_LOCKDOWN}</li>
    415     </ul>
    416     </li>
    417     </ul>
    418 </ul>
    419