From 182e8b53eae566568ade7512c5e84c3d4af75ead Mon Sep 17 00:00:00 2001
From: David Friedman
Figure 1. Apps running in split-screen mode.
Especially on tablets and other larger-screen devices, multi-window support
@@ -401,7 +403,7 @@ displayed — users can add or move tiles just by dragging and dropping them
- For information about creating an app tile, see the
+ For information about creating an app tile, see the documentation for
android.service.quicksettings.Tile in the downloadable API Reference.
Apps can get the list of locales set by the user by calling LocaleList.GetDefault(). To support the expanded number of locales, Android N is changing the way
-that it resolves resources. Make sure that you test and verify that your apps
+
Apps can get the list of locales set by the user by calling
+LocaleList.GetDefault(). To support the expanded number of locales, Android N is
+changing the way that it resolves resources. Make sure that you test and verify that your apps
working as expected with the new resource resolution logic.
To learn about the new resource-resolution behavior and the best practices you
@@ -550,7 +553,8 @@ should follow, see Android Extension Pack (AEP) except for EXT_texture_sRGB_decode.
+href="https://www.khronos.org/registry/gles/extensions/ANDROID/ANDROID_extension_pack_es31a.txt">
+Android Extension Pack (AEP) except for EXT_texture_sRGB_decode.
-In Android N, the user can press Meta+/ to trigger a Keyboard Shortcuts
+In Android N, the user can press "Alt + /" to trigger a Keyboard Shortcuts
screen that displays all shortcuts available both from the system and from
the app in focus. These are retrieved automatically from the app’s menu if
available, but developers can provide their own fine-tuned shortcuts lists
-for the screen. This is done simply by overriding the following method
-in {@code Activity.java}:
+for the screen. You can do this by overriding the new
+Activity.onProvideKeyboardShortcuts() method, described in the downloadable
+API Reference.
-public void onProvideKeyboardShortcuts( - List-data, Menu menu, int deviceId) -
To trigger the Keyboard Shortcuts Helper from anywhere in your app, -call {@code requestKeyboardShortcutsHelper} for the relevant activity. +call {@code Activity.requestKeyboardShortcutsHelper()} for the relevant activity.
To address these limitations, Android N includes support for -sustained performance mode, enabling OEMs to provide hints on -device-performance capabilities for long-running applications. App developers -can use these hints to tune applications for a predictable, +sustained performance mode, enabling OEMs to provide hints about +device-performance capabilities for long-running apps. App developers +can use these hints to tune apps for a predictable, consistent level of device performance over long periods of time.
@@ -890,10 +890,20 @@ App developers can try out this new API in the N Developer Preview on Nexus 6P devices only. To use this feature, set the sustained performance window flag for the window you want to run in sustained performance mode. Set this flag using the -{@code setSustainedPerformanceMode(boolean)} method. The system automatically +{@code Window.setSustainedPerformanceMode()} method. The system automatically disables this mode when the window is no longer in focus. ++Leveraging the Sustained Performance API +and newly introduced {@code VrListenerService} class, Android N provides support for +VR apps developed using the Cardboard +SDK. For more information about the {@code VrListenerService} class, see the relevant section +of the downloadable API Reference. + +
@@ -939,9 +949,10 @@ disables this mode when the window is no longer in focus.
The FrameMetricsListener API allows an app to monitor its UI rendering -performance by exposing a streaming pubsub API to transfer frame +performance. The API provides this capability by exposing a streaming Pub/Sub API to transfer frame timing info for the app's current window. The data returned is -equivalent to that displayed by {@code adb shell dumpsys gfxinfo framestats}, +equivalent to that displayed by {@code +adb shell dumpsys gfxinfo framestats}, but is not limited to the past 120 frames.
@@ -958,25 +969,20 @@ for real use cases within an app.
-The API provides a callback interface to be implemented and
-registered on the window that you wish to monitor:
+To monitor a window, implement the FrameMetricsListener.onMetricsAvailable()
+callback method and register it on that window. For more information, refer to
+the {@code FrameMetricsListener} class documentation in
+the downloadable API Reference.
- public interface FrameMetricsListener {
- void onMetricsAvailable(Window window, FrameMetrics frameMetrics,
- int dropCountSinceLastInvocation);
- }
-
-
-The API returns a FrameMetrics object, which contains timing data that +The API provides a {@code FrameMetrics} object, which contains timing data that the rendering subsystem reports for various milestones in a frame lifecycle. The supported metrics are: {@code UNKNOWN_DELAY_DURATION}, {@code INPUT_HANDLING_DURATION}, {@code ANIMATION_DURATION}, {@code LAYOUT_MEASURE_DURATION}, {@code DRAW_DURATION}, {@code SYNC_DURATION}, {@code COMMAND_ISSUE_DURATION}, {@code SWAP_BUFFERS_DURATION}, -{@code TOTAL_DURATION}, and {@code FIRST_DRAW_FRAME} +{@code TOTAL_DURATION}, and {@code FIRST_DRAW_FRAME}.
diff --git a/docs/html/preview/behavior-changes.jd b/docs/html/preview/behavior-changes.jd index 7c8bfe8ba29e0..88dca54b1c3ea 100644 --- a/docs/html/preview/behavior-changes.jd +++ b/docs/html/preview/behavior-changes.jd @@ -23,6 +23,7 @@ page.image=images/cards/card-n-changes_2x.png+For apps targeting Android N, the Android framework enforces +the {@link android.os.StrictMode} API policy that prohibits exposing {@code file://} URIs +outside your app. If an intent containing a file URI leaves your app, the app fails +with a {@code FileUriExposedException} exception. +
+ ++To share files between applications, you should send a {@code content://} URI +and grant a temporary access permission on the URI. The easiest way to grant this permission is by +using the {@link android.support.v4.content.FileProvider} class. For more information +on permissions and sharing files, +see Sharing Files. +
+
@@ -487,7 +505,7 @@ JavaVM::AttachCurrentThread from <jni.h>.
running in device owner mode, the DISALLOW_ADD_USER restriction
is automatically set. This prevents users from creating unmanaged secondary
users. In addition, the CreateUser() and
- createAndInitial() methods are deprecated; the new
+ createAndInitializeUser() methods are deprecated; the new
DevicePolicyManager.createAndManageUser() method replaces them.
@@ -496,6 +514,10 @@ JavaVM::AttachCurrentThread from <jni.h>.
DevicePolicyManagewr.getWifiMacAddress(). If Wi-Fi has never
been enabled on the device, this method returns a value of {@code null}.
+
+
@@ -576,5 +598,33 @@ common example is storing too much data in which causes {@code ActivityThread.StopInfo} to throw a {@code RuntimeException} when your app targets Android N.
MessagingStyle, or you can append the user's reply to the remote
- input history.
+ do not cancel the notification. Instead, update the notification to display the user's reply.
+For notifications using {@code MessagingStyle}, you should add
+the reply as the latest message. When using other templates, you can
+append the user's reply to the remote-input history.