Docs: Cleanup of Preview language in Android 7.0 docs. am: 4b6d939321 am: 0b8e646225
am: 059c09784d
Change-Id: Ice0f6182bf2db6c8d62fc592f65834d4d9adb794
This commit is contained in:
@@ -182,8 +182,8 @@ certain implicit intents.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
For more information about background optimizations in N and how to adapt your app,
|
||||
see <a href=
|
||||
For more information about background optimizations in Android 7.0 (API level
|
||||
24) and how to adapt your app, see <a href=
|
||||
"{@docRoot}preview/features/background-optimization.html">Background
|
||||
Optimizations</a>.
|
||||
</p>
|
||||
@@ -427,12 +427,13 @@ see <a href="{@docRoot}training/secure-file-sharing/index.html">Sharing Files</a
|
||||
released apps, a set of libraries that see significant use—such as
|
||||
<code>libandroid_runtime.so</code>, <code>libcutils.so</code>,
|
||||
<code>libcrypto.so</code>, and <code>libssl.so</code>—are temporarily
|
||||
accessible on N for apps targeting API level 23 or lower. If your app loads
|
||||
one of these libraries, logcat generates a warning and a toast appears on the
|
||||
target device to notify you. If you see these warnings, you should update
|
||||
your app to either include its own copy of those libraries or only use the
|
||||
public NDK APIs. Future releases of the Android platform may restrict the use
|
||||
of private libraries altogether and cause your app to crash.
|
||||
accessible on Android 7.0 (API level 24) for apps targeting API level 23 or
|
||||
lower. If your app loads one of these libraries, logcat generates a warning
|
||||
and a toast appears on the target device to notify you. If you see these
|
||||
warnings, you should update your app to either include its own copy of those
|
||||
libraries or only use the public NDK APIs. Future releases of the Android
|
||||
platform may restrict the use of private libraries altogether and cause your
|
||||
app to crash.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -441,9 +442,9 @@ see <a href="{@docRoot}training/secure-file-sharing/index.html">Sharing Files</a
|
||||
<code>System.loadLibrary</code> and <code>dlopen(3)</code> both return
|
||||
<code>NULL</code>, and may cause your app to crash. You should review your
|
||||
app code to remove use of private platform APIs and thoroughly test your apps
|
||||
using a preview device or emulator. If you are unsure whether your app uses
|
||||
private libraries, you can <a href="#ndk-errors">check logcat</a> to identify
|
||||
the runtime error.
|
||||
using a device or emulator running Android 7.0 (API level 24). If you are
|
||||
unsure whether your app uses private libraries, you can <a href=
|
||||
"#ndk-errors">check logcat</a> to identify the runtime error.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -454,11 +455,6 @@ see <a href="{@docRoot}training/secure-file-sharing/index.html">Sharing Files</a
|
||||
|
||||
<table id="ndk-table">
|
||||
<col width="15%">
|
||||
<col width="15%">
|
||||
<col width="15%">
|
||||
<col width="20%">
|
||||
<col width="20%">
|
||||
<col width="20%">
|
||||
<tr>
|
||||
<th scope="col">
|
||||
Libraries
|
||||
@@ -470,10 +466,7 @@ see <a href="{@docRoot}training/secure-file-sharing/index.html">Sharing Files</a
|
||||
Runtime access via dynamic linker
|
||||
</th>
|
||||
<th scope="col">
|
||||
N Developer Preview behavior
|
||||
</th>
|
||||
<th scope="col">
|
||||
Final N Release behavior
|
||||
Android 7.0 (API level 24) behavior
|
||||
</th>
|
||||
<th scope="col">
|
||||
Future Android platform behavior
|
||||
@@ -500,10 +493,6 @@ see <a href="{@docRoot}training/secure-file-sharing/index.html">Sharing Files</a
|
||||
<td style="background-color:#DCEDC8">
|
||||
Works as expected
|
||||
</td>
|
||||
|
||||
<td style="background-color:#DCEDC8">
|
||||
Works as expected
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
@@ -519,11 +508,6 @@ see <a href="{@docRoot}training/secure-file-sharing/index.html">Sharing Files</a
|
||||
Temporarily accessible
|
||||
</td>
|
||||
|
||||
<td style="background-color:#FFF9C4">
|
||||
Works as expected, but you receive a logcat warning and a message on the
|
||||
target device.
|
||||
</td>
|
||||
|
||||
<td style="background-color:#FFF9C4">
|
||||
Works as expected, but you receive a logcat warning.
|
||||
</td>
|
||||
@@ -553,10 +537,6 @@ see <a href="{@docRoot}training/secure-file-sharing/index.html">Sharing Files</a
|
||||
<td style="background-color:#ffcdd2">
|
||||
Runtime error
|
||||
</td>
|
||||
|
||||
<td style="background-color:#ffcdd2">
|
||||
Runtime error
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
@@ -579,10 +559,6 @@ see <a href="{@docRoot}training/secure-file-sharing/index.html">Sharing Files</a
|
||||
<td style="background-color:#ffcdd2">
|
||||
Runtime error
|
||||
</td>
|
||||
|
||||
<td style="background-color:#ffcdd2">
|
||||
Runtime error
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -699,8 +675,8 @@ JavaVM::AttachCurrentThread from <jni.h>.
|
||||
|
||||
<ul>
|
||||
<li>You must install a delegated certificate installer before the DPC can set
|
||||
it. For both profile and device-owner apps targeting the N SDK, you should
|
||||
install the delegated certificate installer before the device policy
|
||||
it. For both profile and device-owner apps targeting Android 7.0 (API level 24),
|
||||
you should install the delegated certificate installer before the device policy
|
||||
controller (DPC) calls
|
||||
<code>DevicePolicyManager.setCertInstallerPackage()</code>. If the installer
|
||||
is not already installed, the system throws an
|
||||
@@ -747,12 +723,13 @@ JavaVM::AttachCurrentThread from <jni.h>.
|
||||
DER-encoded format under a .crt or .cer file extension.
|
||||
</li>
|
||||
|
||||
<li>Starting in Android 7.0, fingerprint enrollment and storage are managed per user.
|
||||
If a profile owner’s Device Policy Client (DPC) targets pre-N on an N device,
|
||||
the user is still able to set fingerprint on the device, but work
|
||||
applications cannot access device fingerprint. When the DPC targets N and
|
||||
above, the user can set fingerprint specifically for work profile by going to
|
||||
<strong>Settings > Security > Work profile security</strong>.
|
||||
<li>Starting in Android 7.0, fingerprint enrollment and storage are managed
|
||||
per user. If a profile owner’s Device Policy Client (DPC) targets API level
|
||||
23 (or lower) on a device running Android 7.0 (API level 24), the user is
|
||||
still able to set fingerprint on the device, but work applications cannot
|
||||
access device fingerprint. When the DPC targets API level 24 and above, the user can set
|
||||
fingerprint specifically for work profile by going to <strong>Settings >
|
||||
Security > Work profile security</strong>.
|
||||
</li>
|
||||
|
||||
<li>A new encryption status <code>ENCRYPTION_STATUS_ACTIVE_PER_USER</code> is
|
||||
@@ -822,8 +799,9 @@ when killing the app manually via DDMS.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Apps targeting N and above are not automatically killed on density changes;
|
||||
however, they may still respond poorly to configuration changes.
|
||||
Apps targeting Android 7.0 (API level 24) and above are not automatically
|
||||
killed on density changes; however, they may still respond poorly to
|
||||
configuration changes.
|
||||
</p>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -14,29 +14,31 @@ page.image=images/cards/card-nyc_2x.jpg
|
||||
<ol>
|
||||
<li>
|
||||
<a href="#connectivity-action">Restrictions on CONNECTIVITY_ACTION</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="#sched-jobs">Scheduling Network Jobs on Unmetered
|
||||
Connections</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#sched-jobs">Scheduling Network Jobs on Unmetered
|
||||
Connections</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#monitor-conn">Monitoring Network Connectivity While the App
|
||||
is Running</a>
|
||||
<li>
|
||||
<a href="#monitor-conn">Monitoring Network Connectivity While the
|
||||
App is Running</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#media-broadcasts">Restrictions on NEW_PICTURE and
|
||||
NEW_VIDEO</a>
|
||||
</li>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="#new-jobinfo">New JobInfo methods</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#new-jobinfo">New JobInfo methods</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#new-jobparam">New JobParameter Methods</a>
|
||||
<li>
|
||||
<a href="#new-jobparam">New JobParameter Methods</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
@@ -54,12 +56,12 @@ page.image=images/cards/card-nyc_2x.jpg
|
||||
</p>
|
||||
|
||||
<p>
|
||||
To alleviate this issue, Android N applies the following
|
||||
To alleviate this issue, Android 7.0 (API level 24) applies the following
|
||||
restrictions:
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>Apps targeting the Preview do not receive {@link
|
||||
<li>Apps targeting Android 7.0 (API level 24) do not receive {@link
|
||||
android.net.ConnectivityManager#CONNECTIVITY_ACTION} broadcasts if they
|
||||
register to receive them in their manifest. Apps that are running can still
|
||||
listen for {@code CONNECTIVITY_CHANGE} on their main thread by registering a
|
||||
@@ -70,16 +72,16 @@ page.image=images/cards/card-nyc_2x.jpg
|
||||
<li>Apps cannot send or receive {@link
|
||||
android.hardware.Camera#ACTION_NEW_PICTURE} or {@link
|
||||
android.hardware.Camera#ACTION_NEW_VIDEO} broadcasts. This optimization
|
||||
affects all apps, not only those targeting the Preview.
|
||||
affects all apps, not only those targeting Android 7.0 (API level 24).
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<p>
|
||||
If your app uses any of these intents, you should remove dependencies on
|
||||
them as soon as possible so that you can target Android N devices properly.
|
||||
The Android framework provides several solutions to mitigate the need for
|
||||
these implicit broadcasts. For example, {@link android.app.job.JobScheduler}
|
||||
and <a href=
|
||||
If your app uses any of these intents, you should remove dependencies on them
|
||||
as soon as possible so that you can target devices running Android 7.0
|
||||
properly. The Android framework provides several solutions to mitigate the
|
||||
need for these implicit broadcasts. For example, {@link
|
||||
android.app.job.JobScheduler} and <a href=
|
||||
"https://developers.google.com/android/reference/com/google/android/gms/gcm/GcmNetworkManager">
|
||||
{@code GcmNetworkManager}</a> provide robust mechanisms to schedule network
|
||||
operations when specified conditions, such as a connection to an unmetered
|
||||
@@ -101,7 +103,7 @@ page.image=images/cards/card-nyc_2x.jpg
|
||||
</h2>
|
||||
|
||||
<p>
|
||||
Apps targeting the Android N do not receive {@link
|
||||
Apps targeting Android 7.0 (API level 24) do not receive {@link
|
||||
android.net.ConnectivityManager#CONNECTIVITY_ACTION} broadcasts if they
|
||||
register to receive them in their manifest, and processes that depend on this
|
||||
broadcast will not start. This could pose a problem for apps that want
|
||||
@@ -212,7 +214,7 @@ public static void scheduleJob(Context context) {
|
||||
</h3>
|
||||
|
||||
<p>
|
||||
To trigger jobs on content URI changes, Android N extends
|
||||
To trigger jobs on content URI changes, Android 7.0 (API level 24) extends
|
||||
the {@link android.app.job.JobInfo} API with the following methods:
|
||||
</p>
|
||||
|
||||
@@ -287,7 +289,7 @@ public static void scheduleJob(Context context) {
|
||||
</h3>
|
||||
|
||||
<p>
|
||||
Android N also extends {@link android.app.job.JobParameters} to
|
||||
Android 7.0 (API level 24) also extends {@link android.app.job.JobParameters} to
|
||||
allow your app to receive useful information about what content authorities
|
||||
and URIs triggered the job:
|
||||
</p>
|
||||
@@ -361,13 +363,13 @@ public boolean onStartJob(JobParameters params) {
|
||||
conditions, can improve performance and user experience. Removing
|
||||
dependencies on background services and statically-registered implicit
|
||||
broadcast receivers can help your app run better on such devices. Although
|
||||
Android N takes steps to reduce some of these issues, it is
|
||||
Android 7.0 (API level 24) takes steps to reduce some of these issues, it is
|
||||
recommended that you optimize your app to run without the use of these
|
||||
background processes entirely.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Android N introduces some additional <a href=
|
||||
Android 7.0 (API level 24) introduces some additional <a href=
|
||||
"{@docRoot}tools/help/adb.html">Android Debug Bridge (ADB)</a> commands that
|
||||
you can use to test app behavior with those background processes disabled:
|
||||
</p>
|
||||
@@ -379,7 +381,7 @@ public boolean onStartJob(JobParameters params) {
|
||||
|
||||
<li style="list-style: none; display: inline">
|
||||
<pre class="no-pretty-print">
|
||||
{@code $ adb shell cmd appops set <package_name> RUN_IN_BACKGROUND ignore}
|
||||
{@code $ adb shell cmd appops set <package_name> RUN_IN_BACKGROUND ignore}
|
||||
</pre>
|
||||
</li>
|
||||
|
||||
@@ -389,7 +391,7 @@ public boolean onStartJob(JobParameters params) {
|
||||
|
||||
<li style="list-style: none; display: inline">
|
||||
<pre class="no-pretty-print">
|
||||
{@code $ adb shell cmd appops set <package_name> RUN_IN_BACKGROUND allow}
|
||||
{@code $ adb shell cmd appops set <package_name> RUN_IN_BACKGROUND allow}
|
||||
</pre>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@@ -45,7 +45,7 @@ next.link=xml.html
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The N Developer Preview extends the {@link android.net.ConnectivityManager}
|
||||
Android 7.0 (API level 24) extends the {@link android.net.ConnectivityManager}
|
||||
API to provide apps with a way to <a href="#status">retrieve the user’s Data
|
||||
Saver preferences</a> and <a href="#monitor-changes">monitor preference
|
||||
changes</a>. It is considered good practice for apps to check whether the
|
||||
@@ -58,7 +58,7 @@ next.link=xml.html
|
||||
</h2>
|
||||
|
||||
<p>
|
||||
In the N Developer Preview, apps can use the {@link
|
||||
In Android 7.0 (API level 24), apps can use the {@link
|
||||
android.net.ConnectivityManager} API to determine what data usage
|
||||
restrictions are being applied. The {@code getRestrictBackgroundStatus()}
|
||||
method returns one of the following values:
|
||||
|
||||
Reference in New Issue
Block a user