blob: 5ddac7a8eca16279e37c5a9b187cf58b1c2838b4 [file] [log] [blame]
Quddus Chong5f150d52015-05-10 16:07:27 -07001page.title=Behavior Changes
2page.keywords=preview,sdk,compatibility
Dirk Dougherty518651c2015-05-27 20:24:37 -07003sdk.platform.apiLevel=MNC
Quddus Chong5f150d52015-05-10 16:07:27 -07004@jd:body
5
6<div id="qv-wrapper">
7<div id="qv">
8
9<h2>In this document</h2>
10
11<ol id="toc44" class="hide-nested">
12 <li><a href="#behavior-runtime-permissions">Runtime Permissions</a></li>
Quddus Chong79d03e92015-05-26 17:58:51 -070013 <li><a href="#behavior-power">Power-Saving Optimizations</a>
Quddus Chong5f150d52015-05-10 16:07:27 -070014 <ol>
Quddus Chong79d03e92015-05-26 17:58:51 -070015 <li><a href="#behavior-doze">Doze</a></li>
Quddus Chong5f150d52015-05-10 16:07:27 -070016 <li><a href="#behavior-app-standby">App Standby</a></li>
17 </ol>
18 </li>
19 <li><a href="#behavior-adoptable-storage">Adoptable Storage Devices</a></li>
20 <li><a href="#behavior-apache-http-client">Apache HTTP Client Removal</a></li>
21 <li><a href="#behavior-audiomanager-Changes">AudioManager Changes</a></li>
22 <li><a href="#behavior-test-selection">Text Selection</a></li>
23 <li><a href="#behavior-keystore">Android Keystore Changes</a></li>
Quddus Chong5f150d52015-05-10 16:07:27 -070024 <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-art-runtime">ART Runtime</a></li>
27 <li><a href="#behavior-apk-validation">APK Validation</a></li>
28 <li><a href="#behavior-afw">Android for Work Changes</a></li>
29</ol>
30
31<h2>API Differences</h2>
32<ol>
33<li><a href="{@docRoot}preview/download.html">API level 22 to M Preview &raquo;</a> </li>
34</ol>
35
36
37<h2>See Also</h2>
38<ol>
39<li><a href="{@docRoot}preview/api-overview.html">M Developer Preview API Overview</a> </li>
40</ol>
41
42</div>
43</div>
44
Quddus Chong5f150d52015-05-10 16:07:27 -070045<p>Along with new features and capabilities, the M Developer Preview includes a variety of
46system changes and API behavior changes. This document highlights
David Friedman1ead0fe2015-05-28 00:59:02 -070047some of the key changes that you should understand and account for in your apps.</p>
Quddus Chong5f150d52015-05-10 16:07:27 -070048
49<p>If you have previously published an app for Android, be aware that your app
50 might be affected by these changes in the platform.</p>
51
52<h2 id="behavior-runtime-permissions">Runtime Permissions</h1>
Dirk Dougherty8c110252015-05-29 16:45:15 -070053<p>This preview introduces a new permissions model, where users can now directly manage
54app permissions at runtime. This model gives users improved visibility and control over
Quddus Chong5f150d52015-05-10 16:07:27 -070055permissions, while streamlining the installation and auto-update processes for app developers.
Dirk Dougherty8c110252015-05-29 16:45:15 -070056Users can grant or revoke permissions individually for installed apps. </p>
Quddus Chong5f150d52015-05-10 16:07:27 -070057
58<p>On your apps that target the M Preview, make sure to check and request for permissions at
59runtime. To determine if your app has been granted a permission, call the
60new {@code Context.checkSelfPermission()} method. To request for a permission, call the new
Dirk Dougherty8c110252015-05-29 16:45:15 -070061{@code Activity.requestPermission()} method. Even if your app is not targeting M, you
62should test your app under the new permissions model.</p>
Quddus Chong5f150d52015-05-10 16:07:27 -070063
Dirk Dougherty8c110252015-05-29 16:45:15 -070064<p>For details on supporting the new permissions model in your app, see the
Quddus Chong5f150d52015-05-10 16:07:27 -070065<a href="{@docRoot}preview/features/runtime-permissions.html">
Dirk Dougherty8c110252015-05-29 16:45:15 -070066Permissions</a> developer preview page. For tips on how to assess the impact on your app,
67see the <a href="{@docRoot}preview/testing/guide.html#runtime-permissions">Testing Guide</a></p>
Quddus Chong5f150d52015-05-10 16:07:27 -070068
Quddus Chong79d03e92015-05-26 17:58:51 -070069<h2 id="behavior-power">Power-Saving Optimizations</h2>
Quddus Chong5f150d52015-05-10 16:07:27 -070070<p>This preview introduces new power-saving optimizations for idle devices and apps.</p>
71
Quddus Chong79d03e92015-05-26 17:58:51 -070072<h3 id="behavior-doze">Doze</h3>
Quddus Chong5f150d52015-05-10 16:07:27 -070073<p>If a device is unplugged and left stationary with the screen off for a period of time, it
74goes into <em>Doze</em> mode where it attempts to keep the system in a sleep state. In this mode,
75devices periodically resume normal operations for brief periods of time so that app syncing can
76occur and the system can perform any pending operations.</p>
77
Quddus Chong79d03e92015-05-26 17:58:51 -070078<p>The following restrictions apply to your apps while in Doze:</p>
Quddus Chong5f150d52015-05-10 16:07:27 -070079<ul>
80<li>Network access is disabled, unless your app receives a high priority Google Cloud Messaging
81tickle.</li>
82<li><a href="{@docRoot}reference/android/os/PowerManager.WakeLock.html">Wake locks</a> are ignored.</li>
83<li>Alarms scheduled with the {@link android.app.AlarmManager} class are disabled, except for
84alarms that you've set with the {@link android.app.AlarmManager#setAlarmClock setAlarmClock()}
85method and {@code AlarmManager.setAndAllowWhileIdle()}.</li>
86<li>WiFi scans are not performed.</li>
87<li>Syncs and jobs for your sync adapters and {@link android.app.job.JobScheduler} are not
88permitted to run.</li>
89</ul>
90</p>
Quddus Chong79d03e92015-05-26 17:58:51 -070091<p>When the device exits doze, it executes any jobs and syncs that are pending.</p>
Quddus Chong5f150d52015-05-10 16:07:27 -070092<p>You can test this feature by connecting a device running the M Preview to your development
93machine and calling the following commands:
94</p>
95<pre class="no-prettyprint">
96$ adb shell dumpsys battery unplug
97$ adb shell dumpsys deviceidle step
98$ adb shell dumpsys deviceidle -h
99</pre>
Quddus Chong79d03e92015-05-26 17:58:51 -0700100<p class="note"><strong>Note</strong>: The upcoming
101<a href="https://developers.google.com/cloud-messaging/" class="external-link">
102Google Cloud Messaging</a> release lets you designate
Quddus Chong5f150d52015-05-10 16:07:27 -0700103high-priority messages. If your app receives high-priority GCM messages, it’s granted
Quddus Chong79d03e92015-05-26 17:58:51 -0700104brief network access even when the device is in doze.
Quddus Chong5f150d52015-05-10 16:07:27 -0700105</p>
106
Dirk Dougherty8c110252015-05-29 16:45:15 -0700107<p>See the
108<a href="{@docRoot}preview/testing/guide.html#doze-standby">Testing Guide</a> for tips on how
109to test Doze in your apps. </p>
110
Quddus Chong5f150d52015-05-10 16:07:27 -0700111<h3 id="behavior-app-standby">App standby</h3>
112<p>With this preview, the system may determine that apps are idle when they are not in active
113use. Your app is considered idle after a period of time, unless the system detects
114any of these signals:</p>
115
116<ul>
Quddus Chong79d03e92015-05-26 17:58:51 -0700117<li>The app is explicitly launched by the user.</li>
Quddus Chong5f150d52015-05-10 16:07:27 -0700118<li>The app has a process currently in the foreground (either as an activity or foreground service,
119or in use by another activity or foreground service).</li>
120<li>The app generates a notification that users see on the lock screen or in the
121notification tray.</li>
122<li>The user explicitly asks for the app to be exempt from optimizations,
123via <strong>Settings</strong>.</li>
124</ul>
125
126<p>If the device is unplugged, apps deemed idle will have their network access disabled
127and their syncs and jobs suspended. When the device is plugged into a power supply, these apps are
128allowed network access and can execute any jobs and syncs that are pending. If the
129device is idle for long periods of time, idle apps are allowed network access around once a day.</p>
130
131<p>You can test this feature by connecting a device running the M Preview to your development
132machine and calling the following commands:
133</p>
134<pre class="no-prettyprint">
Quddus Chong79d03e92015-05-26 17:58:51 -0700135$ adb shell dumpsys battery unplug
Quddus Chong5f150d52015-05-10 16:07:27 -0700136$ adb shell am set-idle &lt;packageName&gt; true
137$ adb shell am set-idle &lt;packageName&gt; false
138$ adb shell am get-idle &lt;packageName&gt;
139</pre>
140
141<p class="note"><strong>Note</strong>: The upcoming
Quddus Chong79d03e92015-05-26 17:58:51 -0700142<a href="https://developers.google.com/cloud-messaging/" class="external-link">
143Google Cloud Messaging</a> (GCM) release lets you
Quddus Chong5f150d52015-05-10 16:07:27 -0700144designate high-priority messages. If your app receives high-priority GCM messages, it’s granted
145brief network access even when the app is idle.
146</p>
147
Dirk Dougherty8c110252015-05-29 16:45:15 -0700148<p>See the
149<a href="{@docRoot}preview/testing/guide.html#doze-standby">Testing Guide</a> for tips on how
150to test App Standby in your apps. </p>
151
Quddus Chong5f150d52015-05-10 16:07:27 -0700152<h2 id="behavior-adoptable-storage">Adoptable Storage Devices</h2>
153<p>
154With this preview, users can <em>adopt</em> external storage devices such as SD cards. Adopting an
155external storage device encrypts and formats the device to behave like internal storage. This
156feature allows users to move both apps and private data of those apps between storage devices. When
157moving apps, the system respects the
158<a href="{@docRoot}guide/topics/manifest/manifest-element.html#install">{@code android:installLocation}</a>
159preference in the manifest.</p>
160
161<p>If your app accesses the following APIs or fields, be aware that the file paths they return
162will dynamically change when the app is moved between internal and external storage devices.
163When building file paths, it is strongly recommended that you always call these APIs dynamically.
164Don’t use hardcoded file paths or persist fully-qualified file paths that were built previously.</p>
165
166<ul>
167<li>{@link android.content.Context} methods:
168 <ul>
169 <li>{@link android.content.Context#getFilesDir() getFilesDir()}</li>
170 <li>{@link android.content.Context#getCacheDir() getCacheDir()}</li>
171 <li>{@link android.content.Context#getCodeCacheDir() getCodeCacheDir()}</li>
172 <li>{@link android.content.Context#getDatabasePath(java.lang.String) getDatabasePath()}</li>
173 <li>{@link android.content.Context#getDir(java.lang.String,int) getDir()}</li>
174 <li>{@link android.content.Context#getNoBackupFilesDir() getNoBackupFilesDir()}</li>
175 <li>{@link android.content.Context#getFileStreamPath(java.lang.String) getFileStreamPath()}</li>
176 <li>{@link android.content.Context#getPackageCodePath() getPackageCodePath()}</li>
177 <li>{@link android.content.Context#getPackageResourcePath() getPackageResourcePath()}</li>
178 </ul>
179</li>
180<li>{@link android.content.pm.ApplicationInfo} fields:
181 <ul>
182 <li>{@link android.content.pm.ApplicationInfo#dataDir dataDir}</li>
183 <li>{@link android.content.pm.ApplicationInfo#sourceDir sourceDir}</li>
184 <li>{@link android.content.pm.ApplicationInfo#nativeLibraryDir nativeLibraryDir}</li>
185 <li>{@link android.content.pm.ApplicationInfo#publicSourceDir publicSourceDir}</li>
186 <li>{@link android.content.pm.ApplicationInfo#splitSourceDirs splitSourceDirs}</li>
187 <li>{@link android.content.pm.ApplicationInfo#splitPublicSourceDirs splitPublicSourceDirs}</li>
188 </ul>
189</li>
190</ul>
191
192<p>To debug this feature in the developer preview, you can enable adoption of a USB drive that is
193connected to an Android device through a USB On-The-Go (OTG) cable, by running this command:</p>
194
195<pre class="no-prettyprint">
196$ adb shell sm set-force-adoptable true
197</pre>
198
199<h2 id="behavior-apache-http-client">Apache HTTP Client Removal</h2>
200<p>This preview removes support for the Apache HTTP client. If your app is using this client and
201targets Android 2.3 (API level 9) or higher, use the {@link java.net.HttpURLConnection} class
202instead. This API is more efficient because it reduces network use through transparent compression
203and response caching, and minimizes power consumption. To continue using the Apache HTTP APIs, you
204must first declare the following compile-time dependency in your {@code build.gradle} file:
205</p>
206<pre>
207android {
208 useLibrary 'org.apache.http.legacy'
209}
210</pre>
211<p>Android is moving away from OpenSSL to the
212<a href="https://boringssl.googlesource.com/boringssl/" class="external-link">BoringSSL</a>
213library. If you’re using the Android NDK in your app, don't link against cryptographic libraries
214that are not a part of the NDK API, such as {@code libcrypto.so} and {@code libssl.so}. These
215libraries are not public APIs, and may change or break without notice across releases and devices.
216In addition, you may expose yourself to security vulnerabilities. Instead, modify your
217native code to call the Java cryptography APIs via JNI or to statically link against a
218cryptography library of your choice.</p>
219
220<h2 id="behavior-audiomanager-Changes">AudioManager Changes</h2>
221<p>Setting the volume directly or muting specific streams via the {@link android.media.AudioManager}
222class is no longer supported. The {@link android.media.AudioManager#setStreamSolo(int,boolean)
223setStreamSolo()} method is deprecated, and you should call the
224{@code AudioManager.requestAudioFocus()} method instead. Similarly, the
225{@link android.media.AudioManager#setStreamMute(int,boolean) setStreamMute()} method is
226deprecated; instead, call the {@code AudioManager.adjustStreamVolume()} method
227and pass in the direction value {@code ADJUST_MUTE} or {@code ADJUST_UNMUTE}.</p>
228
229<h2 id="behavior-test-selection">Text Selection</h2>
230
231<img src="{@docRoot}preview/images/text-selection.gif"
232style="float:right; margin:0 0 20px 30px" width="360" height="640" />
233
234<p>When users select text in your app, you can now display text selection actions such as
235<em>Cut</em>, <em>Copy</em>, and <em>Paste</em> in a
236<a href="http://www.google.com/design/spec/patterns/selection.html#selection-text-selection"
237class="external-link">floating toolbar</a>. The user interaction implementation is similar to that
238for the contextual action bar, as described in
239<a href="{@docRoot}guide/topics/ui/menus.html#CABforViews">
240Enabling the contextual action mode for individual views</a>.</p>
241
242<p>To implement a floating toolbar for text selection, make the following changes in your existing
243apps:</p>
244<ol>
245<li>In your {@link android.view.View} or {@link android.app.Activity} object, change your
246{@link android.view.ActionMode} calls from
247{@code startActionMode(Callback)} to {@code startActionMode(Callback, ActionMode.TYPE_FLOATING)}.</li>
248<li>Take your existing implementation of {@code ActionMode.Callback} and make it extend
249{@code ActionMode.Callback2} instead.</li>
250<li>Override the {@code Callback2.onGetContentRect()} method to provide the coordinates of the
251content {@link android.graphics.Rect} object (such as a text selection rectangle) in the view.</li>
252<li>If the rectangle positioning is no longer valid, and this is the only element to be invalidated,
253call the {@code ActionMode.invalidateContentRect()} method.</li>
254</ol>
255
256<p>If you are using <a href="{@docRoot}tools/support-library/index.html">
257Android Support Library</a> revision 22.2, be aware that floating toolbars are not
258backward-compatible and appcompat takes control over {@link android.view.ActionMode} objects by
259default. This prevents floating toolbars from being displayed. To enable
260{@link android.view.ActionMode} support in an
261{@link android.support.v7.app.AppCompatActivity}, call
262{@code android.support.v7.app.AppCompatActivity.getDelegate()}, then call
263{@code android.support.v7.app.AppCompatDelegate.setHandleNativeActionModesEnabled()} on the returned
264{@link android.support.v7.app.AppCompatDelegate} object and set the input
265parameter to {@code false}. This call returns control of {@link android.view.ActionMode} objects to
266the framework. In devices running the M Preview, that allows the framework to support
267{@link android.support.v7.app.ActionBar} or floating toolbar modes, while on pre-M Preview devices,
268only the {@link android.support.v7.app.ActionBar} modes are supported.</p>
269
270<h2 id="behavior-keystore">Android Keystore Changes</h2>
271<p>With this preview, the
272<a href="{@docRoot}training/articles/keystore.html">Android Keystore provider</a> no longer supports
273DSA. ECDSA is still supported.</p>
274
275<p>Keys which do not require encryption at rest will no longer be deleted when secure lock screen
276is disabled or reset (for example, by the user or a Device Administrator). Keys which require
277encryption at rest will be deleted during these events.</p>
278
Quddus Chong5f150d52015-05-10 16:07:27 -0700279<h2 id="behavior-network">Wi-Fi and Networking Changes</h2>
280
281<p>This preview introduces the following behavior changes to the Wi-Fi and networking APIs.</p>
282<ul>
283<li>Your apps can now change the state of {@link android.net.wifi.WifiConfiguration} objects only
284if you created these objects. You are not permitted to modify or delete
285{@link android.net.wifi.WifiConfiguration} objects created by the user or by other apps.
286</li>
287<li>
288Previously, if an app forced the device to connect to a specific Wi-Fi network by using
289{@link android.net.wifi.WifiManager#enableNetwork(int,boolean) enableNetwork()} with the
290{@code disableAllOthers=true} setting, the device disconnected from other networks such as
291cellular data. In this preview, the device no longer disconnects from such other networks. If
292your app’s {@code targetSdkVersion} is {@code “20”} or lower, it is pinned to the selected
293Wi-Fi network. If your app’s {@code targetSdkVersion} is {@code “21”} or higher, use the
294multinetwork APIs (such as
295{@link android.net.Network#openConnection(java.net.URL) openConnection()},
296{@link android.net.Network#bindSocket(java.net.Socket) bindSocket()}, and the new
297{@code ConnectivityManager.bindProcessToNetwork()} method) to ensure that its network traffic is
298sent on the selected network.</li>
299</ul>
300
301<h2 id="behavior-camera">Camera Service Changes</h2>
302<p>In this preview, the model for accessing shared resources in the camera service has been changed
303from the previous “first come, first serve” access model to an access model where high-priority
304processes are favored. Changes to the service behavior include:</p>
305<ul>
306<li>Access to camera subsystem resources, including opening and configuring a camera device, is
307awarded based on the “priority” of the client application process. Application processes with
308user-visible or foreground activities are generally given a higher-priority, making camera resource
309acquisition and use more dependable.</li>
310<li>Active camera clients for lower priority apps may be “evicted” when a higher priority
311application attempts to use the camera. In the deprecated {@link android.hardware.Camera} API,
312this results in
313{@link android.hardware.Camera.ErrorCallback#onError(int,android.hardware.Camera) onError()} being
314called for the evicted client. In the {@link android.hardware.camera2 Camera2} API, it results in
315{@link android.hardware.camera2.CameraDevice.StateCallback#onDisconnected(android.hardware.camera2.CameraDevice) onDisconnected()}
316being called for the evicted client.</li>
317<li>On devices with appropriate camera hardware, separate application processes are able to
318independently open and use separate camera devices simultaneously. However, multi-process use
319cases, where simultaneous access causes significant degradation of performance or capabilities of
320any of the open camera devices, are now detected and disallowed by the camera service. This change
321may result in “evictions” for lower priority clients even when no other app is directly
322attempting to access the same camera device.
323</li>
324<li>
325Changing the current user causes active camera clients in apps owned by the previous user account
326to be evicted. Access to the camera is limited to user profiles owned by the current device user.
327In practice, this means that a “Guest” account, for example, will not be able to leave running
328processes that use the camera subsystem when the user has switched to a different account.
329</li>
330</ul>
331
332<h2 id="behavior-art-runtime">ART Runtime</h2>
333<p>The ART runtime now properly implements access rules for the
334{@link java.lang.reflect.Constructor#newInstance(java.lang.Object...) newInstance()} method. This
335change fixes a problem where Dalvik was checking access rules incorrectly in previous versions.
336If your app uses the
337{@link java.lang.reflect.Constructor#newInstance(java.lang.Object...) newInstance()} method and you
338want to override access checks, call the
339{@link java.lang.reflect.Constructor#setAccessible(boolean) setAccessible()} method with the input
340parameter set to {@code true}. If your app uses the
341<a href="{@docRoot}tools/support-library/features.html#v7-appcompat">v7 appcompat library</a> or the
342<a href="{@docRoot}tools/support-library/features.html#v7-recyclerview">v7 recyclerview library</a>,
343you must update your app to use to the latest versions of these libraries. Otherwise, make sure that
344any custom classes referenced from XML are updated so that their class constructors are accessible.</p>
345
346<p>This preview updates the behavior of the dynamic linker. The dynamic linker now understands the
347difference between a library’s {@code soname} and its path
348(<a href="https://code.google.com/p/android/issues/detail?id=6670" class="external-link">
349public bug 6670</a>), and search by {@code soname} is now
350implemented. Apps which previously worked that have bad {@code DT_NEEDED} entries
351(usually absolute paths on the build machine’s file system) may fail when loaded.</p>
352
353<p>The {@code dlopen(3) RTLD_LOCAL} flag is now correctly implemented. Note that
354{@code RTLD_LOCAL} is the default, so calls to {@code dlopen(3)} that didn’t explicitly use
355{@code RTLD_LOCAL} will be affected (unless your app explicitly used {@code RTLD_GLOBAL}). With
356{@code RTLD_LOCAL}, symbols will not be made available to libraries loaded by later calls to
357{@code dlopen(3)} (as opposed to being referenced by {@code DT_NEEDED} entries).</p>
358</p>
359
360<h2 id="behavior-apk-validation">APK Validation</h2>
361<p>The platform now performs stricter validation of APKs. An APK is considered corrupt if a file is
362declared in the manifest but not present in the APK itself. An APK must be re-signed if any of the
363contents are removed.</p>
364
365<h2 id="behavior-afw">Android for Work Changes</h2>
366<p>This preview includes the following behavior changes for Android for Work:</p>
367<ul>
368<li><strong>Work contacts in personal contexts.</strong> The Google Dialer
Quddus Chong79d03e92015-05-26 17:58:51 -0700369Call Log now displays work contacts when the user views past calls.
370Setting {@code DevicePolicyManager.setCrossProfileCallerIdDisabled()} to {@code true} hides the
371work profile contacts in the Google Dialer Call Log. Work contacts can be displayed along with
372personal contacts to devices over Bluetooth only if
373you set {@code DevicePolicyManager.setBluetoothContactSharingDisabled()} to {@code false}. By
374default, it is set to {@code true}.
Quddus Chong5f150d52015-05-10 16:07:27 -0700375</li>
376<li><strong>WiFi configuration removal:</strong> WiFi configurations added by a Profile Owner
377(for example, through calls to the
378{@link android.net.wifi.WifiManager#addNetwork(android.net.wifi.WifiConfiguration)
379addNetwork()} method) are now removed if that work profile is deleted.</li>
380<li><strong>WiFi configuration lockdown:</strong> Any WiFi configuration created by an active Device
381Owner can no longer be modified or deleted by the user. The user can still create and
382modify their own WiFi configurations, so long as the {@link android.os.UserManager} constant
383{@link android.os.UserManager#DISALLOW_CONFIG_WIFI} has not been set for that user.</li>
384<li><strong>Download Work Policy Controller via Google account addition:</strong> When a Google
385account that requires management via a Work Policy Controller (WPC) app is added to a device
386outside of a managed context, the add account flow now prompts the user to install the
387appropriate WPC. This behavior also applies to accounts added via
388<strong>Settings > Accounts</strong> in the initial device setup wizard.</li>
389<li><strong>Changes to specific DevicePolicyManager API behaviors:</strong>
390Calling the {@link android.app.admin.DevicePolicyManager#setCameraDisabled(android.content.ComponentName,boolean) setCameraDisabled()}
391method affects the camera for the calling user only; calling it from the managed profile doesn’t
392affect camera apps running on the primary user. In addition, the
393{@link android.app.admin.DevicePolicyManager#setKeyguardDisabledFeatures(android.content.ComponentName,int) setKeyguardDisabledFeatures()}
394method is now available for Profile Owners, in addition to Device Owners. A Profile Owner can set
395these keyguard restrictions:
396<ul>
397<li>{@link android.app.admin.DevicePolicyManager#KEYGUARD_DISABLE_TRUST_AGENTS} and
398 {@link android.app.admin.DevicePolicyManager#KEYGUARD_DISABLE_FINGERPRINT}, which affect the
399 keyguard settings for the profile’s parent user.</li>
400<li>{@link android.app.admin.DevicePolicyManager#KEYGUARD_DISABLE_UNREDACTED_NOTIFICATIONS}, which
401 only affects notifications generated by applications in the managed profile.</li>
402</ul>
403</li>
404</ul>