OSDN Git Service

Merge "Handle PhoneStatusBarPolicy user switch callbacks on main thread" into nyc-dev
authorJulia Reynolds <juliacr@google.com>
Wed, 18 May 2016 14:09:49 +0000 (14:09 +0000)
committerAndroid (Google) Code Review <android-gerrit@google.com>
Wed, 18 May 2016 14:09:50 +0000 (14:09 +0000)
128 files changed:
api/current.txt
api/system-current.txt
api/test-current.txt
core/java/android/app/Activity.java
core/java/android/app/LoadedApk.java
core/java/android/app/Notification.java
core/java/android/app/ResourcesManager.java
core/java/android/content/res/Configuration.java
core/java/android/content/res/ResourcesImpl.java
core/java/android/hardware/input/KeyboardLayout.java
core/java/android/os/LocaleList.aidl [moved from core/java/android/util/LocaleList.aidl with 96% similarity]
core/java/android/os/LocaleList.java [moved from core/java/android/util/LocaleList.java with 99% similarity]
core/java/android/os/health/SystemHealthManager.java
core/java/android/provider/Settings.java
core/java/android/text/style/LocaleSpan.java
core/java/android/view/Display.java
core/java/android/view/SurfaceView.java
core/java/android/view/inputmethod/EditorInfo.java
core/java/android/widget/Editor.java
core/java/android/widget/TextView.java
core/java/com/android/internal/app/LocaleHelper.java
core/java/com/android/internal/app/LocalePicker.java
core/java/com/android/internal/app/LocalePickerWithRegion.java
core/java/com/android/internal/app/procstats/ProcessState.java
core/java/com/android/internal/inputmethod/InputMethodUtils.java
core/java/com/android/internal/inputmethod/LocaleUtils.java
core/java/com/android/internal/policy/BackdropFrameRenderer.java
core/tests/coretests/src/android/content/res/ResourcesManagerTest.java
core/tests/coretests/src/android/os/LocaleListTest.java [moved from core/tests/coretests/src/android/util/LocaleListTest.java with 98% similarity]
core/tests/coretests/src/android/print/BasePrintTest.java
core/tests/coretests/src/com/android/internal/inputmethod/InputMethodUtilsTest.java
core/tests/coretests/src/com/android/internal/inputmethod/LocaleUtilsTest.java
docs/html/about/dashboards/index.jd
docs/html/images/topic/instant-apps/3D-Image-viewer.gif [new file with mode: 0644]
docs/html/images/topic/instant-apps/BandH-Photo.gif [new file with mode: 0644]
docs/html/images/topic/instant-apps/Buzzfeed.gif [new file with mode: 0644]
docs/html/images/topic/instant-apps/Park-and-Pay.gif [new file with mode: 0644]
docs/html/images/topic/instant-apps/instant-apps-section-2.png [new file with mode: 0644]
docs/html/images/topic/instant-apps/instant-apps-section-4.png [new file with mode: 0644]
docs/html/images/topic/instant-apps/instant-apps-section-5.png [new file with mode: 0644]
docs/html/images/topic/instant-apps/play-services-features-2x.png [new file with mode: 0644]
docs/html/images/topic/instant-apps/s3-BandH-animated.gif [new file with mode: 0644]
docs/html/images/topic/instant-apps/s3-BandH-static.png [new file with mode: 0644]
docs/html/images/topic/instant-apps/s3-BuzzFeed-animated.gif [new file with mode: 0644]
docs/html/images/topic/instant-apps/s3-BuzzFeed-static.png [new file with mode: 0644]
docs/html/images/topic/instant-apps/s3-ParkandPay-animated.gif [new file with mode: 0644]
docs/html/images/topic/instant-apps/s3-ParkandPay-static.png [new file with mode: 0644]
docs/html/images/topic/instant-apps/upgrade-your-app-2x.png [new file with mode: 0644]
docs/html/jd_collections.js
docs/html/jd_extras.js
docs/html/jd_extras_en.js
docs/html/preview/api-overview.jd
docs/html/preview/behavior-changes.jd
docs/html/preview/download-ota.jd
docs/html/preview/download.jd
docs/html/preview/features/background-optimization.jd
docs/html/preview/overview.jd
docs/html/preview/setup-sdk.jd
docs/html/preview/support.jd
docs/html/topic/instant-apps/faqs.jd [new file with mode: 0644]
docs/html/topic/instant-apps/index.jd [new file with mode: 0644]
docs/html/topic/libraries/support-library/index.jd
docs/html/wear/index.jd
docs/html/wear/preview/api-overview.jd
docs/html/wear/preview/downloads.jd
docs/html/wear/preview/features/bridger.jd
docs/html/wear/preview/features/complications.jd
docs/html/wear/preview/features/ime.jd
docs/html/wear/preview/features/notifications.jd
docs/html/wear/preview/features/ui-nav-actions.jd
docs/html/wear/preview/images/card_drawer.png [new file with mode: 0644]
docs/html/wear/preview/images/comparison_diagram.png [new file with mode: 0644]
docs/html/wear/preview/images/complication-type-exs.png
docs/html/wear/preview/images/complications-data-flow.png
docs/html/wear/preview/images/complications-main-image.png [new file with mode: 0644]
docs/html/wear/preview/images/expanded_diagram.png [new file with mode: 0644]
docs/html/wear/preview/images/hero-1x.png
docs/html/wear/preview/images/hero-2x.png
docs/html/wear/preview/images/messaging_style.png [new file with mode: 0644]
docs/html/wear/preview/images/messaging_style_diagram.png [new file with mode: 0644]
docs/html/wear/preview/images/new_input_methods.png [new file with mode: 0644]
docs/html/wear/preview/images/remoteinput.png [new file with mode: 0644]
docs/html/wear/preview/index.jd
docs/html/wear/preview/program.jd
docs/html/wear/preview/start.jd
docs/html/wear/preview/support.jd [new file with mode: 0644]
docs/html/work/guide.jd
docs/html/work/overview.jd
docs/image_sources/topic/instant-apps/Play-Services.png [new file with mode: 0644]
docs/image_sources/topic/instant-apps/image03.png [new file with mode: 0644]
docs/image_sources/topic/instant-apps/instant-apps-section-2 [new file with mode: 0644]
docs/image_sources/topic/instant-apps/instant-apps-section-4 [new file with mode: 0644]
docs/image_sources/topic/instant-apps/instant-apps-section-5 [new file with mode: 0644]
docs/image_sources/topic/instant-apps/play-services-features-2x.png [new file with mode: 0644]
docs/image_sources/topic/instant-apps/s3-BandH-animated.gif [new file with mode: 0644]
docs/image_sources/topic/instant-apps/s3-BandH-static.png [new file with mode: 0644]
docs/image_sources/topic/instant-apps/s3-BuzzFeed-animated.gif [new file with mode: 0644]
docs/image_sources/topic/instant-apps/s3-BuzzFeed-static.png [new file with mode: 0644]
docs/image_sources/topic/instant-apps/s3-ParkandPay-animated.gif [new file with mode: 0644]
docs/image_sources/topic/instant-apps/s3-ParkandPay-static.png [new file with mode: 0644]
docs/image_sources/topic/instant-apps/upgrade-your-app-2x.png [new file with mode: 0644]
docs/image_sources/topic/instant-apps/works-on-all-2x (1).png [new file with mode: 0644]
graphics/java/android/graphics/Paint.java
media/jni/android_media_MediaSync.cpp
packages/Keyguard/src/com/android/keyguard/KeyguardAbsKeyInputView.java
packages/Keyguard/src/com/android/keyguard/KeyguardPINView.java
packages/Keyguard/src/com/android/keyguard/KeyguardPasswordView.java
packages/Keyguard/src/com/android/keyguard/KeyguardPinBasedInputView.java
packages/Keyguard/src/com/android/keyguard/KeyguardSimPinView.java
packages/Keyguard/src/com/android/keyguard/KeyguardSimPukView.java
packages/Keyguard/src/com/android/keyguard/PasswordTextView.java
packages/SystemUI/src/com/android/systemui/AutoReinflateContainer.java
packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationGroupManager.java
packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java
packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java
services/core/java/com/android/server/DeviceIdleController.java
services/core/java/com/android/server/InputMethodManagerService.java
services/core/java/com/android/server/am/ActivityManagerService.java
services/core/java/com/android/server/am/ActivityStack.java
services/core/java/com/android/server/am/BatteryStatsService.java
services/core/java/com/android/server/am/BroadcastQueue.java
services/core/java/com/android/server/input/InputManagerService.java
services/core/java/com/android/server/policy/ImmersiveModeConfirmation.java
services/core/java/com/android/server/wm/DockedStackDividerController.java
services/core/java/com/android/server/wm/TaskStack.java
services/core/java/com/android/server/wm/WindowManagerService.java

index c808e04..2ec4f0f 100644 (file)
@@ -3479,7 +3479,6 @@ package android.app {
     method public boolean isInMultiWindowMode();
     method public boolean isInPictureInPictureMode();
     method public boolean isLocalVoiceInteractionSupported();
-    method public boolean isOverlayWithDecorCaptionEnabled();
     method public boolean isTaskRoot();
     method public boolean isVoiceInteraction();
     method public boolean isVoiceInteractionRoot();
@@ -3601,7 +3600,6 @@ package android.app {
     method public void setImmersive(boolean);
     method public void setIntent(android.content.Intent);
     method public final void setMediaController(android.media.session.MediaController);
-    method public void setOverlayWithDecorCaptionEnabled(boolean);
     method public final deprecated void setProgress(int);
     method public final deprecated void setProgressBarIndeterminate(boolean);
     method public final deprecated void setProgressBarIndeterminateVisibility(boolean);
@@ -4925,7 +4923,7 @@ package android.app {
     field public static final int DEFAULT_VIBRATE = 2; // 0x2
     field public static final java.lang.String EXTRA_BACKGROUND_IMAGE_URI = "android.backgroundImageUri";
     field public static final java.lang.String EXTRA_BIG_TEXT = "android.bigText";
-    field public static final java.lang.String EXTRA_CHRONOMETER_COUNTS_DOWN = "android.chronometerCountsDown";
+    field public static final java.lang.String EXTRA_CHRONOMETER_COUNT_DOWN = "android.chronometerCountDown";
     field public static final java.lang.String EXTRA_COMPACT_ACTIONS = "android.compactActions";
     field public static final java.lang.String EXTRA_CONVERSATION_TITLE = "android.conversationTitle";
     field public static final java.lang.String EXTRA_INFO_TEXT = "android.infoText";
@@ -5084,7 +5082,7 @@ package android.app {
     method public android.app.Notification.Builder setActions(android.app.Notification.Action...);
     method public android.app.Notification.Builder setAutoCancel(boolean);
     method public android.app.Notification.Builder setCategory(java.lang.String);
-    method public android.app.Notification.Builder setChronometerCountsDown(boolean);
+    method public android.app.Notification.Builder setChronometerCountDown(boolean);
     method public android.app.Notification.Builder setColor(int);
     method public deprecated android.app.Notification.Builder setContent(android.widget.RemoteViews);
     method public deprecated android.app.Notification.Builder setContentInfo(java.lang.CharSequence);
@@ -10116,14 +10114,14 @@ package android.content.res {
     method public int diff(android.content.res.Configuration);
     method public boolean equals(android.content.res.Configuration);
     method public int getLayoutDirection();
-    method public android.util.LocaleList getLocales();
+    method public android.os.LocaleList getLocales();
     method public boolean isLayoutSizeAtLeast(int);
     method public boolean isScreenRound();
     method public static boolean needNewResources(int, int);
     method public void readFromParcel(android.os.Parcel);
     method public void setLayoutDirection(java.util.Locale);
     method public void setLocale(java.util.Locale);
-    method public void setLocales(android.util.LocaleList);
+    method public void setLocales(android.os.LocaleList);
     method public void setTo(android.content.res.Configuration);
     method public void setToDefaults();
     method public int updateFrom(android.content.res.Configuration);
@@ -12035,7 +12033,7 @@ package android.graphics {
     method public void getTextBounds(java.lang.String, int, int, android.graphics.Rect);
     method public void getTextBounds(char[], int, int, android.graphics.Rect);
     method public java.util.Locale getTextLocale();
-    method public android.util.LocaleList getTextLocales();
+    method public android.os.LocaleList getTextLocales();
     method public void getTextPath(char[], int, int, float, float, android.graphics.Path);
     method public void getTextPath(java.lang.String, int, int, float, float, android.graphics.Path);
     method public float getTextScaleX();
@@ -12091,7 +12089,7 @@ package android.graphics {
     method public void setSubpixelText(boolean);
     method public void setTextAlign(android.graphics.Paint.Align);
     method public void setTextLocale(java.util.Locale);
-    method public void setTextLocales(android.util.LocaleList);
+    method public void setTextLocales(android.os.LocaleList);
     method public void setTextScaleX(float);
     method public void setTextSize(float);
     method public void setTextSkewX(float);
@@ -28675,6 +28673,24 @@ package android.os {
     method public abstract android.os.IBinder asBinder();
   }
 
+  public final class LocaleList implements android.os.Parcelable {
+    ctor public LocaleList(java.util.Locale...);
+    method public int describeContents();
+    method public static android.os.LocaleList forLanguageTags(java.lang.String);
+    method public java.util.Locale get(int);
+    method public static android.os.LocaleList getAdjustedDefault();
+    method public static android.os.LocaleList getDefault();
+    method public static android.os.LocaleList getEmptyLocaleList();
+    method public java.util.Locale getFirstMatch(java.lang.String[]);
+    method public int indexOf(java.util.Locale);
+    method public boolean isEmpty();
+    method public static void setDefault(android.os.LocaleList);
+    method public int size();
+    method public java.lang.String toLanguageTags();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.os.LocaleList> CREATOR;
+  }
+
   public final class Looper {
     method public void dump(android.util.Printer, java.lang.String);
     method public static android.os.Looper getMainLooper();
@@ -29368,7 +29384,6 @@ package android.os.health {
   }
 
   public class SystemHealthManager {
-    method public static android.os.health.SystemHealthManager from(android.content.Context);
     method public android.os.health.HealthStats takeMyUidSnapshot();
     method public android.os.health.HealthStats takeUidSnapshot(int);
     method public android.os.health.HealthStats[] takeUidSnapshots(int[]);
@@ -39215,11 +39230,11 @@ package android.text.style {
 
   public class LocaleSpan extends android.text.style.MetricAffectingSpan implements android.text.ParcelableSpan {
     ctor public LocaleSpan(java.util.Locale);
-    ctor public LocaleSpan(android.util.LocaleList);
+    ctor public LocaleSpan(android.os.LocaleList);
     ctor public LocaleSpan(android.os.Parcel);
     method public int describeContents();
     method public java.util.Locale getLocale();
-    method public android.util.LocaleList getLocales();
+    method public android.os.LocaleList getLocales();
     method public int getSpanTypeId();
     method public void updateDrawState(android.text.TextPaint);
     method public void updateMeasureState(android.text.TextPaint);
@@ -40238,24 +40253,6 @@ package android.util {
     field public static final int RTL = 1; // 0x1
   }
 
-  public final class LocaleList implements android.os.Parcelable {
-    ctor public LocaleList(java.util.Locale...);
-    method public int describeContents();
-    method public static android.util.LocaleList forLanguageTags(java.lang.String);
-    method public java.util.Locale get(int);
-    method public static android.util.LocaleList getAdjustedDefault();
-    method public static android.util.LocaleList getDefault();
-    method public static android.util.LocaleList getEmptyLocaleList();
-    method public java.util.Locale getFirstMatch(java.lang.String[]);
-    method public int indexOf(java.util.Locale);
-    method public boolean isEmpty();
-    method public static void setDefault(android.util.LocaleList);
-    method public int size();
-    method public java.lang.String toLanguageTags();
-    method public void writeToParcel(android.os.Parcel, int);
-    field public static final android.os.Parcelable.Creator<android.util.LocaleList> CREATOR;
-  }
-
   public final class Log {
     method public static int d(java.lang.String, java.lang.String);
     method public static int d(java.lang.String, java.lang.String, java.lang.Throwable);
@@ -40826,7 +40823,6 @@ package android.view {
   }
 
   public static final class Display.HdrCapabilities implements android.os.Parcelable {
-    ctor public Display.HdrCapabilities(int[], float, float, float);
     method public int describeContents();
     method public float getDesiredMaxAverageLuminance();
     method public float getDesiredMaxLuminance();
@@ -44655,7 +44651,7 @@ package android.view.inputmethod {
     field public android.os.Bundle extras;
     field public int fieldId;
     field public java.lang.String fieldName;
-    field public android.util.LocaleList hintLocales;
+    field public android.os.LocaleList hintLocales;
     field public java.lang.CharSequence hintText;
     field public int imeOptions;
     field public int initialCapsMode;
@@ -47942,7 +47938,7 @@ package android.widget {
     method public int getHyphenationFrequency();
     method public int getImeActionId();
     method public java.lang.CharSequence getImeActionLabel();
-    method public android.util.LocaleList getImeHintLocales();
+    method public android.os.LocaleList getImeHintLocales();
     method public int getImeOptions();
     method public boolean getIncludeFontPadding();
     method public android.os.Bundle getInputExtras(boolean);
@@ -47981,7 +47977,7 @@ package android.widget {
     method public java.lang.CharSequence getText();
     method public final android.content.res.ColorStateList getTextColors();
     method public java.util.Locale getTextLocale();
-    method public android.util.LocaleList getTextLocales();
+    method public android.os.LocaleList getTextLocales();
     method public float getTextScaleX();
     method public float getTextSize();
     method public int getTotalPaddingBottom();
@@ -48049,7 +48045,7 @@ package android.widget {
     method public void setHorizontallyScrolling(boolean);
     method public void setHyphenationFrequency(int);
     method public void setImeActionLabel(java.lang.CharSequence, int);
-    method public void setImeHintLocales(android.util.LocaleList);
+    method public void setImeHintLocales(android.os.LocaleList);
     method public void setImeOptions(int);
     method public void setIncludeFontPadding(boolean);
     method public void setInputExtras(int) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
@@ -48095,7 +48091,7 @@ package android.widget {
     method public final void setTextKeepState(java.lang.CharSequence);
     method public final void setTextKeepState(java.lang.CharSequence, android.widget.TextView.BufferType);
     method public void setTextLocale(java.util.Locale);
-    method public void setTextLocales(android.util.LocaleList);
+    method public void setTextLocales(android.os.LocaleList);
     method public void setTextScaleX(float);
     method public void setTextSize(float);
     method public void setTextSize(int, float);
index fa9bdb8..938755c 100644 (file)
@@ -3606,7 +3606,6 @@ package android.app {
     method public boolean isInMultiWindowMode();
     method public boolean isInPictureInPictureMode();
     method public boolean isLocalVoiceInteractionSupported();
-    method public boolean isOverlayWithDecorCaptionEnabled();
     method public boolean isTaskRoot();
     method public boolean isVoiceInteraction();
     method public boolean isVoiceInteractionRoot();
@@ -3729,7 +3728,6 @@ package android.app {
     method public void setImmersive(boolean);
     method public void setIntent(android.content.Intent);
     method public final void setMediaController(android.media.session.MediaController);
-    method public void setOverlayWithDecorCaptionEnabled(boolean);
     method public final deprecated void setProgress(int);
     method public final deprecated void setProgressBarIndeterminate(boolean);
     method public final deprecated void setProgressBarIndeterminateVisibility(boolean);
@@ -5070,7 +5068,7 @@ package android.app {
     field public static final int DEFAULT_VIBRATE = 2; // 0x2
     field public static final java.lang.String EXTRA_BACKGROUND_IMAGE_URI = "android.backgroundImageUri";
     field public static final java.lang.String EXTRA_BIG_TEXT = "android.bigText";
-    field public static final java.lang.String EXTRA_CHRONOMETER_COUNTS_DOWN = "android.chronometerCountsDown";
+    field public static final java.lang.String EXTRA_CHRONOMETER_COUNT_DOWN = "android.chronometerCountDown";
     field public static final java.lang.String EXTRA_COMPACT_ACTIONS = "android.compactActions";
     field public static final java.lang.String EXTRA_CONVERSATION_TITLE = "android.conversationTitle";
     field public static final java.lang.String EXTRA_INFO_TEXT = "android.infoText";
@@ -5231,7 +5229,7 @@ package android.app {
     method public android.app.Notification.Builder setActions(android.app.Notification.Action...);
     method public android.app.Notification.Builder setAutoCancel(boolean);
     method public android.app.Notification.Builder setCategory(java.lang.String);
-    method public android.app.Notification.Builder setChronometerCountsDown(boolean);
+    method public android.app.Notification.Builder setChronometerCountDown(boolean);
     method public android.app.Notification.Builder setColor(int);
     method public deprecated android.app.Notification.Builder setContent(android.widget.RemoteViews);
     method public deprecated android.app.Notification.Builder setContentInfo(java.lang.CharSequence);
@@ -10557,14 +10555,14 @@ package android.content.res {
     method public int diff(android.content.res.Configuration);
     method public boolean equals(android.content.res.Configuration);
     method public int getLayoutDirection();
-    method public android.util.LocaleList getLocales();
+    method public android.os.LocaleList getLocales();
     method public boolean isLayoutSizeAtLeast(int);
     method public boolean isScreenRound();
     method public static boolean needNewResources(int, int);
     method public void readFromParcel(android.os.Parcel);
     method public void setLayoutDirection(java.util.Locale);
     method public void setLocale(java.util.Locale);
-    method public void setLocales(android.util.LocaleList);
+    method public void setLocales(android.os.LocaleList);
     method public void setTo(android.content.res.Configuration);
     method public void setToDefaults();
     method public int updateFrom(android.content.res.Configuration);
@@ -12476,7 +12474,7 @@ package android.graphics {
     method public void getTextBounds(java.lang.String, int, int, android.graphics.Rect);
     method public void getTextBounds(char[], int, int, android.graphics.Rect);
     method public java.util.Locale getTextLocale();
-    method public android.util.LocaleList getTextLocales();
+    method public android.os.LocaleList getTextLocales();
     method public void getTextPath(char[], int, int, float, float, android.graphics.Path);
     method public void getTextPath(java.lang.String, int, int, float, float, android.graphics.Path);
     method public float getTextScaleX();
@@ -12532,7 +12530,7 @@ package android.graphics {
     method public void setSubpixelText(boolean);
     method public void setTextAlign(android.graphics.Paint.Align);
     method public void setTextLocale(java.util.Locale);
-    method public void setTextLocales(android.util.LocaleList);
+    method public void setTextLocales(android.os.LocaleList);
     method public void setTextScaleX(float);
     method public void setTextSize(float);
     method public void setTextSkewX(float);
@@ -31118,6 +31116,24 @@ package android.os {
     method public abstract android.os.IBinder asBinder();
   }
 
+  public final class LocaleList implements android.os.Parcelable {
+    ctor public LocaleList(java.util.Locale...);
+    method public int describeContents();
+    method public static android.os.LocaleList forLanguageTags(java.lang.String);
+    method public java.util.Locale get(int);
+    method public static android.os.LocaleList getAdjustedDefault();
+    method public static android.os.LocaleList getDefault();
+    method public static android.os.LocaleList getEmptyLocaleList();
+    method public java.util.Locale getFirstMatch(java.lang.String[]);
+    method public int indexOf(java.util.Locale);
+    method public boolean isEmpty();
+    method public static void setDefault(android.os.LocaleList);
+    method public int size();
+    method public java.lang.String toLanguageTags();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.os.LocaleList> CREATOR;
+  }
+
   public final class Looper {
     method public void dump(android.util.Printer, java.lang.String);
     method public static android.os.Looper getMainLooper();
@@ -31762,6 +31778,7 @@ package android.os {
     method public android.os.UserHandle getUserForSerialNumber(long);
     method public java.lang.String getUserName();
     method public java.util.List<android.os.UserHandle> getUserProfiles();
+    method public int getUserRestrictionSource(java.lang.String, android.os.UserHandle);
     method public android.os.Bundle getUserRestrictions();
     method public android.os.Bundle getUserRestrictions(android.os.UserHandle);
     method public boolean hasUserRestriction(java.lang.String);
@@ -31779,7 +31796,6 @@ package android.os {
     method public deprecated void setUserRestrictions(android.os.Bundle);
     method public deprecated void setUserRestrictions(android.os.Bundle, android.os.UserHandle);
     method public static boolean supportsMultipleUsers();
-    method public int getUserRestrictionSource(java.lang.String, android.os.UserHandle);
     field public static final java.lang.String ALLOW_PARENT_PROFILE_APP_LINKING = "allow_parent_profile_app_linking";
     field public static final java.lang.String DISALLOW_ADD_USER = "no_add_user";
     field public static final java.lang.String DISALLOW_ADJUST_VOLUME = "no_adjust_volume";
@@ -31815,12 +31831,12 @@ package android.os {
     field public static final java.lang.String DISALLOW_USB_FILE_TRANSFER = "no_usb_file_transfer";
     field public static final java.lang.String ENSURE_VERIFY_APPS = "ensure_verify_apps";
     field public static final java.lang.String KEY_RESTRICTIONS_PENDING = "restrictions_pending";
-    field public static final int USER_CREATION_FAILED_NOT_PERMITTED = 1; // 0x1
-    field public static final int USER_CREATION_FAILED_NO_MORE_USERS = 2; // 0x2
     field public static final int RESTRICTION_NOT_SET = 0; // 0x0
-    field public static final int RESTRICTION_SOURCE_SYSTEM = 1; // 0x1
     field public static final int RESTRICTION_SOURCE_DEVICE_OWNER = 2; // 0x2
     field public static final int RESTRICTION_SOURCE_PROFILE_OWNER = 4; // 0x4
+    field public static final int RESTRICTION_SOURCE_SYSTEM = 1; // 0x1
+    field public static final int USER_CREATION_FAILED_NOT_PERMITTED = 1; // 0x1
+    field public static final int USER_CREATION_FAILED_NO_MORE_USERS = 2; // 0x2
   }
 
   public static abstract class UserManager.UserRestrictionSource implements java.lang.annotation.Annotation {
@@ -31904,7 +31920,6 @@ package android.os.health {
   }
 
   public class SystemHealthManager {
-    method public static android.os.health.SystemHealthManager from(android.content.Context);
     method public android.os.health.HealthStats takeMyUidSnapshot();
     method public android.os.health.HealthStats takeUidSnapshot(int);
     method public android.os.health.HealthStats[] takeUidSnapshots(int[]);
@@ -42217,11 +42232,11 @@ package android.text.style {
 
   public class LocaleSpan extends android.text.style.MetricAffectingSpan implements android.text.ParcelableSpan {
     ctor public LocaleSpan(java.util.Locale);
-    ctor public LocaleSpan(android.util.LocaleList);
+    ctor public LocaleSpan(android.os.LocaleList);
     ctor public LocaleSpan(android.os.Parcel);
     method public int describeContents();
     method public java.util.Locale getLocale();
-    method public android.util.LocaleList getLocales();
+    method public android.os.LocaleList getLocales();
     method public int getSpanTypeId();
     method public void updateDrawState(android.text.TextPaint);
     method public void updateMeasureState(android.text.TextPaint);
@@ -43240,24 +43255,6 @@ package android.util {
     field public static final int RTL = 1; // 0x1
   }
 
-  public final class LocaleList implements android.os.Parcelable {
-    ctor public LocaleList(java.util.Locale...);
-    method public int describeContents();
-    method public static android.util.LocaleList forLanguageTags(java.lang.String);
-    method public java.util.Locale get(int);
-    method public static android.util.LocaleList getAdjustedDefault();
-    method public static android.util.LocaleList getDefault();
-    method public static android.util.LocaleList getEmptyLocaleList();
-    method public java.util.Locale getFirstMatch(java.lang.String[]);
-    method public int indexOf(java.util.Locale);
-    method public boolean isEmpty();
-    method public static void setDefault(android.util.LocaleList);
-    method public int size();
-    method public java.lang.String toLanguageTags();
-    method public void writeToParcel(android.os.Parcel, int);
-    field public static final android.os.Parcelable.Creator<android.util.LocaleList> CREATOR;
-  }
-
   public final class Log {
     method public static int d(java.lang.String, java.lang.String);
     method public static int d(java.lang.String, java.lang.String, java.lang.Throwable);
@@ -43828,7 +43825,6 @@ package android.view {
   }
 
   public static final class Display.HdrCapabilities implements android.os.Parcelable {
-    ctor public Display.HdrCapabilities(int[], float, float, float);
     method public int describeContents();
     method public float getDesiredMaxAverageLuminance();
     method public float getDesiredMaxLuminance();
@@ -47660,7 +47656,7 @@ package android.view.inputmethod {
     field public android.os.Bundle extras;
     field public int fieldId;
     field public java.lang.String fieldName;
-    field public android.util.LocaleList hintLocales;
+    field public android.os.LocaleList hintLocales;
     field public java.lang.CharSequence hintText;
     field public int imeOptions;
     field public int initialCapsMode;
@@ -51301,7 +51297,7 @@ package android.widget {
     method public int getHyphenationFrequency();
     method public int getImeActionId();
     method public java.lang.CharSequence getImeActionLabel();
-    method public android.util.LocaleList getImeHintLocales();
+    method public android.os.LocaleList getImeHintLocales();
     method public int getImeOptions();
     method public boolean getIncludeFontPadding();
     method public android.os.Bundle getInputExtras(boolean);
@@ -51340,7 +51336,7 @@ package android.widget {
     method public java.lang.CharSequence getText();
     method public final android.content.res.ColorStateList getTextColors();
     method public java.util.Locale getTextLocale();
-    method public android.util.LocaleList getTextLocales();
+    method public android.os.LocaleList getTextLocales();
     method public float getTextScaleX();
     method public float getTextSize();
     method public int getTotalPaddingBottom();
@@ -51408,7 +51404,7 @@ package android.widget {
     method public void setHorizontallyScrolling(boolean);
     method public void setHyphenationFrequency(int);
     method public void setImeActionLabel(java.lang.CharSequence, int);
-    method public void setImeHintLocales(android.util.LocaleList);
+    method public void setImeHintLocales(android.os.LocaleList);
     method public void setImeOptions(int);
     method public void setIncludeFontPadding(boolean);
     method public void setInputExtras(int) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
@@ -51454,7 +51450,7 @@ package android.widget {
     method public final void setTextKeepState(java.lang.CharSequence);
     method public final void setTextKeepState(java.lang.CharSequence, android.widget.TextView.BufferType);
     method public void setTextLocale(java.util.Locale);
-    method public void setTextLocales(android.util.LocaleList);
+    method public void setTextLocales(android.os.LocaleList);
     method public void setTextScaleX(float);
     method public void setTextSize(float);
     method public void setTextSize(int, float);
index d572c8d..0e8c594 100644 (file)
@@ -3479,7 +3479,6 @@ package android.app {
     method public boolean isInMultiWindowMode();
     method public boolean isInPictureInPictureMode();
     method public boolean isLocalVoiceInteractionSupported();
-    method public boolean isOverlayWithDecorCaptionEnabled();
     method public boolean isTaskRoot();
     method public boolean isVoiceInteraction();
     method public boolean isVoiceInteractionRoot();
@@ -3601,7 +3600,6 @@ package android.app {
     method public void setImmersive(boolean);
     method public void setIntent(android.content.Intent);
     method public final void setMediaController(android.media.session.MediaController);
-    method public void setOverlayWithDecorCaptionEnabled(boolean);
     method public final deprecated void setProgress(int);
     method public final deprecated void setProgressBarIndeterminate(boolean);
     method public final deprecated void setProgressBarIndeterminateVisibility(boolean);
@@ -4926,7 +4924,7 @@ package android.app {
     field public static final int DEFAULT_VIBRATE = 2; // 0x2
     field public static final java.lang.String EXTRA_BACKGROUND_IMAGE_URI = "android.backgroundImageUri";
     field public static final java.lang.String EXTRA_BIG_TEXT = "android.bigText";
-    field public static final java.lang.String EXTRA_CHRONOMETER_COUNTS_DOWN = "android.chronometerCountsDown";
+    field public static final java.lang.String EXTRA_CHRONOMETER_COUNT_DOWN = "android.chronometerCountDown";
     field public static final java.lang.String EXTRA_COMPACT_ACTIONS = "android.compactActions";
     field public static final java.lang.String EXTRA_CONVERSATION_TITLE = "android.conversationTitle";
     field public static final java.lang.String EXTRA_INFO_TEXT = "android.infoText";
@@ -5085,7 +5083,7 @@ package android.app {
     method public android.app.Notification.Builder setActions(android.app.Notification.Action...);
     method public android.app.Notification.Builder setAutoCancel(boolean);
     method public android.app.Notification.Builder setCategory(java.lang.String);
-    method public android.app.Notification.Builder setChronometerCountsDown(boolean);
+    method public android.app.Notification.Builder setChronometerCountDown(boolean);
     method public android.app.Notification.Builder setColor(int);
     method public deprecated android.app.Notification.Builder setContent(android.widget.RemoteViews);
     method public deprecated android.app.Notification.Builder setContentInfo(java.lang.CharSequence);
@@ -10129,14 +10127,14 @@ package android.content.res {
     method public int diff(android.content.res.Configuration);
     method public boolean equals(android.content.res.Configuration);
     method public int getLayoutDirection();
-    method public android.util.LocaleList getLocales();
+    method public android.os.LocaleList getLocales();
     method public boolean isLayoutSizeAtLeast(int);
     method public boolean isScreenRound();
     method public static boolean needNewResources(int, int);
     method public void readFromParcel(android.os.Parcel);
     method public void setLayoutDirection(java.util.Locale);
     method public void setLocale(java.util.Locale);
-    method public void setLocales(android.util.LocaleList);
+    method public void setLocales(android.os.LocaleList);
     method public void setTo(android.content.res.Configuration);
     method public void setToDefaults();
     method public int updateFrom(android.content.res.Configuration);
@@ -12048,7 +12046,7 @@ package android.graphics {
     method public void getTextBounds(java.lang.String, int, int, android.graphics.Rect);
     method public void getTextBounds(char[], int, int, android.graphics.Rect);
     method public java.util.Locale getTextLocale();
-    method public android.util.LocaleList getTextLocales();
+    method public android.os.LocaleList getTextLocales();
     method public void getTextPath(char[], int, int, float, float, android.graphics.Path);
     method public void getTextPath(java.lang.String, int, int, float, float, android.graphics.Path);
     method public float getTextScaleX();
@@ -12104,7 +12102,7 @@ package android.graphics {
     method public void setSubpixelText(boolean);
     method public void setTextAlign(android.graphics.Paint.Align);
     method public void setTextLocale(java.util.Locale);
-    method public void setTextLocales(android.util.LocaleList);
+    method public void setTextLocales(android.os.LocaleList);
     method public void setTextScaleX(float);
     method public void setTextSize(float);
     method public void setTextSkewX(float);
@@ -28744,6 +28742,24 @@ package android.os {
     method public abstract android.os.IBinder asBinder();
   }
 
+  public final class LocaleList implements android.os.Parcelable {
+    ctor public LocaleList(java.util.Locale...);
+    method public int describeContents();
+    method public static android.os.LocaleList forLanguageTags(java.lang.String);
+    method public java.util.Locale get(int);
+    method public static android.os.LocaleList getAdjustedDefault();
+    method public static android.os.LocaleList getDefault();
+    method public static android.os.LocaleList getEmptyLocaleList();
+    method public java.util.Locale getFirstMatch(java.lang.String[]);
+    method public int indexOf(java.util.Locale);
+    method public boolean isEmpty();
+    method public static void setDefault(android.os.LocaleList);
+    method public int size();
+    method public java.lang.String toLanguageTags();
+    method public void writeToParcel(android.os.Parcel, int);
+    field public static final android.os.Parcelable.Creator<android.os.LocaleList> CREATOR;
+  }
+
   public final class Looper {
     method public void dump(android.util.Printer, java.lang.String);
     method public static android.os.Looper getMainLooper();
@@ -29438,7 +29454,6 @@ package android.os.health {
   }
 
   public class SystemHealthManager {
-    method public static android.os.health.SystemHealthManager from(android.content.Context);
     method public android.os.health.HealthStats takeMyUidSnapshot();
     method public android.os.health.HealthStats takeUidSnapshot(int);
     method public android.os.health.HealthStats[] takeUidSnapshots(int[]);
@@ -39294,11 +39309,11 @@ package android.text.style {
 
   public class LocaleSpan extends android.text.style.MetricAffectingSpan implements android.text.ParcelableSpan {
     ctor public LocaleSpan(java.util.Locale);
-    ctor public LocaleSpan(android.util.LocaleList);
+    ctor public LocaleSpan(android.os.LocaleList);
     ctor public LocaleSpan(android.os.Parcel);
     method public int describeContents();
     method public java.util.Locale getLocale();
-    method public android.util.LocaleList getLocales();
+    method public android.os.LocaleList getLocales();
     method public int getSpanTypeId();
     method public void updateDrawState(android.text.TextPaint);
     method public void updateMeasureState(android.text.TextPaint);
@@ -40317,24 +40332,6 @@ package android.util {
     field public static final int RTL = 1; // 0x1
   }
 
-  public final class LocaleList implements android.os.Parcelable {
-    ctor public LocaleList(java.util.Locale...);
-    method public int describeContents();
-    method public static android.util.LocaleList forLanguageTags(java.lang.String);
-    method public java.util.Locale get(int);
-    method public static android.util.LocaleList getAdjustedDefault();
-    method public static android.util.LocaleList getDefault();
-    method public static android.util.LocaleList getEmptyLocaleList();
-    method public java.util.Locale getFirstMatch(java.lang.String[]);
-    method public int indexOf(java.util.Locale);
-    method public boolean isEmpty();
-    method public static void setDefault(android.util.LocaleList);
-    method public int size();
-    method public java.lang.String toLanguageTags();
-    method public void writeToParcel(android.os.Parcel, int);
-    field public static final android.os.Parcelable.Creator<android.util.LocaleList> CREATOR;
-  }
-
   public final class Log {
     method public static int d(java.lang.String, java.lang.String);
     method public static int d(java.lang.String, java.lang.String, java.lang.Throwable);
@@ -40905,7 +40902,6 @@ package android.view {
   }
 
   public static final class Display.HdrCapabilities implements android.os.Parcelable {
-    ctor public Display.HdrCapabilities(int[], float, float, float);
     method public int describeContents();
     method public float getDesiredMaxAverageLuminance();
     method public float getDesiredMaxLuminance();
@@ -44734,7 +44730,7 @@ package android.view.inputmethod {
     field public android.os.Bundle extras;
     field public int fieldId;
     field public java.lang.String fieldName;
-    field public android.util.LocaleList hintLocales;
+    field public android.os.LocaleList hintLocales;
     field public java.lang.CharSequence hintText;
     field public int imeOptions;
     field public int initialCapsMode;
@@ -48021,7 +48017,7 @@ package android.widget {
     method public int getHyphenationFrequency();
     method public int getImeActionId();
     method public java.lang.CharSequence getImeActionLabel();
-    method public android.util.LocaleList getImeHintLocales();
+    method public android.os.LocaleList getImeHintLocales();
     method public int getImeOptions();
     method public boolean getIncludeFontPadding();
     method public android.os.Bundle getInputExtras(boolean);
@@ -48060,7 +48056,7 @@ package android.widget {
     method public java.lang.CharSequence getText();
     method public final android.content.res.ColorStateList getTextColors();
     method public java.util.Locale getTextLocale();
-    method public android.util.LocaleList getTextLocales();
+    method public android.os.LocaleList getTextLocales();
     method public float getTextScaleX();
     method public float getTextSize();
     method public int getTotalPaddingBottom();
@@ -48128,7 +48124,7 @@ package android.widget {
     method public void setHorizontallyScrolling(boolean);
     method public void setHyphenationFrequency(int);
     method public void setImeActionLabel(java.lang.CharSequence, int);
-    method public void setImeHintLocales(android.util.LocaleList);
+    method public void setImeHintLocales(android.os.LocaleList);
     method public void setImeOptions(int);
     method public void setIncludeFontPadding(boolean);
     method public void setInputExtras(int) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
@@ -48174,7 +48170,7 @@ package android.widget {
     method public final void setTextKeepState(java.lang.CharSequence);
     method public final void setTextKeepState(java.lang.CharSequence, android.widget.TextView.BufferType);
     method public void setTextLocale(java.util.Locale);
-    method public void setTextLocales(android.util.LocaleList);
+    method public void setTextLocales(android.os.LocaleList);
     method public void setTextScaleX(float);
     method public void setTextSize(float);
     method public void setTextSize(int, float);
index 59edc8c..6d405f6 100644 (file)
@@ -7007,6 +7007,8 @@ public class Activity extends ContextThemeWrapper
      * @return True if caption is displayed on content, false if it pushes the content down.
      *
      * @see {@link #setOverlayWithDecorCaptionEnabled(boolean)}
+     *
+     * @hide
      */
     public boolean isOverlayWithDecorCaptionEnabled() {
         return mWindow.isOverlayWithDecorCaptionEnabled();
@@ -7018,6 +7020,8 @@ public class Activity extends ContextThemeWrapper
      * This affects only freeform windows since they display the caption and only the main
      * window of the activity. The caption is used to drag the window around and also shows
      * maximize and close action buttons.
+     *
+     * @hide
      */
     public void setOverlayWithDecorCaptionEnabled(boolean enabled) {
         mWindow.setOverlayWithDecorCaptionEnabled(enabled);
index 7d43a11..3f87000 100644 (file)
@@ -1046,11 +1046,17 @@ public final class LoadedApk {
             @Override
             public void performReceive(Intent intent, int resultCode, String data,
                     Bundle extras, boolean ordered, boolean sticky, int sendingUser) {
-                LoadedApk.ReceiverDispatcher rd = mDispatcher.get();
+                final LoadedApk.ReceiverDispatcher rd;
+                if (intent == null) {
+                    Log.wtf(TAG, "Null intent received");
+                    rd = null;
+                } else {
+                    rd = mDispatcher.get();
+                }
                 if (ActivityThread.DEBUG_BROADCAST) {
                     int seq = intent.getIntExtra("seq", -1);
-                    Slog.i(ActivityThread.TAG, "Receiving broadcast " + intent.getAction() + " seq=" + seq
-                            + " to " + (rd != null ? rd.mReceiver : null));
+                    Slog.i(ActivityThread.TAG, "Receiving broadcast " + intent.getAction()
+                            + " seq=" + seq + " to " + (rd != null ? rd.mReceiver : null));
                 }
                 if (rd != null) {
                     rd.performReceive(intent, resultCode, data, extras,
index 460640e..a666e66 100644 (file)
@@ -55,11 +55,9 @@ import android.text.style.RelativeSizeSpan;
 import android.text.style.TextAppearanceSpan;
 import android.util.Log;
 import android.util.SparseArray;
-import android.util.TypedValue;
 import android.view.Gravity;
 import android.view.NotificationHeaderView;
 import android.view.View;
-import android.view.ViewGroup;
 import android.widget.ProgressBar;
 import android.widget.RemoteViews;
 
@@ -867,8 +865,9 @@ public class Notification implements Parcelable
     /**
      * {@link #extras} key: whether the chronometer set on the notification should count down
      * instead of counting up. Is only relevant if key {@link #EXTRA_SHOW_CHRONOMETER} is present.
+     * This extra is a boolean. The default is false.
      */
-    public static final String EXTRA_CHRONOMETER_COUNTS_DOWN = "android.chronometerCountsDown";
+    public static final String EXTRA_CHRONOMETER_COUNT_DOWN = "android.chronometerCountDown";
 
     /**
      * {@link #extras} key: whether {@link #when} should be shown,
@@ -934,12 +933,13 @@ public class Notification implements Parcelable
     /**
      * {@link #extras} key: the username to be displayed for all messages sent by the user including
      * direct replies
-     * {@link android.app.Notification.MessagingStyle} notification.
+     * {@link android.app.Notification.MessagingStyle} notification. This extra is a
+     * {@link CharSequence}
      */
     public static final String EXTRA_SELF_DISPLAY_NAME = "android.selfDisplayName";
 
     /**
-     * {@link #extras} key: a {@link String} to be displayed as the title to a conversation
+     * {@link #extras} key: a {@link CharSequence} to be displayed as the title to a conversation
      * represented by a {@link android.app.Notification.MessagingStyle}
      */
     public static final String EXTRA_CONVERSATION_TITLE = "android.conversationTitle";
@@ -947,7 +947,8 @@ public class Notification implements Parcelable
     /**
      * {@link #extras} key: an array of {@link android.app.Notification.MessagingStyle.Message}
      * bundles provided by a
-     * {@link android.app.Notification.MessagingStyle} notification.
+     * {@link android.app.Notification.MessagingStyle} notification. This extra is a parcelable
+     * array of bundles.
      */
     public static final String EXTRA_MESSAGES = "android.messages";
 
@@ -2337,11 +2338,11 @@ public class Notification implements Parcelable
          * Useful when showing an elapsed time (like an ongoing phone call).
          *
          * The counter can also be set to count down to <code>when</code> when using
-         * {@link #setChronometerCountsDown(boolean)}.
+         * {@link #setChronometerCountDown(boolean)}.
          *
          * @see android.widget.Chronometer
          * @see Notification#when
-         * @see #setChronometerCountsDown(boolean)
+         * @see #setChronometerCountDown(boolean)
          */
         public Builder setUsesChronometer(boolean b) {
             mN.extras.putBoolean(EXTRA_SHOW_CHRONOMETER, b);
@@ -2356,8 +2357,8 @@ public class Notification implements Parcelable
          *
          * @see #setUsesChronometer(boolean)
          */
-        public Builder setChronometerCountsDown(boolean countsDown) {
-            mN.extras.putBoolean(EXTRA_CHRONOMETER_COUNTS_DOWN, countsDown);
+        public Builder setChronometerCountDown(boolean countDown) {
+            mN.extras.putBoolean(EXTRA_CHRONOMETER_COUNT_DOWN, countDown);
             return this;
         }
 
@@ -3288,7 +3289,7 @@ public class Notification implements Parcelable
                     contentView.setLong(R.id.chronometer, "setBase",
                             mN.when + (SystemClock.elapsedRealtime() - System.currentTimeMillis()));
                     contentView.setBoolean(R.id.chronometer, "setStarted", true);
-                    boolean countsDown = mN.extras.getBoolean(EXTRA_CHRONOMETER_COUNTS_DOWN);
+                    boolean countsDown = mN.extras.getBoolean(EXTRA_CHRONOMETER_COUNT_DOWN);
                     contentView.setChronometerCountDown(R.id.chronometer, countsDown);
                 } else {
                     contentView.setViewVisibility(R.id.time, View.VISIBLE);
@@ -3559,8 +3560,8 @@ public class Notification implements Parcelable
                     savedBundle.getBoolean(EXTRA_SHOW_WHEN));
             publicExtras.putBoolean(EXTRA_SHOW_CHRONOMETER,
                     savedBundle.getBoolean(EXTRA_SHOW_CHRONOMETER));
-            publicExtras.putBoolean(EXTRA_CHRONOMETER_COUNTS_DOWN,
-                    savedBundle.getBoolean(EXTRA_CHRONOMETER_COUNTS_DOWN));
+            publicExtras.putBoolean(EXTRA_CHRONOMETER_COUNT_DOWN,
+                    savedBundle.getBoolean(EXTRA_CHRONOMETER_COUNT_DOWN));
             publicExtras.putCharSequence(EXTRA_TITLE,
                     mContext.getString(R.string.notification_hidden_text));
             mN.extras = publicExtras;
@@ -4459,8 +4460,8 @@ public class Notification implements Parcelable
             super.restoreFromExtras(extras);
 
             mMessages.clear();
-            mUserDisplayName = extras.getString(EXTRA_SELF_DISPLAY_NAME);
-            mConversationTitle = extras.getString(EXTRA_CONVERSATION_TITLE);
+            mUserDisplayName = extras.getCharSequence(EXTRA_SELF_DISPLAY_NAME);
+            mConversationTitle = extras.getCharSequence(EXTRA_CONVERSATION_TITLE);
             Parcelable[] parcelables = extras.getParcelableArray(EXTRA_MESSAGES);
             if (parcelables != null && parcelables instanceof Parcelable[]) {
                 mMessages = Message.getMessagesFromBundleArray(parcelables);
@@ -4726,8 +4727,7 @@ public class Notification implements Parcelable
 
             static Message getMessageFromBundle(Bundle bundle) {
                 try {
-                    if (!bundle.containsKey(KEY_TEXT) || !bundle.containsKey(KEY_TIMESTAMP) ||
-                            !bundle.containsKey(KEY_SENDER)) {
+                    if (!bundle.containsKey(KEY_TEXT) || !bundle.containsKey(KEY_TIMESTAMP)) {
                         return null;
                     } else {
                         Message message = new Message(bundle.getCharSequence(KEY_TEXT),
index f411178..b4e9db8 100644 (file)
@@ -29,10 +29,10 @@ import android.content.res.ResourcesImpl;
 import android.content.res.ResourcesKey;
 import android.hardware.display.DisplayManagerGlobal;
 import android.os.IBinder;
+import android.os.LocaleList;
 import android.os.Trace;
 import android.util.ArrayMap;
 import android.util.DisplayMetrics;
-import android.util.LocaleList;
 import android.util.Log;
 import android.util.Pair;
 import android.util.Slog;
index 2d0e74c..29e5b5d 100644 (file)
@@ -28,10 +28,10 @@ import android.annotation.Nullable;
 import android.content.pm.ActivityInfo;
 import android.content.pm.ActivityInfo.Config;
 import android.os.Build;
+import android.os.LocaleList;
 import android.os.Parcel;
 import android.os.Parcelable;
 import android.text.TextUtils;
-import android.util.LocaleList;
 import android.view.View;
 
 import java.io.IOException;
index 110df5d..dada612 100644 (file)
@@ -35,10 +35,10 @@ import android.graphics.drawable.ColorDrawable;
 import android.graphics.drawable.Drawable;
 import android.icu.text.PluralRules;
 import android.os.Build;
+import android.os.LocaleList;
 import android.os.Trace;
 import android.util.AttributeSet;
 import android.util.DisplayMetrics;
-import android.util.LocaleList;
 import android.util.Log;
 import android.util.LongSparseArray;
 import android.util.Slog;
index 2cafa08..d395578 100644 (file)
@@ -17,9 +17,9 @@
 package android.hardware.input;
 
 import android.annotation.NonNull;
+import android.os.LocaleList;
 import android.os.Parcel;
 import android.os.Parcelable;
-import android.util.LocaleList;
 
 import java.util.Locale;
 
similarity index 96%
rename from core/java/android/util/LocaleList.aidl
rename to core/java/android/os/LocaleList.aidl
index f5de354..acb3648 100644 (file)
@@ -14,6 +14,6 @@
  * limitations under the License.
  */
 
-package android.util;
+package android.os;
 
 parcelable LocaleList;
similarity index 99%
rename from core/java/android/util/LocaleList.java
rename to core/java/android/os/LocaleList.java
index 3c3db58..8136796 100644 (file)
  * limitations under the License.
  */
 
-package android.util;
+package android.os;
 
 import android.annotation.IntRange;
 import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.annotation.Size;
 import android.icu.util.ULocale;
-import android.os.Parcel;
-import android.os.Parcelable;
 
 import com.android.internal.annotations.GuardedBy;
 
index 7c37fa4..32e8425 100644 (file)
@@ -53,6 +53,8 @@ public class SystemHealthManager {
 
     /**
      * Obtain a SystemHealthManager object for the supplied context.
+     *
+     * @hide
      */
     public static SystemHealthManager from(Context context) {
         return (SystemHealthManager)context.getSystemService(Context.SYSTEM_HEALTH_SERVICE);
index 76f5175..8cc165d 100755 (executable)
@@ -48,6 +48,7 @@ import android.os.Binder;
 import android.os.Bundle;
 import android.os.DropBoxManager;
 import android.os.IBinder;
+import android.os.LocaleList;
 import android.os.Process;
 import android.os.RemoteException;
 import android.os.ServiceManager;
@@ -58,7 +59,6 @@ import android.text.TextUtils;
 import android.util.AndroidException;
 import android.util.ArrayMap;
 import android.util.ArraySet;
-import android.util.LocaleList;
 import android.util.Log;
 
 import android.util.MemoryIntArray;
@@ -2650,7 +2650,7 @@ public final class Settings {
          * The serialized system locale value.
          *
          * Do not use this value directory.
-         * To get system locale, use {@link android.util.LocaleList#getDefault} instead.
+         * To get system locale, use {@link LocaleList#getDefault} instead.
          * To update system locale, use {@link com.android.internal.app.LocalePicker#updateLocales}
          * instead.
          * @hide
index 91990df..b842851 100644 (file)
@@ -21,11 +21,11 @@ import com.android.internal.util.Preconditions;
 import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.graphics.Paint;
+import android.os.LocaleList;
 import android.os.Parcel;
 import android.text.ParcelableSpan;
 import android.text.TextPaint;
 import android.text.TextUtils;
-import android.util.LocaleList;
 
 import java.util.Locale;
 
index 48eee05..2f2fe57 100644 (file)
@@ -1168,6 +1168,9 @@ public final class Display {
         public HdrCapabilities() {
         }
 
+        /**
+         * @hide
+         */
         public HdrCapabilities(int[] supportedHdrTypes, float maxLuminance,
                 float maxAverageLuminance, float minLuminance) {
             mSupportedHdrTypes = supportedHdrTypes;
index ccb5ec4..d59c8ac 100644 (file)
@@ -82,6 +82,13 @@ import java.util.concurrent.locks.ReentrantLock;
  * and
  * {@link SurfaceHolder.Callback#surfaceDestroyed SurfaceHolder.Callback.surfaceDestroyed()}.
  * </ul>
+ *
+ * <p class="note"><strong>Note:</strong> Starting in platform version
+ * {@link android.os.Build.VERSION_CODES#N}, SurfaceView's window position is
+ * updated synchronously with other View rendering. This means that translating
+ * and scaling a SurfaceView on screen will not cause rendering artifacts. Such
+ * artifacts may occur on previous versions of the platform when its window is
+ * positioned asynchronously.</p>
  */
 public class SurfaceView extends View {
     static private final String TAG = "SurfaceView";
index 85893b0..7b7ccae 100644 (file)
@@ -18,11 +18,11 @@ package android.view.inputmethod;
 
 import android.annotation.Nullable;
 import android.os.Bundle;
+import android.os.LocaleList;
 import android.os.Parcel;
 import android.os.Parcelable;
 import android.text.InputType;
 import android.text.TextUtils;
-import android.util.LocaleList;
 import android.util.Printer;
 
 /**
index 2813f0c..622567c 100644 (file)
@@ -42,6 +42,7 @@ import android.graphics.RectF;
 import android.graphics.drawable.ColorDrawable;
 import android.graphics.drawable.Drawable;
 import android.os.Bundle;
+import android.os.LocaleList;
 import android.os.Parcel;
 import android.os.Parcelable;
 import android.os.ParcelableParcel;
@@ -70,7 +71,6 @@ import android.text.style.SuggestionSpan;
 import android.text.style.TextAppearanceSpan;
 import android.text.style.URLSpan;
 import android.util.DisplayMetrics;
-import android.util.LocaleList;
 import android.util.Log;
 import android.util.SparseArray;
 import android.view.ActionMode;
index a0843c7..3909307 100644 (file)
@@ -52,6 +52,7 @@ import android.graphics.Typeface;
 import android.graphics.drawable.Drawable;
 import android.os.AsyncTask;
 import android.os.Bundle;
+import android.os.LocaleList;
 import android.os.Parcel;
 import android.os.Parcelable;
 import android.os.ParcelableParcel;
@@ -107,7 +108,6 @@ import android.text.style.URLSpan;
 import android.text.style.UpdateAppearance;
 import android.text.util.Linkify;
 import android.util.AttributeSet;
-import android.util.LocaleList;
 import android.util.Log;
 import android.util.TypedValue;
 import android.view.AccessibilityIterators.TextSegmentIterator;
index 7e9587a..106999b 100644 (file)
@@ -18,7 +18,7 @@ package com.android.internal.app;
 
 import android.icu.text.ListFormatter;
 import android.icu.util.ULocale;
-import android.util.LocaleList;
+import android.os.LocaleList;
 
 import java.text.Collator;
 import java.util.Comparator;
index b1b019c..472f583 100644 (file)
@@ -26,9 +26,9 @@ import android.content.Context;
 import android.content.res.Configuration;
 import android.content.res.Resources;
 import android.os.Bundle;
+import android.os.LocaleList;
 import android.os.RemoteException;
 import android.provider.Settings;
-import android.util.LocaleList;
 import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.View;
index ea62899..04929a7 100644 (file)
@@ -21,8 +21,8 @@ import android.app.FragmentTransaction;
 import android.app.ListFragment;
 import android.content.Context;
 import android.os.Bundle;
+import android.os.LocaleList;
 import android.text.TextUtils;
-import android.util.LocaleList;
 import android.view.Menu;
 import android.view.MenuInflater;
 import android.view.MenuItem;
index 80d6070..8c5df08 100644 (file)
@@ -277,7 +277,7 @@ public final class ProcessState {
         if (!mDead) {
             return;
         }
-        Slog.wtfStack(TAG, "ProcessState dead: name=" + mName
+        Slog.w(TAG, "ProcessState dead: name=" + mName
                 + " pkg=" + mPackage + " uid=" + mUid + " common.name=" + mCommonProcess.mName);
     }
 
index 6dc0c60..a028449 100644 (file)
@@ -26,13 +26,13 @@ import android.content.pm.ApplicationInfo;
 import android.content.pm.IPackageManager;
 import android.content.pm.PackageManager;
 import android.content.res.Resources;
+import android.os.LocaleList;
 import android.os.RemoteException;
 import android.provider.Settings;
 import android.text.TextUtils;
 import android.text.TextUtils.SimpleStringSplitter;
 import android.util.ArrayMap;
 import android.util.ArraySet;
-import android.util.LocaleList;
 import android.util.Pair;
 import android.util.Printer;
 import android.util.Slog;
index 2aa660e..b18f83c 100644 (file)
@@ -22,7 +22,7 @@ import android.annotation.IntRange;
 import android.annotation.NonNull;
 import android.annotation.Nullable;
 import android.icu.util.ULocale;
-import android.util.LocaleList;
+import android.os.LocaleList;
 
 import java.util.ArrayList;
 import java.util.Arrays;
index b781fd4..28281b3 100644 (file)
@@ -109,9 +109,15 @@ public class BackdropFrameRenderer extends Thread implements Choreographer.Frame
             Drawable captionBackgroundDrawableDrawable, Drawable userCaptionBackgroundDrawable,
             int statusBarColor, int navigationBarColor) {
         mDecorView = decorView;
-        mResizingBackgroundDrawable = resizingBackgroundDrawable;
-        mCaptionBackgroundDrawable = captionBackgroundDrawableDrawable;
-        mUserCaptionBackgroundDrawable = userCaptionBackgroundDrawable;
+        mResizingBackgroundDrawable = resizingBackgroundDrawable != null
+                ? resizingBackgroundDrawable.getConstantState().newDrawable()
+                : null;
+        mCaptionBackgroundDrawable = captionBackgroundDrawableDrawable != null
+                ? captionBackgroundDrawableDrawable.getConstantState().newDrawable()
+                : null;
+        mUserCaptionBackgroundDrawable = userCaptionBackgroundDrawable != null
+                ? userCaptionBackgroundDrawable.getConstantState().newDrawable()
+                : null;
         if (mCaptionBackgroundDrawable == null) {
             mCaptionBackgroundDrawable = mResizingBackgroundDrawable;
         }
index d4bb0f3..39a2907 100644 (file)
@@ -18,9 +18,9 @@ package android.content.res;
 import android.annotation.NonNull;
 import android.app.ResourcesManager;
 import android.os.Binder;
+import android.os.LocaleList;
 import android.support.test.filters.SmallTest;
 import android.util.DisplayMetrics;
-import android.util.LocaleList;
 import android.util.TypedValue;
 import android.view.Display;
 import junit.framework.TestCase;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package android.util;
+package android.os;
 
 import android.test.suitebuilder.annotation.SmallTest;
-import android.util.LocaleList;
 
 import java.util.Locale;
 
index d56a405..2c2ee8c 100644 (file)
@@ -29,6 +29,7 @@ import android.content.pm.PackageManager;
 import android.content.res.Configuration;
 import android.content.res.Resources;
 import android.os.CancellationSignal;
+import android.os.LocaleList;
 import android.os.ParcelFileDescriptor;
 import android.os.SystemClock;
 import android.print.PrintAttributes;
@@ -43,7 +44,6 @@ import android.printservice.PrintJob;
 import android.printservice.PrintService;
 import android.test.InstrumentationTestCase;
 import android.util.DisplayMetrics;
-import android.util.LocaleList;
 
 import org.mockito.stubbing.Answer;
 
index 6b5e4ad..97ea885 100644 (file)
@@ -22,12 +22,12 @@ import android.content.pm.ResolveInfo;
 import android.content.pm.ServiceInfo;
 import android.content.res.Configuration;
 import android.content.res.Resources;
+import android.os.LocaleList;
 import android.os.Parcel;
 import android.test.InstrumentationTestCase;
 import android.test.suitebuilder.annotation.SmallTest;
 import android.util.ArrayMap;
 import android.util.ArraySet;
-import android.util.LocaleList;
 import android.view.inputmethod.InputMethodInfo;
 import android.view.inputmethod.InputMethodSubtype.InputMethodSubtypeBuilder;
 import android.view.inputmethod.InputMethodSubtype;
index deba40f..cd339fb 100644 (file)
@@ -16,9 +16,9 @@
 
 package com.android.internal.inputmethod;
 
+import android.os.LocaleList;
 import android.test.InstrumentationTestCase;
 import android.test.suitebuilder.annotation.SmallTest;
-import android.util.LocaleList;
 
 import java.util.ArrayList;
 import java.util.Locale;
index c61837b..31e37bf 100644 (file)
@@ -247,86 +247,86 @@ var VERSION_NAMES =
   {"api":0},{"api":1},{"api":2},{"api":3},
   {
     "api":4,
-    "link":"<a href='/about/versions/android-1.6.html'>1.6</a>",
+    "link":'<a href="/about/versions/android-1.6.html">1.6</a>',
     "codename":"Donut",
   },
   { "api":5},
   { "api":6},
   {
     "api":7,
-    "link":"<a href='/about/versions/android-2.1.html'>2.1</a>",
+    "link":'<a href="/about/versions/android-2.1.html">2.1</a>',
     "codename":"Eclair",
   },
   {
     "api":8,
-    "link":"<a href='/about/versions/android-2.2.html'>2.2</a>",
+    "link":'<a href="/about/versions/android-2.2.html">2.2</a>',
     "codename":"Froyo"
   },
   {
     "api":9,
-    "link":"<a href='/about/versions/android-2.3.html'>2.3 -<br>2.3.2</a>",
+    "link":'<a href="/about/versions/android-2.3.html">2.3 -<br>2.3.2</a>',
     "codename":"Gingerbread"
   },
   {
     "api":10,
-    "link":"<a href='/about/versions/android-2.3.3.html'>2.3.3 -<br>2.3.7</a>",
+    "link":'<a href="/about/versions/android-2.3.3.html">2.3.3 -<br>2.3.7</a>',
     "codename":"Gingerbread"
   },
   { "api":11},
   {
     "api":12,
-    "link":"<a href='/about/versions/android-3.1.html'>3.1</a>",
+    "link":'<a href="/about/versions/android-3.1.html">3.1</a>',
     "codename":"Honeycomb"
   },
   {
     "api":13,
-    "link":"<a href='/about/versions/android-3.2.html'>3.2</a>",
+    "link":'<a href="/about/versions/android-3.2.html">3.2</a>',
     "codename":"Honeycomb"
   },
   { "api":14},
   {
     "api":15,
-    "link":"<a href='/about/versions/android-4.0.html'>4.0.3 -<br>4.0.4</a>",
+    "link":'<a href="/about/versions/android-4.0.html">4.0.3 -<br>4.0.4</a>',
     "codename":"Ice Cream Sandwich"
   },
   {
     "api":16,
-    "link":"<a href='/about/versions/android-4.1.html'>4.1.x</a>",
+    "link":'<a href="/about/versions/android-4.1.html">4.1.x</a>',
     "codename":"Jelly Bean"
   },
   {
     "api":17,
-    "link":"<a href='/about/versions/android-4.2.html'>4.2.x</a>",
+    "link":'<a href="/about/versions/android-4.2.html">4.2.x</a>',
     "codename":"Jelly Bean"
   },
   {
     "api":18,
-    "link":"<a href='/about/versions/android-4.3.html'>4.3</a>",
+    "link":'<a href="/about/versions/android-4.3.html">4.3</a>',
     "codename":"Jelly Bean"
   },
   {
     "api":19,
-    "link":"<a href='/about/versions/android-4.4.html'>4.4</a>",
+    "link":'<a href="/about/versions/android-4.4.html">4.4</a>',
     "codename":"KitKat"
   },
   {
     "api":20,
-    "link":"<a href='/about/versions/android-4.4.html'>4.4W</a>",
+    "link":'<a href="/about/versions/android-4.4.html">4.4W</a>',
     "codename":"KitKat for Wear"
   },
   {
     "api":21,
-    "link":"<a href='/about/versions/android-5.0.html'>5.0</a>",
+    "link":'<a href="/about/versions/android-5.0.html">5.0</a>',
     "codename":"Lollipop"
   },
   {
     "api":22,
-    "link":"<a href='/about/versions/android-5.1.html'>5.1</a>",
+    "link":'<a href="/about/versions/android-5.1.html">5.1</a>',
     "codename":"Lollipop"
   },
   {
     "api":23,
-    "link":"<a href='/about/versions/marshmallow/index.html'>6.0</a>",
+    "link":'<a href="/about/versions/marshmallow/index.html">6.0</a>',
     "codename":"Marshmallow"
   }
 ];
diff --git a/docs/html/images/topic/instant-apps/3D-Image-viewer.gif b/docs/html/images/topic/instant-apps/3D-Image-viewer.gif
new file mode 100644 (file)
index 0000000..b46f2d9
Binary files /dev/null and b/docs/html/images/topic/instant-apps/3D-Image-viewer.gif differ
diff --git a/docs/html/images/topic/instant-apps/BandH-Photo.gif b/docs/html/images/topic/instant-apps/BandH-Photo.gif
new file mode 100644 (file)
index 0000000..fa2cdfc
Binary files /dev/null and b/docs/html/images/topic/instant-apps/BandH-Photo.gif differ
diff --git a/docs/html/images/topic/instant-apps/Buzzfeed.gif b/docs/html/images/topic/instant-apps/Buzzfeed.gif
new file mode 100644 (file)
index 0000000..af7cc66
Binary files /dev/null and b/docs/html/images/topic/instant-apps/Buzzfeed.gif differ
diff --git a/docs/html/images/topic/instant-apps/Park-and-Pay.gif b/docs/html/images/topic/instant-apps/Park-and-Pay.gif
new file mode 100644 (file)
index 0000000..f5cbfb0
Binary files /dev/null and b/docs/html/images/topic/instant-apps/Park-and-Pay.gif differ
diff --git a/docs/html/images/topic/instant-apps/instant-apps-section-2.png b/docs/html/images/topic/instant-apps/instant-apps-section-2.png
new file mode 100644 (file)
index 0000000..8060c57
Binary files /dev/null and b/docs/html/images/topic/instant-apps/instant-apps-section-2.png differ
diff --git a/docs/html/images/topic/instant-apps/instant-apps-section-4.png b/docs/html/images/topic/instant-apps/instant-apps-section-4.png
new file mode 100644 (file)
index 0000000..8e0fcf8
Binary files /dev/null and b/docs/html/images/topic/instant-apps/instant-apps-section-4.png differ
diff --git a/docs/html/images/topic/instant-apps/instant-apps-section-5.png b/docs/html/images/topic/instant-apps/instant-apps-section-5.png
new file mode 100644 (file)
index 0000000..e92ec80
Binary files /dev/null and b/docs/html/images/topic/instant-apps/instant-apps-section-5.png differ
diff --git a/docs/html/images/topic/instant-apps/play-services-features-2x.png b/docs/html/images/topic/instant-apps/play-services-features-2x.png
new file mode 100644 (file)
index 0000000..098f91c
Binary files /dev/null and b/docs/html/images/topic/instant-apps/play-services-features-2x.png differ
diff --git a/docs/html/images/topic/instant-apps/s3-BandH-animated.gif b/docs/html/images/topic/instant-apps/s3-BandH-animated.gif
new file mode 100644 (file)
index 0000000..efa8827
Binary files /dev/null and b/docs/html/images/topic/instant-apps/s3-BandH-animated.gif differ
diff --git a/docs/html/images/topic/instant-apps/s3-BandH-static.png b/docs/html/images/topic/instant-apps/s3-BandH-static.png
new file mode 100644 (file)
index 0000000..004afb7
Binary files /dev/null and b/docs/html/images/topic/instant-apps/s3-BandH-static.png differ
diff --git a/docs/html/images/topic/instant-apps/s3-BuzzFeed-animated.gif b/docs/html/images/topic/instant-apps/s3-BuzzFeed-animated.gif
new file mode 100644 (file)
index 0000000..16c4619
Binary files /dev/null and b/docs/html/images/topic/instant-apps/s3-BuzzFeed-animated.gif differ
diff --git a/docs/html/images/topic/instant-apps/s3-BuzzFeed-static.png b/docs/html/images/topic/instant-apps/s3-BuzzFeed-static.png
new file mode 100644 (file)
index 0000000..cdd0dc8
Binary files /dev/null and b/docs/html/images/topic/instant-apps/s3-BuzzFeed-static.png differ
diff --git a/docs/html/images/topic/instant-apps/s3-ParkandPay-animated.gif b/docs/html/images/topic/instant-apps/s3-ParkandPay-animated.gif
new file mode 100644 (file)
index 0000000..f5cbfb0
Binary files /dev/null and b/docs/html/images/topic/instant-apps/s3-ParkandPay-animated.gif differ
diff --git a/docs/html/images/topic/instant-apps/s3-ParkandPay-static.png b/docs/html/images/topic/instant-apps/s3-ParkandPay-static.png
new file mode 100644 (file)
index 0000000..1e07a74
Binary files /dev/null and b/docs/html/images/topic/instant-apps/s3-ParkandPay-static.png differ
diff --git a/docs/html/images/topic/instant-apps/upgrade-your-app-2x.png b/docs/html/images/topic/instant-apps/upgrade-your-app-2x.png
new file mode 100644 (file)
index 0000000..60fe373
Binary files /dev/null and b/docs/html/images/topic/instant-apps/upgrade-your-app-2x.png differ
index 74bad7b..26231be 100644 (file)
@@ -1872,7 +1872,7 @@ var RESOURCE_COLLECTIONS = {
     "resources": [
       "work/overview.html",
       "work/guide.html",
-      "https://connect.googleforwork.com/community/applicants/android/isv",
+      "https://www.google.com/work/android/developers/applyDevHub/",
       "work/app-restrictions.html",
       "work/cosu.html",
       "work/managed-profiles.html"
index ed8b54f..13a51b1 100644 (file)
@@ -3273,7 +3273,7 @@ DISTRIBUTE_RESOURCES = DISTRIBUTE_RESOURCES.concat([
     "title":"Join the Android for Work DevHub",
     "titleFriendly":"",
     "summary":"The Android for Work DevHub is a place to help developers keep up with Android in the workplace.",
-    "url":"https://connect.googleforwork.com/community/applicants/android/isv",
+    "url":"https://www.google.com/work/android/developers/applyDevHub/",
     "group":"",
     "keywords": ["work", "enterprise", "isv", "devhub"],
     "tags": [],
index fca2b17..02e6a2f 100644 (file)
@@ -3292,7 +3292,7 @@ METADATA['en'].extras = METADATA['en'].extras.concat([
     "title":"Join the Android for Work DevHub",
     "titleFriendly":"",
     "summary":"The Android for Work DevHub is a place to help developers keep up with Android in the workplace.",
-    "url":"https://connect.googleforwork.com/community/applicants/android/isv",
+    "url":"https://www.google.com/work/android/developers/applyDevHub/",
     "group":"",
     "keywords": ["work", "enterprise", "isv", "devhub"],
     "tags": [],
@@ -5388,7 +5388,7 @@ METADATA['en'].collections = {
     "resources": [
       "work/overview.html",
       "work/guide.html",
-      "https://connect.googleforwork.com/community/applicants/android/isv",
+      "https://www.google.com/work/android/developers/applyDevHub/",
       "work/app-restrictions.html",
       "work/cosu.html",
       "work/managed-profiles.html"
index 1b6da06..c643dc7 100644 (file)
@@ -9,37 +9,37 @@ page.image=images/cards/card-n-apis_2x.png
 
 <div id="qv-wrapper">
 <div id="qv">
-  <h2>Key developer features</h2>
+  <h2>Key Developer Features</h2>
   <ol>
       <ul style="list-style-type:none;">
-        <li><a href="#multi-window_support">Multi-window support</a></li>
+        <li><a href="#multi-window_support">Multi-window Support</a></li>
         <li><a href="#notification_enhancements">Notifications</a></li>
-        <li><a href="#jit_aot">JIT/AOT compilation</a></li>
-        <li><a href="#quick_path_to_app_install">Quick path to app install</a></li>
-        <li><a href="#doze_on_the_go">Doze on the go</a></li>
-        <li><a href="#background_optimizations">Background optimizations</a></li>
+        <li><a href="#jit_aot">JIT/AOT Compilation</a></li>
+        <li><a href="#quick_path_to_app_install">Quick Path to App Install</a></li>
+        <li><a href="#doze_on_the_go">Doze on the Go</a></li>
+        <li><a href="#background_optimizations">Background Optimizations</a></li>
         <li><a href="#data_saver">Data Saver</a></li>
         <li><a href="#vulkan">Vulkan API</a></li>
         <li><a href="#tile_api">Quick Settings Tile API</a></li>
-        <li><a href="#number-blocking">Number-blocking</a></li>
-        <li><a href="#call_screening">Call screening</a></li>
-        <li><a href="#multi-locale_languages">Locales and languages</a></li>
+        <li><a href="#number-blocking">Number Blocking</a></li>
+        <li><a href="#call_screening">Call Screening</a></li>
+        <li><a href="#multi-locale_languages">Locales and Languages</a></li>
         <li><a href="#emoji">New Emojis</a></li>
         <li><a href="#icu4">ICU4J APIs in Android</a></li>
         <li><a href="#gles_32">OpenGL ES 3.2 API</a></li>
-        <li><a href="#android_tv_recording">Android TV recording</a></li>
+        <li><a href="#android_tv_recording">Android TV Recording</a></li>
         <li><a href="#android_for_work">Android for Work</a></li>
         <li><a href="#accessibility_enhancements">Accessibility</a></li>
         <li><a href="#direct_boot">Direct Boot</a></li>
         <li><a href="#key_attestation">Key Attestation</a></li>
         <li><a href="#network_security_config">Network Security Config</a></li>
         <li><a href="#default_trusted_ca">Default Trusted CA</a></li>
-        <li><a href="#apk_signature_v2">APK signature scheme v2</a></li>
-        <li><a href="#scoped_directory_access">Scoped directory access</a></li>
+        <li><a href="#apk_signature_v2">APK Signature Scheme v2</a></li>
+        <li><a href="#scoped_directory_access">Scoped Directory Access</a></li>
         <li><a href="#keyboard_shortcuts_helper">Keyboard Shortcuts Helper</a></li>
         <li><a href="#sustained_performance_api">Sustained Performance API</a></li>
         <li><a href="#vr">VR Support</a></li>
-        <li><a href="#print_svc">Print service enhancements</a></li>
+        <li><a href="#print_svc">Print Service Enhancements</a></li>
         <li><a href="#virtual_files">Virtual Files</a></li>
         <li><a href="#framemetrics_api">FrameMetricsListener API</a></li>
       </ol>
@@ -61,7 +61,7 @@ the new features for developers. </p>
   new APIs.
 </p>
 
-<h2 id="multi-window_support">Multi-window support</h2>
+<h2 id="multi-window_support">Multi-window Support</h2>
 
 
 <p>In Android N, we're introducing a new and much-requested multitasking feature
@@ -106,7 +106,7 @@ that size. You can also disable multi-window display for your app, which
   developer documentation.
 </p>
 
-<h2 id="notification_enhancements">Notification enhancements</h2>
+<h2 id="notification_enhancements">Notification Enhancements</h2>
 
 <p>In Android N we've redesigned notifications to make them easier and faster to
 use. Some of the changes include:</p>
@@ -172,7 +172,7 @@ use. Some of the changes include:</p>
 
 
 
-<h2 id="jit_aot">Profile-guided JIT/AOT compilation</h2>
+<h2 id="jit_aot">Profile-guided JIT/AOT Compilation</h2>
 
 <p>In Android N, we've added a Just in Time (JIT) compiler with code profiling to
 ART, which lets it constantly improve the performance of Android apps as they
@@ -194,14 +194,14 @@ binaries. This feature is especially important on low-memory devices.</p>
 device battery. It does precompilation only when then the device is idle and
 charging, saving time and battery by doing that work in advance.</p>
 
-<h2 id="quick_path_to_app_install">Quick path to app install</h2>
+<h2 id="quick_path_to_app_install">Quick Path to App Install</h2>
 
 <p>One of the most tangible benefits of ART's JIT compiler is the speed of app
 installs and system updates. Even large apps that required several minutes to
 optimize and install in Android 6.0 can now install in just a matter of
 seconds. System updates are also faster, since there's no more optimizing step. </p>
 
-<h2 id="doze_on_the_go">Doze on the go...</h2>
+<h2 id="doze_on_the_go">Doze on the Go...</h2>
 
 <p>Android 6.0 introduced Doze, a system mode that saves battery by deferring
 apps' CPU and network activities when the device is idle, such as when it's
@@ -239,7 +239,7 @@ handle Doze, you're all set. If not, start <a
 href="{@docRoot}training/monitoring-device-state/doze-standby.html#assessing_your_app">adapting
 your app to Doze</a> now.</p>
 
-<h2 id="background_optimizations">Project Svelte: Background optimizations</h2>
+<h2 id="background_optimizations">Project Svelte: Background Optimizations</h2>
 
 <p>Project Svelte is an ongoing effort to minimize RAM use by system and apps
 across the range of Android devices in the ecosystem. In Android N, Project
@@ -410,15 +410,15 @@ displayed &mdash; users can add or move tiles just by dragging and dropping them
 
 
 
-<h2 id="number-blocking">Number-blocking</h2>
+<h2 id="number-blocking">Number Blocking</h2>
 
-<p>Android N now supports number-blocking in the platform and provides a
+<p>Android N now supports number blocking in the platform and provides a
 framework API to let service providers maintain a blocked-number list. The
 default SMS app, the default phone app, and carrier apps can read from and
 write to the blocked-number list. The list is not accessible to other apps.</p>
 
-<p>By making number-blocking a standard feature of the platform, Android provides
-a consistent way for apps to support number-blocking across a wide range of
+<p>By making number blocking a standard feature of the platform, Android provides
+a consistent way for apps to support number blocking across a wide range of
 devices. Among the other benefits that apps can take advantage of are:</p>
 
 <ul>
@@ -439,7 +439,7 @@ through any medium, such as a VOIP endpoint or forwarding phones.</p>
   Reference</a>.
 </p>
 
-<h2 id="call_screening">Call screening</h2>
+<h2 id="call_screening">Call Screening</h2>
 
 <p>
   Android N allows the default phone app to screen incoming calls. The phone
@@ -461,7 +461,7 @@ through any medium, such as a VOIP endpoint or forwarding phones.</p>
 </p>
 
 
-<h2 id="multi-locale_languages">Multi-locale support, more languages</h2>
+<h2 id="multi-locale_languages">Multi-locale Support, More Languages</h2>
 
 
 <p>Android N now lets users select <strong>multiple locales</strong> in Settings,
@@ -570,7 +570,7 @@ supported OpenGL ES version at runtime, see the <a
 href="{@docRoot}guide/topics/graphics/opengl.html">OpenGL ES API guide</a>.</p>
 
 
-<h2 id="android_tv_recording">Android TV recording</h2>
+<h2 id="android_tv_recording">Android TV Recording</h2>
 
 <p>Android N adds the ability to record and playback content from Android TV input
 services via new recording APIs.  Building on top of existing time-shifting
@@ -653,7 +653,7 @@ action <code>android.net.VpnService</code>. </p>
   customizes the flow with a corporate logo.
 </p>
 
-<h2 id="accessibility_enhancements">Accessibility enhancements</h2>
+<h2 id="accessibility_enhancements">Accessibility Enhancements</h2>
 
 <p>Android N now offers Vision Settings directly on the Welcome screen for new
 device setup. This makes it much easier for users to discover and configure
@@ -674,7 +674,7 @@ meet the needs of those users.</p>
   in the downloadable <a href="{@docRoot}preview/setup-sdk.html#docs-dl">API Reference</a>.</p>
 
 
-<h2 id="direct_boot">Direct boot</h2>
+<h2 id="direct_boot">Direct Boot</h2>
 
 <p>Direct boot improves device startup times and lets registered
 apps have limited functionality even after an unexpected reboot.
@@ -779,7 +779,7 @@ N that wish to trust user-added CAs should use the
 <a href="{@docRoot}preview/features/security-config.html">Network Security Config</a> to
 specify how user CAs should be trusted.</p>
 
-<h2 id="apk_signature_v2">APK signature scheme v2</h2>
+<h2 id="apk_signature_v2">APK Signature Scheme v2</h2>
 
 <p>
   Android N introduces APK Signature Scheme v2, a new app-signing scheme that
@@ -830,7 +830,7 @@ specify how user CAs should be trusted.</p>
   the build file for signing apps</a> using the Android Plugin for Gradle.
 </p>
 
-<h2 id="scoped_directory_access">Scoped directory access</h2>
+<h2 id="scoped_directory_access">Scoped Directory Access</h2>
 
 <p>In Android N, apps can use new APIs to request access to specific <a
 href="{@docRoot}guide/topics/data/data-storage.html#filesExternal">external
@@ -897,11 +897,14 @@ disables this mode when the window is no longer in focus.
 <h2 id="vr">VR Support</h2>
 
 <p>
-Leveraging the <a href="#sustained_performance_api">Sustained Performance API</a>
-and newly introduced {@code VrListenerService} class, Android N provides support for
-VR apps developed using the <a href="https://developers.google.com/cardboard/overview">Cardboard
-SDK</a>. For more information about the {@code VrListenerService} class, see the relevant section
-of the downloadable <a href="{@docRoot}preview/setup-sdk.html#docs-dl">API Reference</a>.
+Android N adds platform support and optimizations for a new VR Mode to let developers
+build high-quality mobile VR experiences for users. There are a number of performance
+enhancements, including access to an exclusive CPU core for VR apps.
+Within your apps, you can take advantage of intelligent head-tracking,
+and stereo notifications that work for VR. Most importantly, Android N provides for
+very low latency graphics. For complete information about building VR apps for Android N,
+see the <a href="https://developers.google.com/vr/android/">Google VR SDK for Android</a>.
+</p>
 
 
 <h2 id="print_svc">Print Service Enhancements</h2>
@@ -951,9 +954,8 @@ of the downloadable <a href="{@docRoot}preview/setup-sdk.html#docs-dl">API Refer
 The FrameMetricsListener API allows an app to monitor its UI rendering
 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
-<a href="{@docRoot}tools/help/shell.html#shellcommands">adb shell</a> dumpsys gfxinfo framestats},
-but is not limited to the past 120 frames.
+equivalent to that which <code><a href="{@docRoot}tools/help/shell.html#shellcommands">adb shell</a>
+dumpsys gfxinfo framestats</code> displays, but is not limited to the past 120 frames.
 </p>
 
 <p>
index 110ad5f..66dce7a 100644 (file)
@@ -56,14 +56,13 @@ page.image=images/cards/card-n-changes_2x.png
 </p>
 
 
-<h2 id="perf">Performance Improvements</h2>
+<h2 id="perf">Battery and Memory</h2>
 
 <p>
-  Android N contains system behavior changes aimed at improving the battery
-  life of devices, RAM usage, and app performance. These changes can impact the
-  availability of system resources and system notifications to your app. You
-  should review these changes and evaluate how your app may need to adjust to
-  them.
+Android N includes system behavior changes aimed at improving the battery life
+of devices and reducing RAM usage. These changes can affect your app’s access to
+system resources, along with the way your app interacts with other apps via
+certain implicit intents.
 </p>
 
 <h3 id="doze">Doze</h3>
@@ -139,7 +138,7 @@ page.image=images/cards/card-n-changes_2x.png
 </p>
 
 <p>
-  Similarly, apps can register to receive implicit {@link
+  Similarly, in previous versions of Android, apps could register to receive implicit {@link
   android.hardware.Camera#ACTION_NEW_PICTURE} and {@link
   android.hardware.Camera#ACTION_NEW_VIDEO} broadcasts from other apps, such as
   Camera. When a user takes a picture with the Camera app, these apps wake up
index 7e70f57..2058501 100644 (file)
@@ -203,72 +203,72 @@ This is the Android SDK Preview License Agreement (the “License Agreement”).
   <tr id="bullhead">
     <td>Nexus 5X <br>"bullhead"</td>
     <td><a href="#top" onclick="onDownload(this)"
-      >bullhead-ota-npc91k-dfcbfda0.zip</a><br>
-      MD5: af537dc0c06e85f32a929c10aaf12e0a<br>
-      SHA-1: 12a32b09223eb8f98bc0f0f05d951789d5fbe12e
+      >bullhead-ota-npd35k-b8cfbd80.zip</a><br>
+      MD5: 15fe2eba9b01737374196bdf0a792fe9<br>
+      SHA-1: 5014b2bba77f9e1a680ac3f90729621c85a14283
     </td>
   </tr>
 
   <tr id="shamu">
     <td>Nexus 6 <br>"shamu"</td>
     <td><a href="#top" onclick="onDownload(this)"
-      >shamu-ota-npc91k-201dd8d1.zip</a><br>
-      MD5: 016d60b4734151ca70d977c04d737487<br>
-      SHA-1: 09ca7c0712366c53e61abb7a6142ce703e2ac62c
+      >shamu-ota-npd35k-078e6fa5.zip</a><br>
+      MD5: e8b12f7721c53af9a450f7058928a5fc<br>
+      SHA-1: b7a9b756f84a1d2e482ff9c16749d65f6e51425a
     </td>
   </tr>
 
   <tr id="angler">
     <td>Nexus 6P <br>"angler"</td>
     <td><a href="#top" onclick="onDownload(this)"
-      >angler-ota-npc91k-7399f083.zip</a><br>
-      MD5: eacc5307ef4f00ba4b61ac9c1620def9<br>
-      SHA-1: 6a9f36cad4bd8fd63e7719c00e0b75bd991614ff
+      >angler-ota-npd35k-88457699.zip</a><br>
+      MD5: 3fac09fef759dde26e57cb80b20b6477<br>
+      SHA-1: 27d6caa786577d8a38b2da5bf94b33b4524a1a1c
     </td>
   </tr>
 
   <tr id="volantis">
     <td>Nexus 9 <br>"volantis"</td>
     <td><a href="#top" onclick="onDownload(this)"
-      >volantis-ota-npc91k-42fc9c84.zip</a><br>
-      MD5: e1f3f5504aa3389ef4fbac7ac42a995f<br>
-      SHA-1: 1e49e2867479ad1a1c58f52584c62575bb9c2c3b
+      >volantis-ota-npd35k-51dbae76.zip</a><br>
+      MD5: 58312c4a5971818ef5c77a3f446003da<br>
+      SHA-1: aad9005be33d3e2bab480509a6ab74c3c3b9d921
     </td>
   </tr>
 
   <tr id="volantisg">
     <td>Nexus 9G <br>"volantisg"</td>
     <td><a href="#top" onclick="onDownload(this)"
-      >volantisg-ota-npc91k-4aa98b9f.zip</a><br>
-      MD5: ad2e60aa9b1a063f906eb8904388e5f8<br>
-      SHA-1: 4edfa8ab5d2d02ec46afffce62466aa715420558
+      >volantisg-ota-npd35k-834f047f.zip</a><br>
+      MD5: 92b7d1fa252f7394e70f957c72d4aac8<br>
+      SHA-1: b6c057c84d90893630e303cbb60530e20ddb8361
     </td>
   </tr>
 
   <tr id="fugu">
     <td>Nexus Player <br>"fugu"</td>
     <td><a href="#top" onclick="onDownload(this)"
-      >fugu-ota-npc91o-b1d73dd5.zip</a><br>
-      MD5: d7fbccde75e0b6d860102320ea76d58f<br>
-      SHA-1: b1d73dd5a6498fb6c66e022bd0a6c8b6a6a2374b
+      >fugu-ota-npd35k-6ac91298.zip</a><br>
+      MD5: 1461622ad53ea842b2722fa7b49b8172<br>
+      SHA-1: 409c061668ab270774877d7f3eae44fa48d2b931
     </td>
   </tr>
 
   <tr id="ryu">
     <td>Pixel C <br>"ryu"</td>
     <td><a href="#top" onclick="onDownload(this)"
-      >ryu-ota-npc91k-80971fa8.zip</a><br>
-      MD5: 9d66ca3c5673586bb5ade9fdda6fb924<br>
-      SHA-1: 329209b6f1ee08a29e4be32139672a30901a19b7
+      >ryu-ota-npd35k-a0b2347f.zip</a><br>
+      MD5: c60117f3640cc6db12386fd632289c7d<br>
+      SHA-1: 87349c767c69efb4172c90ce1d88cf578c3d28b3
     </td>
   </tr>
 
   <tr id="seed">
     <td>General Mobile 4G (Android One) <br>"seed"</td>
     <td><a href="#top" onclick="onDownload(this)"
-      >seed_l8150-ota-npc91k-8e8c8777.zip</a><br>
-      MD5: d21d417d7b5525633b5f7bcfa8b23245<br>
-      SHA-1: bfe42c7e291ca667d3f4d7c80825e5cf8830fc9a
+      >seed_l8150-ota-npd35k-09897a1d.zip</a><br>
+      MD5: a55cf94f7cce0393ec6c0b35041766b7<br>
+      SHA-1: 6f33742290eb46f2561891f38ca2e754b4e50c6a
     </td>
   </tr>
 
index b0f5369..b4f7e46 100644 (file)
@@ -302,72 +302,72 @@ This is the Android SDK Preview License Agreement (the “License Agreement”).
   <tr id="bullhead">
     <td>Nexus 5X <br>"bullhead"</td>
     <td><a href="#top" onclick="onDownload(this)"
-      >bullhead-npc91k-factory-d09b15b5.tgz</a><br>
-      MD5: f5aa4b0b10213435569ed4833dd973f8<br>
-      SHA-1: d09b15b5f8978e2fee3fbd799554de90b7012d64
+      >bullhead-npd35k-factory-5ba40535.tgz</a><br>
+      MD5: b6c5d79a21815ee21db41822dcf61e9f<br>
+      SHA-1: 5ba4053577007d15c96472206e3a79bc80ab194c
     </td>
   </tr>
 
   <tr id="shamu">
     <td>Nexus 6 <br>"shamu"</td>
     <td><a href="#top" onclick="onDownload(this)"
-      >shamu-npc91k-factory-7c9936dc.tgz</a><br>
-      MD5: 271b758d01f61cdef71a3e4c14e90e85<br>
-      SHA-1: 7c9936dca492dd9a5b279612962e3439031fcc06
+      >shamu-npd35k-factory-a33bf20c.tgz</a><br>
+      MD5: e1cf9c57cfb11bebe7f1f5bfbf05d7ab<br>
+      SHA-1: a33bf20c719206bcf08d1edd8da6c0ff9d50f69c
     </td>
   </tr>
 
   <tr id="angler">
     <td>Nexus 6P <br>"angler"</td>
     <td><a href="#top" onclick="onDownload(this)"
-      >angler-npc91k-factory-dcd13c44.tgz</a><br>
-      MD5: 3f304dc1d5044768af26c8503d3fbf18<br>
-      SHA-1: dcd13c44e7254916fcf7cb7fa31e0dc03737a3f5
+      >angler-npd35k-factory-81c341d5.tgz</a><br>
+      MD5: e93de7949433339856124c3729c15ebb<br>
+      SHA-1: 81c341d57ef2cd139569b055d5d59e9e592a7abd
     </td>
   </tr>
 
   <tr id="volantis">
     <td>Nexus 9 <br>"volantis"</td>
     <td><a href="#top" onclick="onDownload(this)"
-      >volantis-npc91k-factory-ed835af7.tgz</a><br>
-      MD5: 466a9873111a320e5a19891de61e5609<br>
-      SHA-1: ed835af7bebf26d4c12b5c30c8b1a337c06c9623
+      >volantis-npd35k-factory-2b50e19d.tgz</a><br>
+      MD5: 565be87ebb2d5937e2abe1a42645864b<br>
+      SHA-1: 2b50e19dae2667b27f911e3c61ed64860caf43e1
     </td>
   </tr>
 
   <tr id="volantisg">
     <td>Nexus 9G <br>"volantisg"</td>
     <td><a href="#top" onclick="onDownload(this)"
-      >volantisg-npc91k-factory-6f20b9f6.tgz</a><br>
-      MD5: 419f76cdf886b18d2e7281915b9c77b0<br>
-      SHA-1: 6f20b9f6b0d77dc17793db32cd2da5a0b0aa63c9
+      >volantisg-npd35k-factory-2e89ebe6.tgz</a><br>
+      MD5: a8464e15c6683fe2afa378a63e205fda<br>
+      SHA-1: 2e89ebe67a46b2f3beb050746c13341cd11fa678
     </td>
   </tr>
 
   <tr id="fugu">
     <td>Nexus Player <br>"fugu"</td>
     <td><a href="#top" onclick="onDownload(this)"
-      >fugu-npc91o-factory-3b8e3f56.tgz</a><br>
-      MD5: b88b70ecbfb80c983c90b97cb243628b<br>
-      SHA-1: 3b8e3f56a4c35b559783c2928e740df2aab8b377
+      >fugu-npd35k-factory-1de74874.tgz</a><br>
+      MD5: c0dbb7db671f61b2785da5001cedefcb<br>
+      SHA-1: 1de74874f8d83e14d642f13b5a2130fc2aa55873
     </td>
   </tr>
 
   <tr id="ryu">
     <td>Pixel C <br>"ryu"</td>
     <td><a href="#top" onclick="onDownload(this)"
-      >ryu-npc91k-factory-463030f2.tgz</a><br>
-      MD5: 24e8981a3c95637867eb768c0f84c96c<br>
-      SHA-1: 463030f2ecdcfe9e92ddf9f3a224ac7aa5ed5866
+      >ryu-npd35k-factory-b4eed85d.tgz</a><br>
+      MD5: bdcb6f770e753668b5fadff2a6678e0d<br>
+      SHA-1: b4eed85de0d42c200348a8629084f78e24f72ac2
     </td>
   </tr>
 
   <tr id="seed">
     <td>General Mobile 4G (Android One) <br>"seed"</td>
     <td><a href="#top" onclick="onDownload(this)"
-      >seed_l8150-npc91k-factory-7026d89d.tgz</a><br>
-      MD5: a614984799c887d9b5af2d366fefc8e3<br>
-      SHA-1: 7026d89d79decd8421da8df844a1fcd9e27df163
+      >seed_l8150-npd35k-factory-5ab1212b.tgz</a><br>
+      MD5: 7d34a9774fdd6e025d485ce6cfc23c4c<br>
+      SHA-1: 5ab1212bc9417269d391aacf1e672fff24b4ecc5
     </td>
   </tr>
 
index ec02328..3c33b9d 100644 (file)
@@ -379,7 +379,7 @@ public boolean onStartJob(JobParameters params) {
 
   <li style="list-style: none; display: inline">
 <pre class="no-pretty-print">
-{@code $ adb shell cmd appops set RUN_IN_BACKGROUND ignore}
+{@code $ adb shell cmd appops set &lt;package&gt; RUN_IN_BACKGROUND ignore}
 </pre>
   </li>
 
@@ -389,7 +389,7 @@ public boolean onStartJob(JobParameters params) {
 
   <li style="list-style: none; display: inline">
 <pre class="no-pretty-print">
-{@code $ adb shell cmd appops set RUN_IN_BACKGROUND allow}
+{@code $ adb shell cmd appops set &lt;package&gt; RUN_IN_BACKGROUND allow}
 </pre>
   </li>
-</ul>
\ No newline at end of file
+</ul>
index 0369490..1b45c1a 100644 (file)
@@ -153,7 +153,7 @@ page.tags="preview", "developer", "android"
 <ul>
   <li><strong><a href="{@docRoot}preview/support.html#dp1">Preview 1</a></strong> (initial release, alpha)</li>
   <li><strong><a href="{@docRoot}preview/support.html#dp2">Preview 2</a></strong> (incremental update, alpha)</li>
-  <li><strong>Preview 3</strong> (incremental update, beta)</li>
+  <li><strong><a href="{@docRoot}preview/support.html#dp3">Preview 3</a></strong> (incremental update, beta)</li>
   <li><strong>Preview 4</strong> (final APIs and official SDK, Play publishing)</li>
   <li><strong>Preview 5</strong> (near-final system images for final testing)</li>
   <li><strong>Final release</strong> to AOSP and ecosystem</li>
index 60568ac..13e8989 100644 (file)
@@ -91,11 +91,11 @@ Android N Preview SDK in Android Studio as follows:</p>
   </tr>
   <tr>
     <td style="white-space: nowrap">
-    <a href="{@docRoot}shareables/preview/n-preview-2-docs.zip"
-      >n-preview-2-docs.zip</a></td>
+    <a href="{@docRoot}shareables/preview/n-preview-3-docs.zip"
+      >n-preview-3-docs.zip</a></td>
     <td width="100%">
-      MD5: c02732760f468bd97cd94c1b76361229<br>
-      SHA-1: 591eabe168c909799f6d8dcbe7b126c25ea8b04d
+      MD5: 19bcfd057a1f9dd01ffbb3d8ff7b8d81<br>
+      SHA-1: 9224bd4445cd7f653c4c294d362ccb195a2101e7 
     </td>
   </tr>
 <table>
index 83ecde2..272e1fb 100644 (file)
@@ -5,6 +5,34 @@ page.image=images/cards/card-n-support_2x.png
 
 @jd:body
 
+
+<div id="qv-wrapper">
+<div id="qv">
+
+<h2>In this document</h2>
+
+<ul>
+  <li><a href="#dp3">Developer Preview 3</a>
+    <ul>
+      <li><a href="#general">General advisories</a></li>
+      <li><a href="#new">New in DP3</a></li>
+      <li><a href="#ki">Known issues</a></li>
+    </ul>
+  </li>
+  <li><a href="#dp2">Developer Preview 2</a></li>
+  <li><a href="#dp1">Developer Preview 1</a></li>
+</ul>
+
+<!--
+<h2>See Also</h2>
+<ol>
+  <li></li>
+</ol>
+-->
+
+</div>
+</div>
+
 <p>
   Two primary support channels are available to you when developing and testing
   with the Android N Developer Preview: Please file bugs at <a href=
@@ -23,67 +51,451 @@ page.image=images/cards/card-n-support_2x.png
   <div class="cols">
     <div class="col-6of12">
       <p>
-        <em>Date: April 2016<br>
-        Builds: TODO<br>
+        <em>Date: May 2016<br>
+        Build: NPD35K<br>
         Emulator support: x86 &amp; ARM (32/64-bit)<br>
-        Google Play services: TODO</em>
+        Google Play services: 8.4</em>
       </p>
     </div>
   </div>
 </div>
 
+<h3 id="general">General advisories</h3>
+
+<p>
+  This Developer Preview release is for <strong>app developers and other early
+  adopters</strong> and is available for daily use, development, or
+  compatibility testing. Please be aware of these general notes about the
+  release:
+</p>
+
+<ul>
+  <li>This release may have various <strong>stability issues</strong> on
+    supported devices. Users may encounter system instability, such as kernel
+    panics and crashes.
+  </li>
+
+  <li>Some apps <strong>may not function as expected</strong> on the new
+  platform version. This includes Google’s apps as well as other apps. You can
+  let developers know about app compatibility issues using the <a href=
+  "{@docRoot}preview/bugs">N Developer Preview issue tracker</a>.
+  </li>
+
+  <li>Developer Preview 3 is <strong>Compatibility Test Suite (CTS)
+  approved</strong> on these devices: Nexus 5X, Nexus 6, Nexus 6P, and Pixel
+  C. Apps that depend on CTS approved builds should
+  work normally on these devices (Android Pay for example).
+  </li>
+
+  <li>Developer Preview 3 is <strong>available on all supported
+  devices:</strong> Nexus 5X, Nexus 6, Nexus 6P, Nexus 9, Nexus Player, Pixel
+  C, General Mobile 4G (Android One), as well as Sony Xperia Z3 (D6603 and
+  D6653 models).
+
+  </li>
+</ul>
+
+
 <h3 id="new">New in DP3</h3>
 
+<h4 id="">VR Mode for Android</h4>
+
+<p>
+  Android N adds platform support and optimizations for a new VR Mode to let
+  developers build high quality mobile VR experiences for users. There are a
+  number of performance enhancements, including access to an exclusive CPU core
+  for VR apps. Within your apps, you can take advantage of intelligent
+  head-tracking, and stereo notifications that work for VR. Most importantly,
+  Android N provides for very low latency graphics.
+</p>
+
+<p>
+  For more information, see the <a href=
+  "https://developers.google.com/vr/android/">Google VR SDK for Android</a>.
+</p>
+
+<h4 id="">Sustained performance mode</h4>
+
+<p>
+  Android N includes optional support for <a href=
+  "{@docRoot}preview/api-overview.html#sustained_performance_api">sustained
+  performance mode</a>, enabling OEMs to provide hints on device performance
+  capabilities for long running applications. App developers can then use these
+  hints to tune applications for a predictable, consistent level of device
+  performance over long periods of time. App developers can try out this new
+  API in the developer preview on Nexus 6P devices only.
+</p>
+
+<h4>Multiprocess WebView</h4>
+
+<p>
+  Starting with version 51 in Android N, WebView will run web content in a
+  separate sandboxed process when the developer option "Multiprocess WebView"
+  is enabled. The WebView team is looking for feedback on compatibility and
+  runtime performance in N before enabling multiprocess WebView in a future
+  version of Android. In this version, regressions in startup time, total
+  memory usage and software rendering performance are expected.
+</p>
+
+<p>
+  If you find unexpected issues in multiprocess mode we’d like to hear about
+  them. Please get in touch with the WebView team by <a href=
+  "https://bugs.chromium.org/p/chromium/issues/entry?template=Webview%20Bugs">
+  filing a bug</a>.
+</p>
+
+<h4 id="">Keyboard Shortcuts helper</h4>
+
+<p>
+  Android N lets users press <code>Meta+/</code> to trigger a <strong>Keyboard
+  Shortcuts</strong> screen that displays all shortcuts available both from the
+  system and from the app in focus. Developers can add their own shortcuts or
+  trigger the Shortcuts screen from their apps. See <a href=
+  "{@docRoot}preview/api-overview.html#keyboard_shortcuts_helper">Keyboard
+  Shortcuts helper</a> for details.
+</p>
+
+<h4 id="">FrameMetrics API</h4>
+
+<p>
+  DP3 introduces a new <a href=
+  "{@docRoot}preview/api-overview.html#framemetrics_api">FrameMetrics API</a>
+  that allows an app to monitor its UI rendering performance by exposing a
+  streaming pubsub API to transfer frame timing info for the application’s
+  current window. <code>FrameMetricsListener</code> can be used to measure
+  interaction-level UI performance in production with higher granularity and
+  without the need for a USB connection.
+</p>
 
-<h4 id="api-changes">API changes</h4>
+<h4 id="api-changes">Feature and API changes</h4>
 
 <dl>
-  <dt><a href="{@docRoot}preview/api-overview.html#number-blocking"
-    >Number-blocking</a></dt>
-  <dd>If an unauthorized user attempts to block or unblock a number, the operation
-    now fails with {@link java.lang.SecurityException}. (Previously, the
-    operation threw {@link java.lang.UnsupportedOperationException}.)</dd>
-
-  <dt><a href="{@docRoot}preview/api-overview.html#tile_api">Quick
-    Settings Tile API</a></dt>
-  <dd>The system now uses the activity's metadata to decide on the tile mode.
+  <dt>
+    Launcher Shortcuts and the Launcher Shortcuts API
+  </dt>
+
+  <dd>
+    We’ve decided to defer this feature to a future release of Android. We plan
+    to remove the Launcher Shortcuts APIs (ShortcutManager and others) from the
+    public Android N API starting in the next developer preview.
+  </dd>
+
+  <dt>
+    WebView Javascript run before page load
+  </dt>
+
+  <dd>
+    Starting with apps targeting Android N, the Javascript context is reset
+    when a new page is loaded. Currently, the context is carried over for the
+    first page loaded in a new {@link android.webkit.WebView} instance.
+    Developers looking to inject Javascript into the {@link
+    android.webkit.WebView} should execute the script after the page has
+    started to load.
+  </dd>
+
+  <dt>
+    WebView Geolocation on insecure origins
+  </dt>
+
+  <dd>
+    Starting with apps targeting Android N, the geolocation API will only be
+    allowed on secure origins (over HTTPS.) This policy is designed to protect
+    users' private information when they're using an insecure connection.
+  </dd>
+
+  <dt>
+    Data Saver
+  </dt>
+
+  <dd>
+    Starting in Developer Preview 3, apps can use use an intent to display a
+    system dialog that lets the user directly add the app to the Data Saver
+    exemption whitelist. See the <a href=
+    "{@docRoot}preview/api-overview.html#data_saver">Data Saver
+    documentation</a> for details.
+  </dd>
+
+  <dt>
+    <a href=
+    "{@docRoot}preview/api-overview.html#number-blocking">Number-blocking</a>
+  </dt>
+
+  <dd>
+    If an unauthorized user attempts to block or unblock a number, the
+    operation now fails with {@link java.lang.SecurityException}. (Previously,
+    the operation threw {@link java.lang.UnsupportedOperationException}.)
+  </dd>
+
+  <dt>
+    <a href="{@docRoot}preview/api-overview.html#tile_api">Quick Settings Tile
+    API</a>
+  </dt>
+
+  <dd>
+    The system now uses the activity's metadata to decide on the tile mode.
     (Previously, tile mode was determined by the return value of
     <code>TileService.onTileAdded()</code>.) For more information, see
-    <code>TileService.META_DATA_ACTIVE_TILE</code> in the downloadable
-    <a href="{@docRoot}preview/setup-sdk.html#docs-dl">API Reference</a>.
+    <code>TileService.META_DATA_ACTIVE_TILE</code> in the downloadable <a href=
+    "{@docRoot}preview/setup-sdk.html#docs-dl">API Reference</a>.
   </dd>
 </dl>
 
-<h4 id="dp2-fixes">Fixes for issues reported by developers</h4>
+<h4 id="dp3-fixes">Fixes for issues reported by developers</h4>
 
 <p>
   A number of issues reported by developers have been fixed, including:
 </p>
 
 <ul>
-  <li>TODO</li>
+  <li>Bluetooth Audio playback interrupted after 1 song (bug <a href=
+  "https://code.google.com/p/android/issues/detail?id=206889">206889</a>)
+  </li>
+
+  <li>Pixel C Consistently Crashes (bug <a href=
+  "https://code.google.com/p/android/issues/detail?id=206962">206962</a>)
+  </li>
+
+  <li>Clock and Toast notification issues (bug <a href=
+  "https://code.google.com/p/android/issues/detail?id=203094">203094</a>)
+  </li>
+
+  <li>Pixel C reboots when connected to MacBook Pro via USB C Cable (bug
+  <a href=
+  "https://code.google.com/p/android/issues/detail?id=205432">205432</a>)
+  </li>
+
+  <li>Calandar offset by one day (bug <a href=
+  "https://code.google.com/p/android/issues/detail?id=203002">203002</a>)
+  </li>
+
+  <li>TelephonyManager.getAllCellInfo returning invalid data (bug <a href=
+  "https://code.google.com/p/android/issues/detail?id=203022">203022</a>)
+  </li>
+
+  <li>Nexus 6p, Bluetooth keeps disconnecting (bug <a href=
+  "https://code.google.com/p/android/issues/detail?id=208062">208062</a>)
+  </li>
 </ul>
 
-<h3 id="general">General advisories</h3>
+<p>For the full list of fixed issues, see <a href="https://goo.gl/6uCKtf">the
+issue tracker</a>.</p>
 
-<p>
-  This Developer Preview release is for <strong>app developers only</strong>
-  and is designed for use in compatibility testing and early development only.
-  Please be aware of these general notes about the release:
-</p>
+<h3 id="ki">Known Issues</h3>
+
+<h4>Accessibility</h4>
 
 <ul>
+  <li>Unable to listen to TTS output when pitch is set near maximum level.
+  </li>
 
-  <li>TODO</li>
+  <li>Accessibility features and settings may be disrupted with the user adds a
+  Work profile, including magnification gesture and setting. Accessibility
+  state is restored when the user next touches the associated settings.
+  </li>
 </ul>
 
-<h3 id="ki">Known Issues</h3>
+<h4>Camera</h4>
 
-<p>TODO</p>
+<ul>
+  <li>The Camera app has exhibited instability; it may crash in various
+    circumstances, such as when launched in multi-window mode.
+  </li>
 
-<h4>Device-specific issues</h4>
+  <li>Pressing the shutter continuously in panorama mode may cause the Camera
+  app to crash.
+  </li>
+</ul>
+
+<h4>Audio</h4>
+<ul>
+  <li>A platform audio player issue prevents some apps from functioning
+  normally. For example, Skype and other apps are affected by this issue.
+  </li>
+</ul>
+
+<h4>Connectivity</h4>
+
+
+<ul>
+  <li>When a Bluetooth Low Energy (BLE) peripheral role device advertises a
+  service and a BLE central role device connects, the peripheral role device
+  disconnects very quickly.
+  </li>
+
+  <li>Wi-Fi connection may be dropped when the screen is off.
+  </li>
+
+  <li>RFCOMM connections are unstable and may result in data corruption and
+  dangling connections.
+  </li>
+
+  <li>The active network state ({@link android.net.NetworkInfo#getState
+  NetworkInfo.getState()} and {@link android.net.NetworkInfo#getDetailedState
+  NetworkInfo.getDetailedState()}) might return incorrect values during some
+  restricted background scenarios.
+  </li>
+</ul>
+
+
+<h4>
+  Launcher
+</h4>
+
+<ul>
+  <li>The default launcher’s All Apps tray may become unresponsive after
+  cycling screen off / screen on. Returning to the homescreen and relaunching
+  the All Apps tray may resolve this issue.
+  </li>
+</ul>
 
-<p>TODO</p>
+<h4>
+  Keyboard
+</h4>
+
+<ul>
+  <li>When updating a device running Android 6.0 or earlier to the N Developer
+  Preview, Google Keyboard does not preserve preferences data such as recent
+  emoji and sound settings.
+  </li>
+
+  <li>Google Indic Managed Keyboard may be unstable.
+  </li>
+
+  <li>When entering text in a password field, the user can select Russian as
+  the input language but the keyboard remains in English. This prevents the
+  user from entering Russian-language passwords.
+  </li>
+</ul>
+
+<h4>
+  Locale and languages
+</h4>
+
+<ul>
+  <li>When using a right-to-left (RTL) locale, the system may unexpectedly
+  switch to left-to-right (LTR) presentation after restarting the device.
+  </li>
+</ul>
+
+<h4>Media</h4>
+
+<ul>
+  <li>Media playback be be unreliable on Nexus 9 and Nexus Player, including
+  issues playing HD video.
+  </li>
+</ul>
+
+<h4>
+  Multi-window mode
+</h4>
+
+<ul>
+  <li>Device may freeze when changing orientation in multi-window mode.
+  </li>
+
+  <li>Several apps currently have issues with multi-window mode:
+    <ul>
+      <li>The system UI may crash when docking Settings &gt; Display &gt;
+      Screen brightness to multi-window.
+      </li>
+
+      <li>The Camera app may crash when launched in multi-window mode.
+      </li>
+
+      <li>YouTube may crash when launched into multi-window mode. To fix the
+      issue, you can clear the YouTube app’s data at Storage &gt; Apps &gt;
+      YouTube.
+      </li>
+    </ul>
+  </li>
+</ul>
+
+<h4>
+  Google Play services
+</h4>
+
+<ul>
+  <li>Apps using Google Cast through Google Play services may be unstable when
+  the user selects a system locale that uses letters and numbers outside of the
+  ASCII range.
+  </li>
+</ul>
+
+<h4>
+  Work and enterprise
+</h4>
+
+<ul>
+  <li>The Device Policy app may crash when the user unlocks the device with the
+  "device policy status" screen pinned.
+  </li>
+
+  <li>After setting up a work profile with file-based encryption enabled and
+  then turning off Work, users must unlock primary profile screen lock to once
+  again access Work apps.
+  </li>
+
+  <li>Cannot open work apps after reboot in file-based-encryption with work
+  mode off.
+  </li>
+
+  <li>Device reboots when removing the security pattern lock and opening work
+  app/personal app in the multi-window.
+  </li>
+
+  <li>Setting DISALLOW_VPN_CONFIG is causing the consent dialog to appear in
+  always-on-vpn set by Device Policy Client.
+  </li>
+
+  <li>Traffic is not locked down until VPN is connected in always-on-vpn mode.
+  </li>
+</ul>
+
+<h4>
+  External storage
+</h4>
+
+<ul>
+  <li>Apps may become unstable when the user moves them from internal storage
+  to adoptable external storage (this can include SD card or devices attached
+  over USB).
+  </li>
+</ul>
+
+<h4>
+  Screen zoom and multiple APKs in Google Play
+</h4>
+
+<ul>
+  <li>On devices running Android N, Google Play services 9.0.83 incorrectly reports
+  the current screen density rather than the stable screen density. When screen
+  zoom is enabled on these devices, this can cause Google Play to select a
+  version of a multi-APK app that’s designed for smaller screens. This issue is
+  fixed in the next version of Google Play services and will be included in a
+  later Developer Preview release.
+  </li>
+
+  <li>On devices running Android N, Google Play services 9.0.83 currently reports
+  Vulkan support but not Vulkan version. This can cause Google Play to select a
+  version of a multi-APK app that’s designed for lower Vulkan support on
+  devices with higher version support. Currently, the Google Play Store does
+  not accept uploads of Apps which use Vulkan version targeting. This support
+  will be added to the Google Play Store in the future and fixed in the next
+  version of Google Play services (to be included in a later Developer Preview
+  release) any N devices using the version of Google Play services 9.0.83 will
+  continue to receive versions of Apps targeting basic Vulkan support.
+  </li>
+</ul>
+
+<h4 id="">Notifications</h4>
+
+<ul>
+  <li>MessagingStyle does not show notifications with "null" (self) sender.
+  </li>
+</ul>
+
+<!-- TODO, if any
+<h4>Device-specific issues</h4>
 
 <dl>
   <dt>
@@ -99,6 +511,8 @@ page.image=images/cards/card-n-support_2x.png
   </dd>
 </dl>
 
+-->
+
 <!-- DP2 Release Notes Archive -->
 
 <h2 id="dp2">Developer Preview 2</h2>
diff --git a/docs/html/topic/instant-apps/faqs.jd b/docs/html/topic/instant-apps/faqs.jd
new file mode 100644 (file)
index 0000000..0a1f571
--- /dev/null
@@ -0,0 +1,69 @@
+page.title=Android Instant Apps: Frequently Asked Questions
+page.tags=Material,design
+footer.hide=true
+forcelocalnav=true
+@jd:body
+
+<p>
+  <strong>What devices are compatible with Android Instant Apps?</strong>
+  <br/>
+  Android Instant Apps is compatible with devices that are running Android 4.1
+  (API level 16) or higher and have Google Play services installed.
+</p>
+
+<p>
+  <strong>Do developers need to build two different Android apps now?</strong>
+  <br/>
+  Developers only need to maintain one project with one source tree.
+  Developers simply configure the project to create two build artifacts: the
+  installable APK and the instant version.
+  Some developers can take less than a day to get up and running,
+  though the effort involved varies depending on how the
+  app is structured.
+</p>
+
+<p>
+  <strong>What Android APIs and functionality can Instant Apps use?</strong>
+  <br/>
+  Android Instant Apps functionality complements an existing Android app,
+  but does not replace it. Android Instant Apps uses the same Android APIs, the
+  same project, the same source code. Android Instant Apps restricts some
+  features that might not match users' expectations of an app
+  that is not installed.
+  For example, an Instant App can't use background services, do background
+  notifications, or access unique device identifiers.
+</p>
+
+<p>
+  <strong>Can users choose to install the app permanently?</strong>
+  <br/>
+  Developers can allow users to download the app from the Google Play
+  Store. After download, the app remains on the phone after the user has left
+  the experience.
+</p>
+
+<p>
+  <strong>How do permissions work in Android Instant Apps?</strong>
+  <br/>
+  Android Instant Apps uses the runtime permissions model introduced in
+  Android 6.0.
+  If an app supports the permission model introduced in Android 6.0
+  (API level 23), it does not require any additional work to become an Instant
+  App that runs on older devices.
+</p>
+
+<p>
+  <strong>How do developers publish these apps?</strong>
+  <br/>
+  Developers publish their Instant Apps through the Google Play Developer
+  Console, similar to their existing Android apps.
+</p>
+
+<p>
+  <strong>How can developers get involved?</strong>
+  <br/>
+  Developers interested in upgrading their Android apps can visit
+  <a class="external-link" href="g.co/InstantApps">g.co/InstantApps</a> to
+  sign up. We will be reaching out to interested
+  developers in the coming months.
+</p>
\ No newline at end of file
diff --git a/docs/html/topic/instant-apps/index.jd b/docs/html/topic/instant-apps/index.jd
new file mode 100644 (file)
index 0000000..28540ae
--- /dev/null
@@ -0,0 +1,281 @@
+fullpage=true
+page.title=Android Instant Apps
+page.viewport_width=970
+meta.tags="instant apps, getstarted, sdk, appquality, landing"
+section.landing=true
+header.hide=1
+carousel=1
+tabbedList=1
+excludeFromSuggestions=true
+@jd:body
+
+<!-- Hero section -->
+<section class="dac-expand dac-hero dac-section-light">
+<div class="wrap">
+<h1>Android Instant Apps</h1>
+<p class="sub-head">
+  Native Android apps, without the installation
+</p>
+
+<p class="dac-hero-description">
+  An evolution in app sharing and discovery, Android Instant Apps enables
+  Android apps to run instantly, without requiring installation.
+  Instant Apps lets you experience what you love about apps &#8212 fast and
+  beautiful user interfaces, high performance, and great capabilities &#8212
+  with just a tap.
+</p>
+
+<p class="dac-hero-description">
+  Request early access to the Instant Apps documentation today.
+</p>
+
+<p style="margin-top:24px">
+  <a class="landing-button green download-bundle-button"
+    href="https://docs.google.com/a/google.com/forms/d/1S3MzsMVIlchLCqyNLaFbv64llxWaf90QSeYLeswco90/viewform"
+    target="_blank">
+    I'M INTERESTED IN ANDROID INSTANT APPS<br>
+  </a>
+</p>
+</div>
+</section>
+
+<!-- Second section -->
+
+<div class="wrap" style="margin-top:60px">
+<div class="cols dac-hero-content">
+  <div class="col-1of2 dac-hero-figure">
+    <img src="/images/topic/instant-apps/instant-apps-section-2.png">
+  </div>
+<div class="col-1of2">
+<div class="dac-hero-tag"></div>
+
+  <h2 id="section-2">Run Android Apps Without Installation</h2>
+  <p class="dac-hero-description">
+    Android Instant Apps lets you experience beautiful and immersive
+    apps, with material design and smooth animations, without installing them
+    on your device.
+  </p>
+
+</div>
+</div>
+</div>
+
+<!-- Third section -->
+
+<div class="wrap" style="margin-top:60px">
+
+  <h2 id="section-3">Access Apps From Anywhere</h2>
+
+  <p>
+    Get people to your flagship Android experience from links that would
+    otherwise open your mobile web page &mdash; like
+    search, social media, messaging, and other deep links &mdash; without them
+    needing to stop and install your app first.
+  </p>
+
+  <div class="cols" style="margin-top:1em;">
+    <div class="col-4of12 gif-container">
+      <img class="partner-gifs"
+        src="/images/topic/instant-apps/s3-BandH-static.png">
+      <p class="figure-caption">
+        <em>B&amp;H Photo<br/>
+            (via Google Search)</em>
+      </p>
+    </div>
+
+    <div class="col-4of12 gif-container">
+      <img class="partner-gifs"
+        src="/images/topic/instant-apps/s3-BuzzFeed-static.png">
+      <p class="figure-caption">
+        <em>BuzzfeedVideo<br/>
+            (via a shared link)</em>
+      </p>
+    </div>
+
+    <div class="col-4of12 gif-container">
+      <img class="partner-gifs"
+        src="/images/topic/instant-apps/s3-ParkandPay-static.png">
+      <p class="figure-caption">
+        <em>Park and Pay<br/>
+            (via NFC)</em>
+      </p>
+    </div>
+  </div>
+</div>
+
+<!-- Fourth section -->
+
+<div class="wrap" style="margin-top:60px">
+<div class="cols dac-hero-content">
+  <div class="col-1of2 dac-hero-figure">
+    <img src="/images/topic/instant-apps/instant-apps-section-4.png">
+  </div>
+<div class="col-1of2">
+<div class="dac-hero-tag"></div>
+
+  <h2 id="section-4">Built On Google Play Services</h2>
+  <p class="dac-hero-description">
+    Take advantage of Google Play services features &mdash; like location, identity,
+    payments, and Firebase &mdash; which are built right in for a seamless user
+    experience.
+  </p>
+
+</div>
+</div>
+</div>
+
+<!-- Fifth section -->
+
+<div class="wrap" style="margin-top:60px">
+<div class="cols dac-hero-content">
+  <div class="col-1of2 col-push-1of2 dac-hero-figure">
+    <img src="/images/topic/instant-apps/instant-apps-section-5.png">
+  </div>
+<div class="col-1of2 col-pull-1of2">
+<div class="dac-hero-tag"></div>
+  <h2 id="section-5">Works On Most Android Devices</h2>
+
+  <p class="dac-hero-description">
+
+    Android Instant Apps can work on Android devices running Android 4.1+
+    (API Level 16) or higher with Google Play services.
+  </p>
+
+</div>
+</div>
+</div>
+
+<!-- Sixth section -->
+
+<div class="wrap" style="margin-top:60px">
+<div class="cols dac-hero-content">
+  <div class="col-1of2 dac-hero-figure">
+    <img src="/images/topic/instant-apps/upgrade-your-app-2x.png">
+  </div>
+<div class="col-1of2">
+<div class="dac-hero-tag"></div>
+
+  <h2 id="section-6">Upgrade Your Existing App</h2>
+  <p class="dac-hero-description">
+    Android Instant Apps functionality is an upgrade to your existing Android
+    app, not a new, separate app. It's the same Android APIs, the same
+    project, the same source code.  It can take less than a day to get
+    up and running for some developers, though the effort involved varies,
+    depending on how your app is structured. You modularize your app,
+    and Google Play downloads only the parts that are needed, on the fly.
+  </p>
+
+</div>
+</div>
+</div>
+
+<!-- Seventh section -->
+
+<div class="wrap" style="margin-top:60px" id="section-7">
+  <h2 id="sign-up-docs" style="margin-bottom: 0px;">
+    Sign up for access to Android Instant Apps documentation
+  </h2>
+
+  <p>
+    We’ll let you know if you’re selected for early access
+    to Android Instant
+    Apps.
+  </p>
+
+  <p>
+    <a class="landing-button green download-bundle-button"
+      href="https://docs.google.com/forms/d/1S3MzsMVIlchLCqyNLaFbv64llxWaf90QSeYLeswco90/viewform"
+      target="_blank">
+      I'M INTERESTED IN ANDROID INSTANT APPS<br>
+    </a>
+  </p>
+
+  <p style="margin-top:24px">
+    Check out our <a href="faqs.html">frequently asked questions</a> to find out
+    more about Android Instant Apps.
+  </p>
+</div>
+
+<style>
+
+  /* Sub-heading styling */
+  .sub-head {
+    font-size: 28px;
+    line-height: 125%;
+  }
+
+  /* Background color for hero module. */
+  .dac-section-light {
+    background: #B0BEC5;
+  }
+
+  /* Styling and layout for video. */
+  .dev-bytes-video {
+    margin-top: 30px;
+    position: relative;
+    padding-bottom: 56.25%; /* 16:9 */
+    padding-top: 30px;
+    height: 0;
+  }
+
+  .dev-bytes-video iframe,
+  .dev-bytes-video object,
+  .dev-bytes-video embed {
+    position: absolute;
+    top: 0;
+    left: 0;
+    width: 100%;
+    height: 100%;
+  }
+
+  /* Increase top margin for sections */
+  .wrap {
+    margin-top: 1.5em;
+  }
+
+  #section-3, #sign-up-docs {
+    margin-top: 0px;
+    border-top: 0px;
+  }
+
+  /* Align the seventh section in the center. */
+  #section-7 {
+    text-align: center;
+  }
+
+  /* GIF section styling */
+  .figure-caption {
+    text-align: center;
+  }
+
+  .partner-gifs {
+    width: 80%;
+    height: auto;
+  }
+
+  .gif-container {
+     text-align: center;
+  }
+
+</style>
+
+<script>
+
+(function () {
+
+  function swapOnMouseover(evt) {
+    var target = evt.target;
+    var imageSrc = $(target).attr("src");
+
+    // Assumes that images are named *-static and *-animated.
+    if (imageSrc.indexOf("static") > -1) {
+      var newImageSrc = imageSrc.replace("static.png", "animated.gif");
+      $(target).attr("src", newImageSrc).removeAttr("onmouseenter");
+    }
+  }
+
+  $(".partner-gifs").mouseenter(swapOnMouseover);
+
+})();
+
+</script>
\ No newline at end of file
index 70c9cff..e0b699a 100644 (file)
@@ -2071,7 +2071,7 @@ if (animator instanceof SimpleItemAnimator) {
           <li>Added support for a Collapse icon description in the {@link android.support.v7.widget.Toolbar}
           class.</li>
           <li>Updated the {@link android.support.v7.widget.SearchView} widget to support displaying
-          the {@link android.support.v7.appcompat.R.attr#commitIcon}. </li>
+          the {@link android.support.v7.mediarouter.R.attr#commitIcon}. </li>
           <li>Removed the <code>buttonGravity</code> attribute from the
           {@link android.support.v7.widget.Toolbar} class. </li>
         </ul>
@@ -2729,7 +2729,7 @@ android.support.v4.app.TaskStackBuilder} to provide support for implementing the
 <a href="{@docRoot}design/index.html">Android Design</a> guidelines for navigation. These
 additions include a way to implement the action bar's <em>Up</em> button across versions.
 For an example implementation of this pattern, see the AppNavigation sample in
-(<code><em>&lt;sdk&gt;</em>/samples/<em>&lt;platform&gt;</em>/AppNavigation</code>).</li>
+({@code <em>&lt;sdk&gt;</em>/samples/<em>&lt;platform&gt;</em>/AppNavigation}).</li>
           <li>Added {@link android.support.v4.app.NotificationCompat.Builder} to provide a
 compatibility implementation of Android 3.0's {@link android.app.Notification.Builder} helper class
 for creating standardized system notifications.</li>
index 62c0253..f5e9e87 100644 (file)
@@ -68,14 +68,43 @@ nonavpage=true
         </div>
       </div> <!-- end .wrap -->
       <div class="landing-scroll-down-affordance">
-        <a class="landing-down-arrow" href="#extending-android-to-wearables">
+        <a class="landing-down-arrow" href="#next-section">
           <img src="{@docRoot}wear/images/carrot.png" alt="Scroll down to read more">
         </a>
       </div>
     </div> <!-- end .landing-section .landing-hero -->
 
 
-    <div class="landing-rest-of-page">
+    <div class="landing-rest-of-page" id="next-section">
+
+
+      <section class="dac-expand dac-hero dac-light" style="background-color:#FFFFFF">
+        <div class="wrap" style="max-width:1100px;margin-top:0">
+          <div class="cols dac-hero-content" style="padding-bottom:1em;">
+
+            <div class="col-7of16 col-push-9of16" style="padding-left:2em">
+              <h1 class="dac-hero-title">Android Wear 2.0 Developer Preview</h1>
+              <p class="dac-hero-description">
+                Get ready for the next version of Android Wear!
+                Support stand-alone Wear devices and apps.
+                Create enhanced user interaction and glanceable experiences.
+                Test your apps on Wear devices.
+              </p>
+
+              <a class="dac-hero-cta" href="{@docRoot}wear/preview/index.html">
+                <span class="dac-sprite dac-auto-chevron"></span>
+                Get started
+              </a>
+            </div>
+            <div class="col-9of16 col-pull-7of16 dac-hero-figure" style="margin-top:1.5em;padding-right:1.5em;">
+              <img class="dac-hero-image" src="{@docRoot}wear/preview/images/hero-1x.png"
+                   srcset="{@docRoot}wear/preview/images/hero-1x.png 1x,
+                   {@docRoot}wear/preview/images/hero-2x.png 2x">
+            </div>
+          </div>
+        </div>
+      </section>
+
       <div class="landing-section" id="extending-android-to-wearables">
         <div class="wrap">
           <div class="landing-section-header">
index bf18c16..05f1a06 100644 (file)
@@ -12,26 +12,30 @@ page.image=images/cards/card-n-apis_2x.png
   <h2>Key developer features</h2>
   <ol>
       <ul style="list-style-type:none;">
-        <li><a href="#stand-alone">Stand Alone Devices</a>
+        <li><a href="#ui">User Interface Improvements</a>
           <ol>
-            <li><a href="#wear-apk">Wear-Specific APKs</a></li>
-            <li><a href="#network">Network Access</a></li>
-            <li><a href="#auth">Authentication</a></li>
+            <li><a href="#complications">Complications</a></li>
+            <li><a href="#drawers">Navigation and Action Drawers</a></li>
           </ol>
         </li>
-        <li><a href="#notify">Notifications and Interactions</a>
+
+        <li><a href="#notify">Notifications and Input</a>
           <ol>
-            <li><a href="#appoid">Appoids with Chat Templates</a></li>
-            <li><a href="#smart-replies">Smart Replies</a></li>
+            <li><a href="#expanded">Expanded Notification</a></li>
+            <li><a href="#messaging">Messaging Style Notification</a></li>
+            <li><a href="#smart-replies">Smart Reply</a></li>
+            <li><a href="#content-action">Notification Content Action</a>
             <li><a href="#remote-input">Remote Input</a></li>
+            <li><a href="#bridging">Bridging Mode</a></li>
             <li><a href="#imf">Input Method Framework</a></li>
           </ol>
         </li>
-        <li><a href="#ui">User Interface Improvements</a>
+
+        <li><a href="#stand-alone">Standalone Devices</a>
           <ol>
-            <li><a href="#complicatiosn">Complications</a></li>
-            <li><a href="#drawers">Navigation and Action Drawers</a></li>
-            <li><a href="#button-loc">Button Locations</a></li>
+            <li><a href="#wear-apk">Wear-Specific APKs</a></li>
+            <li><a href="#network">Network Access</a></li>
+            <li><a href="#auth">Authentication</a></li>
           </ol>
         </li>
       </ol>
@@ -47,78 +51,283 @@ page.image=images/cards/card-n-apis_2x.png
 </p>
 
 
-<h2 id="stand-alone">Stand Alone Devices</h2>
+<h2 id="ui">User Interface Improvements</h2>
 
-<p>Description of developer theme</p>
+<p>The preview introduces powerful additions to the user interface, opening up
+exciting possibilities to developers.
+A complication is any feature in a watch face that displays more than hours and
+minutes. With the Complications API,
+ watch faces can display extra information and separate apps can expose complication
+  data.
+The navigation and action drawers provide users with new ways to interact with apps.
+</p>
 
-<h3 id="wear-apk">Wear-Specific APKs</h3>
 
-<p>Description of feature</p>
+<h3 id="complications">Complications</h3>
+<img src="{@docRoot}wear/preview/images/complications-main-image.png"
+  height="320" style="float:right;margin:10px 0 0 40px" />
 
-<p>Sample implementation of feature</p>
+<p>
+  A <a href=
+  "https://en.wikipedia.org/wiki/Complication_(horology)">complication</a> is a
+  feature of a watch face that displays more than hours and minutes, such as a
+  battery indicator or a step counter. The Complications API helps watch face
+  developers create these features visual features and data connections they
+  require.
+</p>
 
-<h3 id="network">Network Access</h3>
+<p>
+  Watch faces that use this API can display extra information without needing
+  code for getting the underlying data. Data providers can supply data to any
+  watch face using the API.
+</p>
 
-<p>Description of feature</p>
+<p>For examples of how to use this feature,
+see <a href="{@docRoot}wear/preview/features/complications.html">
+ Watch Face Complications</a>.
+</p>
 
-<p>Sample implementation of feature</p>
 
-<h3 id="auth">Authentication</h3>
+<h3 id="drawers">Navigation and Action drawers</h3>
+
+<p>Wear 2.0 introduces two new widgets, navigation drawer and action drawer. These
+ widgets give your users new ways to interact with your app. The navigation drawer
+  appears at the top of the screen and allows users to navigate between app views.
+   The  action drawer appears at the bottom of the screen and allows users to choose
+    from a list of actions associated with the current usage context.  These drawers
+     are accessible to users when they edge swipe from the top or bottom of the
+     screen; they peek when users scroll in an opposite direction.
+</p>
+
+<div class="cols">
+  <div class="col-2of6">
+    <img src="{@docRoot}wear/preview/images/nav_drawer.gif"
+      height="240" alt="" style="padding:.5em">
+  </div>
+  <div class="col-2of6">
+    <img src="{@docRoot}wear/preview/images/action_drawer.gif"
+      height="240" alt="" style="padding:.5em;">
+  </div>
+</div>
+
+<p>
+  To learn how to add these widgets to your app, see
+  <a href="{@docRoot}wear/preview/features/ui-nav-actions.html">
+  Wear Navigation and Actions</a>.
+</p>
 
-<p>Description of feature</p>
 
-<p>Sample implementation of feature</p>
+<h2 id="notify">Notifications and Input</h2>
 
+<p>In Wear 2.0, we’ve redesigned the key experiences on the watch to be even more
+ intuitive and provide users new ways to respond to messages. Some of the highlights
+  are below; for a complete list of changes, see
+  <a href="{@docRoot}wear/preview/features/notifications.html">Notification Changes in Wear 2.0</a>.
 
 
-<h2 id="notify">Notifications and Interactions</h2>
+<img src="{@docRoot}wear/preview/images/expanded_diagram.png" height="340"
+  style="float:left;margin:10px 20px 0 0" />
+<h3 id="expanded">Expanded notifications</h3>
 
-<p>Description of developer theme</p>
+<p>
+  When a user taps on a notification that is bridged from the phone to the
+  watch or that lacks a
+  <a href="{@docRoot}reference/android/support/v4/app/NotificationCompat.Builder.html#setContentIntent(android.app.PendingIntent)">
+  {@code contentIntent}</a>, the user will be taken to the expanded view of
+  that notification. When you <a href=
+  "{@docRoot}training/wearables/notifications/pages.html">specify additional
+  content pages</a> and actions for a notification, those are available to the
+  user within the expanded notification. Each expanded notification follows
+  <a href="https://google.com/design/wear">Material Design for Android
+  Wear</a>, so the user gets an app-like experience.
+</p>
+
+
+<h3 id="messaging">Messaging Style notification</h3>
+<p> If you have a chat messaging app, your notifications should use
+{@code Notification.MessagingStyle}, which is new in Android 6.0. Wear 2.0 uses
+the chat messages included in a
+<a href="{docRoot}preview/features/notification-updates.html#style">{@code MessagingStyle}</a>
+ notification
+(see {@code addMessage()}) to provide a rich chat app-like experience in the
+expanded notification.
+</p>
 
-<h3 id="appoid">Appoids with Chat Templates</h3>
 
-<p>Description of feature</p>
+<h3 id="smart-replies">Smart Reply</h3>
 
-<p>Sample implementation of feature</p>
+<p>Android Wear 2.0 introduces support for Smart Reply in
+<a href="{@docRoot}wear/preview/features/notifications.html#messaging">{@code MessagingStyle}</a>
+ notifications. Smart Reply provides the user with contextually relevant,
+ touchable choices in the expanded notification and in
+ <a href="{@docRoot}reference/android/app/RemoteInput.html">{@code RemoteInput}</a>.
+</p>
 
-<h3 id="smart-replies">Smart Replies</h3>
+<p>By enabling Smart Reply for your {@code MessagingStyle} notifications, you provide
+users a fast (single tap), discreet (no speaking aloud), and reliable way to respond
+ to chat messages they receive.
+ </p>
 
-<p>Description of feature</p>
 
-<p>Sample implementation of feature</p>
+<img src="{@docRoot}wear/preview/images/remoteinput.png" height="350"
+  style="float:right;margin:10px 0 0 40px" />
 
 <h3 id="remote-input">Remote Input</h3>
 
-<p>Description of feature</p>
+<p>Wear 2.0 users can choose between various input options from
+<a href="{@docRoot}reference/android/app/RemoteInput.html">Remote Input</a>.
+ These options include:
+</p>
+<ul>
+<li>Dictation</li>
+<li>Emoji</li>
+<li>Canned responses</li>
+<li>Smart Reply</i>
+<li>Default IME </i>
+</ul>
 
-<p>Sample implementation of feature</p>
+<p>
+For messaging notifications with Smart Reply, the system-generated Smart Reply
+ appears within <a href="{@docRoot}reference/android/app/RemoteInput.html">{@code RemoteInput}</a>
+  above the developer-provided list of canned responses.
+  You can also use the
+  <a href="{@docRoot}reference/android/app/RemoteInput.Builder.html#setChoices(java.lang.CharSequence[])">setChoices()</a>
+   method in the {@code RemoteInput} API to enable users to select from a list
+   of canned responses.
+</p>
+
+<h3 id="bridging"> Bridging Mode </h3>
+<p>By default, notifications are
+<a href="{@docRoot}training/wearables/notifications/index.html">
+bridged</a> (shared) from an app on a companion phone
+to the watch. Since a phone app and a standalone watch app may be sources of the
+ same notifications, the Android Wear 2.0 Preview includes a Bridging mode feature.
+  Developers can begin planning to change the behavior of notifications with the
+  following:
+</p>
+
+<ul>
+<li>Specifying in the standalone app's Android manifest file that notifications from
+ the corresponding phone app should not be bridged to the watch. </li>
+<li>Setting a dismissal ID so notification dismissals (by users) are synced across
+devices.</li>
+</ul>
+
+<p>For an example of how to use this feature, see <a href="{@docRoot}wear/preview/features/bridger.html">
+Bridging Mode for Notifications</a>.</p>
 
 <h3 id="imf">Input Method Framework</h3>
 
-<p>Description of feature</p>
+<p>Wear 2.0 extends the Android input method framework (IMF) to Android Wear.
+This allows users to enter text on Wear using the system default IME or third party
+ IMEs.  The Wear IME lets the user enter text via gesture typing as well as tapping
+  individual keys. The IMF APIs used for Wear devices are the same as other form
+  factors, though usage is slightly different due to limited screen real estate.
+</p>
 
-<p>Sample implementation of feature</p>
+<p>Wear provides user settings on the watch that let the user:</p>
+<ul>
+<li>Enable multiple IMEs from the list of installed IMEs.</li>
+<li>Set a single default IME from the list of enabled IMEs.</li>
+<li>Change languages for various IMEs.</li>
+</ul>
 
+<p>To learn how to create an IME for Wear, see <a href="{@docRoot}wear/preview/features/ime.html">
+Input Method Framework</a>.
+</p>
 
 
-<h2 id="ui">User Interface Improvements</h2>
+<h2 id="stand-alone">Standalone Devices</h2>
+
+<p>Standalone watches will enable Android Wear apps to work independently of phone
+ apps. This means your app can continue to offer full functionality even if the
+ paired phone is far away or turned off. </p>
+
+<h3 id="wear-apk">Wear-Specific APKs</h3>
+
+<p>For delivery to a watch, an Android Wear app is currently embedded in its corresponding
+phone app. This delivery method can result in an increased download size for users,
+ regardless of whether they have an Android Wear device.
+</p>
+
+<p>With standalone devices, the
+<a href ="{@docRoot}google/play/publishing/multiple-apks.html">Multi-APK</a>
+ delivery method will be used. Developers will have the ability to release Android
+  Wear apps independently of the corresponding phone apps. Please stay tuned for
+   more information about this change.
+</p>
 
-<p>Description of developer theme</p>
+<h3 id="network">Network Access</h3>
 
-<h3 id="complicatiosn">Complications</h3>
+<p>Since Android Wear apps will work independently of phone apps, Android Wear's
+ network access will no longer require the
+ <a href="{@docRoot}training/wearables/data-layer/index.html">
+ Wearable Data Layer API</a>. Android Wear apps will have the ability to make
+ their own network requests. Additionally, they will be able to directly use
+ Google Cloud Messaging.
+</p>
 
-<p>Description of feature</p>
+<p>No APIs for network access or GCM are specific to Android Wear; refer to the
+existing documentation about
+<a href="{@docRoot}training/basics/network-ops/connecting.html">
+Connecting to the Network</a> and
+<a href="https://developers.google.com/cloud-messaging/">Cloud Messaging</a>.
+</p>
 
-<p>Sample implementation of feature</p>
+<p>We recommend using the following libraries:</p>
+<ul>
+<li><a href="{@docRoot}reference/android/app/job/JobScheduler.html">
+JobScheduler</a> for asynchronous jobs, including polling at regular intervals
+</li>
+<li>Multi-networking APIs if you need to connect to specific network types; see
+the <a href="{@docRoot}about/versions/android-5.0.html#Wireless">
+Multiple Network Connections</a>
+</li>
+</ul>
 
-<h3 id="drawers">Navigation and Action Drawers</h3>
+<p>You will still be able to use the
+<a href="{@docRoot}training/wearables/data-layer/index.html">
+ Wearable Data Layer API</a> to communicate with a phone app.
+ However, use of this API to connect to a network will be discouraged.
+ </p>
 
-<p>Description of feature</p>
 
-<p>Sample implementation of feature</p>
+<h3 id="auth">Authentication</h3>
+
+<p>Since Android Wear apps will work independently of phone apps, Android Wear's
+ authentication capabilities will be more powerful; apps will have new ways to
+ authenticate.</p>
+
+ <h4> Authentication tokens can be passed over the Wearable Data Layer </h4>
+
+<p>For Android-paired watches (only), the phone will securely transfer authentication
+ data to a watch app via the
+ <a href="{@docRoot}training/wearables/data-layer/index.html">
+ Wearable Data Layer API</a>. The data can be transferred as
+ Messages or Data Items. </p>
+
+<p>If your watch app needs to determine if your phone app is installed, you can
+advertise a capability on the phone app and retrieve the capability on the watch.
+ For more information, see following sections of
+ <a href="{@docRoot}training/wearables/data-layer/messages.html">
+ Sending and Receiving Messages</a>:
+ <ul>
+ <li>Advertise Capabilities</li>
+ <li>Retrieve the Nodes with the Required Capabilities</li>
+ </ul>
+<h4>Users can enter a username and password on a watch</h4>
+
+<p>Google Keyboard will be standard on Android Wear, allowing for direct text entry.
+ This feature will work as expected with standard
+ <a href="{@docRoot}reference/android/widget/EditText.html">
+  EditText widgets</a>. For passwords, the {@code textPassword} attribute will be
+   used.
+
+<h4>Utilizing Account Manager</h4>
+Android Wear will include the <a href="{@docRoot}reference/android/accounts/AccountManager.html">
+AccountManager</a>, which will be accessible for syncing and storing account
+ data, as it is on an Android phone.
+</p>
 
-<h3 id="button-loc">Button Locations</h3>
 
-<p>Description of feature</p>
 
-<p>Sample implementation of feature</p>
index eea4f11..9311494 100644 (file)
@@ -1,9 +1,10 @@
 page.title=Download and Test with a Device
 meta.keywords="wear-preview"
 page.tags="wear-preview"
-page.image=images/cards/card-n-sdk_2x.png
+page.image=images/cards/card-n-downloads_2x.png
 
 @jd:body
+
 <div style="position:relative; min-height:600px">
 
   <div class="wrap" id="tos" style="position:absolute;display:none;width:inherit;">
@@ -192,17 +193,17 @@ This is the Android Wear SDK Preview License Agreement (the “License Agreement
     </ul>
 
     <p>
-      If you want an environment for basic <strong>compatibility
-      testing</strong> of your app, you can use your current APK and a
+      If you want an environment for basic compatibility
+      testing of your app, you can use your current APK and a
       supported watch or an emulator. As described below, you don't necessarily
       need to update your full development environment to do basic testing.
     </p>
 
     <p>
-      However, if you want to <strong>modify</strong> your app to target
+      However, if you want to modify your app to target
       Android Wear 2.0 or use new APIs, you need to update your development
       environment. See <a href="{@docRoot}wear/preview/start.html">Get Started
-      with the Android Wear 2.0 Preview</a>.
+      with the Preview</a>.
     </p>
 
     <h2 id="set_up_a_watch">
@@ -211,7 +212,7 @@ This is the Android Wear SDK Preview License Agreement (the “License Agreement
 
     <p>
       You can download a system image and manually flash it to a matching
-      watch. See the table below to download the system image for your test
+      watch. See the table below to download the image for your test
       watch.
     </p>
 
@@ -221,9 +222,9 @@ This is the Android Wear SDK Preview License Agreement (the “License Agreement
       testing.
     </p>
 
-    <p>
-      Installing a system image on a watch <strong>removes all data from the
-      watch</strong>, so you should back up your data first.
+    <p class="warning">
+      <strong>Warning:</strong> Installing a system image on a watch removes all data from the
+      watch, so you should back up your data first.
     </p>
 
     <h3 id="preview_system_images">
@@ -240,78 +241,79 @@ This is the Android Wear SDK Preview License Agreement (the “License Agreement
       Preview image for LGE Watch Urbane 2nd Edition
     </h4>
 
-    <p>
-      <strong>Please note the following:</strong>
-      Flashing your device will
+    <p class="caution">
+      <strong>Caution:</strong> Flashing your device will
       require unlocking the bootloader which may
       void the device's warranty--proceed at your own risk.
      </p>
 
     <table>
       <tr>
-        <th scope="col">
+        <th style="width:300px">
           Type of LGE Watch Urbane 2nd Edition image
         </th>
-        <th scope="col">
+        <th>
           Download/Checksums
         </th>
       </tr>
-      <tr id="download-3-placeholder">
+
+      <tr id="nemo-preview">
         <td>
           Preview image for testing
         </td>
-        <td><a href="#top" onclick="onDownload(this)">download-3-placeholder.tgz</a><br>
-          MD5: [string]<br>
-          SHA-1: [string]
+        <td><a href="#top" onclick="onDownload(this)">nemo-nvd36h-factory-fb7a294a.tgz</a><br>
+          MD5: 9dd0572fdab02e474ea9c761d1d2b70b<br>
+          SHA-1: fb7a294a91ec71280262e7a1a60fcf940131e6c3
         </td>
       </tr>
-      <tr id="download-4-placeholder">
+
+      <tr id="nemo-non-preview">
         <td>
           Non-preview image (for after testing)
         </td>
-        <td><a href="#top" onclick="onDownload(this)">download-4-placeholder.tgz</a><br>
-          MD5: [string]<br>
-          SHA-1: [string]
+        <td><a href="#top" onclick="onDownload(this)">nemo-mnc40x-factory-fa528bec.tgz</a><br>
+          MD5: 0b8ba3653d5a93cb854f4d7409d7b6c9<br>
+          SHA-1: fa528bec8aba3bf6c7d901ba63cd6ea0a08dbeb0
         </td>
       </tr>
+
     </table>
 
     <h4 id="preview_image_for_huawei_watch">
       Preview image for Huawei Watch
     </h4>
 
-    <p>
-      <strong>Please note the following:</strong>
-      Flashing your device will require unlocking
+    <p class="caution">
+      <strong>Caution:</strong> Flashing your device will require unlocking
       the bootloader which
       shall void the device's warranty--proceed at your own risk.
     </p>
 
     <table>
       <tr>
-        <th scope="col">
+        <th style="width:300px">
           Type of Huawei Watch image
         </th>
-        <th scope="col">
+        <th>
           Download/Checksums
         </th>
       </tr>
-      <tr id="download-1-placeholder">
+      <tr id="sturgeon-preview">
         <td>
           Preview image for testing
         </td>
-        <td><a href="#top" onclick="onDownload(this)">download-1-placeholder.tgz</a><br>
-          MD5: [string]<br>
-          SHA-1: [string]
+        <td><a href="#top" onclick="onDownload(this)">sturgeon-nvd36h-factory-fd1f1582.tgz</a><br>
+          MD5: b54f4ff5ebcd3d50d6d1bfde93056c2a<br>
+          SHA-1: fd1f158257dba0999738ca7e0bfacec97afe35df
         </td>
       </tr>
-      <tr id="download-2-placeholder">
+      <tr id="sturgeon-non-preview">
         <td>
           Non-preview image (for after testing)
         </td>
-        <td><a href="#top" onclick="onDownload(this)">download-2-placeholder.tgz</a><br>
-          MD5: [string]<br>
-          SHA-1: [string]
+        <td><a href="#top" onclick="onDownload(this)">sturgeon-mec23l-factory-48003078.tgz</a><br>
+          MD5: 417b5cbddb29a2262bce133e283d2732<br>
+          SHA-1: 4800307843580f818557dd7c43d8ba2161e289b2
         </td>
       </tr>
     </table>
@@ -323,18 +325,24 @@ This is the Android Wear SDK Preview License Agreement (the “License Agreement
     <p>
       The steps for flashing an image to a watch are similar to the <a href=
       "https://developers.google.com/android/nexus/images">steps provided for
-      flashing to a phone</a>. After you <strong>back up your watch
-      data</strong>, use steps in this section to flash the image to the
-      <strong>specific watch</strong> that matches the image (e.g., you must
+      flashing to a phone</a>. After you back up your watch
+      data, use steps in this section to flash the image to the
+      specific watch that matches the image (e.g., you must
       use an LGE Watch Urbane 2nd Edition for the corresponding image).
     </p>
 
+    <p class="warning">
+      <strong>Warning:</strong> Installing a system image on a watch removes all data from the
+      watch, so you should back up your data first.
+    </p>
+
     <h4 id="set_up_the_watch_to_be_flashed">
       Set up the watch to be flashed
     </h4>
 
     <p>
-      On the watch, enable the Developer Options menu and ADB debugging as
+      From the phone, unpair ("Forget") the watch.
+      Then on the watch, enable the Developer Options menu and ADB debugging as
       follows:
     </p>
 
@@ -386,8 +394,8 @@ This is the Android Wear SDK Preview License Agreement (the “License Agreement
     </p>
 
     <ol>
-      <li>Download and unzip the appropriate system image from the "Preview
-      system image" column in the <a href="#preview_system_images">table
+      <li>Download and unzip the appropriate system image from a "Preview
+      image for testing" row in a <a href="#preview_system_images">table
       above</a>.
       </li>
 
@@ -404,9 +412,9 @@ This is the Android Wear SDK Preview License Agreement (the “License Agreement
       <code>adb reboot bootloader</code>
       </li>
 
-      <li>If necessary, use <strong>one</strong> of following two commands to
-      unlock the device's bootloader. This step <strong>erases all data on the
-      device</strong>: <code>fastboot flashing unlock</code> or, for some
+      <li>If necessary, use one of following two commands to
+      unlock the device's bootloader. This step erases all data on the
+      device: <code>fastboot flashing unlock</code> or, for some
       devices, <code>fastboot oem unlock</code>
       </li>
 
@@ -420,8 +428,43 @@ This is the Android Wear SDK Preview License Agreement (the “License Agreement
       </li>
     </ol>
 
+
+    <h4 id="set_up_watch">
+      Set up the watch and begin testing
+    </h4>
+
+      <p>
+        After the <code>flash-all</code> script finishes, your watch reboots
+        and soon will be ready for testing with the preview image.
+      </p>
+
+    <ol>
+      <li>Attach the watch charger to the watch and plug the USB cord
+      into your computer, if it is not already plugged in.
+      </li>
+
+      <li>Use the following <a href="{@docRoot}tools/help/adb.html">adb
+      command</a> to confirm that the watch is available:
+      <code>adb devices</code>
+      </li>
+
+      <li>Use the following adb command to start the device in fastboot mode:
+      <code>adb reboot bootloader</code>
+      </li>
+
+      <li>Use the following command to
+      lock the device's bootloader: <code>fastboot flashing lock</code> or, for some
+      devices, <code>fastboot oem lock</code>
+      </li>
+
+      <li>On the watch, continue the boot by touching <strong>'0'</strong>.
+      </li>
+
+    </ol>
+
+
     <p>
-      After the script finishes, your watch reboots. Pair the watch with a
+      Pair the watch with a
       phone or tablet. The preview now is available for testing on the watch.
       Before installing an app, enable the Developer Options menu, and ADB
       debugging, on the watch as follows:
@@ -477,20 +520,21 @@ This is the Android Wear SDK Preview License Agreement (the “License Agreement
 
     <p>
       When testing is completed, follow the steps for <a href=
-      "#uninstall_the_preview_from_a_watch">uninstalling the preview</a>.
+      "#remove_the_preview_from_a_watch">removing the preview</a>.
     </p>
 
-    <h3 id="uninstall_the_preview_from_a_watch">
-      Uninstall the preview from a watch
+    <h3 id="remove_the_preview_from_a_watch">
+      Remove the preview from a watch
     </h3>
 
     <p>
-      When testing with the preview is done, restore the watch as follows:
+      When testing with the preview is done, unpair ("Forget") the watch from the phone and
+      restore the watch as follows:
     </p>
 
     <ol>
-      <li>Download and unzip the appropriate system image from the "Non-preview
-      system image" column in the <a href="#preview_system_images">table
+      <li>Download and unzip the appropriate system image from a "Non-preview
+      image" row in a <a href="#preview_system_images">table
       above</a>.
       </li>
 
@@ -523,8 +567,10 @@ This is the Android Wear SDK Preview License Agreement (the “License Agreement
       <li>Click <strong>Create Virtual Device</strong>.
       </li>
 
-      <li>In the <strong>Category</strong> pane, select Wear, choose a name
-      (such as Android Wear Round), and click <strong>Next</strong>.
+      <li>In the <strong>Category</strong> pane, select Wear, choose a hardware profile,
+       and click <strong>Next</strong>. The Android Wear 2.0 Developer Preview
+       is only optimized for round devices currently, so we recommend not
+       using the square or chin profiles for now.
       </li>
 
       <li>Select an <strong>N</strong> image to download. The images may be on
@@ -554,7 +600,7 @@ This is the Android Wear SDK Preview License Agreement (the “License Agreement
 
 
 <script>
-  var urlRoot = "http://storage.googleapis.com/androiddevelopers/shareables/wear/preview/";
+  var urlRoot = "http://storage.googleapis.com/androiddevelopers/shareables/wear-preview/";
   function onDownload(link) {
 
     $("#downloadForRealz").html("Download " + $(link).text());
index 4f0d76b..b7be093 100644 (file)
@@ -1,7 +1,7 @@
 page.title=Bridging Mode for Notifications
 meta.keywords="wear-preview"
 page.tags="wear-preview"
-page.image=images/cards/card-n-sdk_2x.png
+
 @jd:body
 
     <div id="qv-wrapper">
@@ -25,22 +25,21 @@ page.image=images/cards/card-n-sdk_2x.png
     <p>
       By default, notifications <a href=
       "{@docRoot}training/wearables/notifications/index.html">are bridged
-      (shared)</a> from an app on a companion phone to the watch. Standalone
-      Android Wear apps are planned for Android Wear 2.0. Therefore, a phone
-      app and a standalone watch app may be sources of the same notifications.
-      The Android Wear 2.0 Preview includes a Bridging mode feature to handle
-      this problem of duplicate notifications.
+      (shared)</a> from an app on a companion phone to the watch. If you build
+      a standalone watch app and have a companion phone app, they may duplicate
+      notifications. The Android Wear 2.0 Preview includes a Bridging mode
+      feature to handle this problem of repeated notifications.
     </p>
 
     <p>
-      With the Android Wear 2.0 Preview, developers can plan to change the
+      With the Android Wear 2.0 Preview, developers can change the
       behavior of notifications with the following:
     </p>
 
     <ul>
       <li>Specifying in the standalone app's Android manifest file that
-      notifications from the corresponding phone app should <strong>not be
-      bridged</strong> to the watch
+      notifications from the corresponding phone app should not be
+      bridged to the watch
       </li>
 
       <li>Setting a dismissal ID so notification dismissals are synced across
@@ -53,14 +52,15 @@ page.image=images/cards/card-n-sdk_2x.png
     </h2>
 
     <p>
-      To prevent bridging of notifications from a phone app, you can use a
+      To prevent bridging of notifications from a phone app, you can use an
       entry in the manifest file of the watch app (e.g. the standalone watch
       app), as follows:
     </p>
 
     <pre>
 com.google.android.wearable.notificationBridgeMode
-</pre>
+    </pre>
+
     <p>
       Setting that entry to <code>NO_BRIDGING</code> will prevent bridging:
     </p>
@@ -96,7 +96,7 @@ com.google.android.wearable.notificationBridgeMode
     </p>
 
     <p>
-      Thus, if bridging should be prevented <strong>when</strong> the watch app
+      Thus, if bridging should be prevented when the watch app
       is installed, use the <a href=
       "#preventing_bridging_with_the_bridging_mode_feature">Bridging mode
       feature</a>.
@@ -118,7 +118,7 @@ com.google.android.wearable.notificationBridgeMode
     <pre>
 public WearableExtender setDismissalId(String dismissalId)
 public String getDismissalId()
-</pre>
+    </pre>
     <p>
       To enable a dismissal to be synced, use the <code>setDismissalId()</code>
       method. For each notification, pass a globally unique ID, as a string,
@@ -140,7 +140,7 @@ Notification notification = new NotificationCompat.Builder(context)
 &lt;set other fields&gt;
 .extend(wearableExtender)
 .build();
-</pre>
+    </pre>
     <p>
       Dismissal IDs work if a watch is paired to an Android phone, but not if a
       watch is paired to an iPhone.
index 155f733..a0157de 100644 (file)
@@ -1,46 +1,52 @@
 page.title=Watch Face Complications
 meta.keywords="wear-preview"
 page.tags="wear-preview"
-page.image=images/cards/card-n-sdk_2x.png
-
+page.image=/wear/preview/images/complications-main-image.png
 @jd:body
 
     <div id="qv-wrapper">
       <div id="qv">
-        <ol>
+    <h2>In this document</h2>
+      <ol>
           <li>
-            <a href=
-            "#adding_complications_to_a_watch_face">Adding Complications to a Watch Face</a>
+            <a href="#adding_complications_to_a_watch_face">Adding
+            Complications to a Watch Face</a>
           </li>
           <li>
-            <a href=
-            "#exposing_data_to_complications">Exposing Data to Complications</a>
+            <a href="#exposing_data_to_complications">Exposing Data to
+            Complications</a>
           </li>
           <li>
-            <a href=
-            "#using_complication_types">Using Complication Types</a>
+            <a href="#using_complication_types">Using Complication Types</a>
           </li>
           <li>
-            <a href=
-            "#using_fields_for_complication_data">Using Fields for Complication Data</a>
+            <a href="#using_fields_for_complication_data">Using Fields for
+            Complication Data</a>
           </li>
           <li>
-            <a href=
-            "#api_additions">API Additions</a>
+            <a href="#api_additions">API Additions</a>
           </li>
-        </ol>
+      </ol>
+    <h2>See Also</h2>
+      <ol>
+        <li><a class="external-link"
+          href="https://github.com/googlesamples/android-WatchFace">Watch
+          Face sample app with complications</a></li>
+      </ol>
       </div>
     </div>
 
     <p>
-      A complication is a feature of a watch face <a href=
-      "https://en.wikipedia.org/wiki/Complication_(horology)">beyond hours and
-      minutes</a>. For example, a battery indicator is a complication.
+      A complication is any feature in a watch face that displays <a href=
+      "https://en.wikipedia.org/wiki/Complication_(horology)">more than hours and
+      minutes</a>. For example, a battery indicator is a complication. The
+      Complications API is for both watch faces and data provider apps.
     </p>
 
-    <p>
-      The Complications API is for both watch faces and data provider apps.
-    </p>
+    <div class="col-4of10">
+      <img src="../images/complications-main-image.png" alt="Complications"
+      id="img-split-screen">
+    </div>
 
     <p>
       Watch faces can display extra information without needing code for
@@ -50,41 +56,44 @@ page.image=images/cards/card-n-sdk_2x.png
     </p>
 
     <p>
-      For creating or modifying watch faces, see <a href=
-      "#adding_complications_to_a_watch_face">Adding complications to a watch
-      face</a>.
-    </p>
-
-    <p>
-      For writing apps that provide data to watch faces, see <a href=
-      "#exposing_data_to_complications">Exposing data to complications</a>.
-    </p>
-
-    <p>
       Along with reviewing this page, download the Android Wear 2.0 Preview
-      Reference and review the <a href="#api_additions">API additions</a> in
-      the Javadoc for complications.
+      Reference (see the Complications API <a href=
+      "#api_additions">additions</a>) and review the Javadoc for complications.
     </p>
 
     <p>
       Apps that provide data to watch faces for complications are called
-      "complication data providers." These apps lack control over how their
-      data is rendered. The consuming watch faces are responsible for drawing
+      "complication data providers." These apps are not responsible for controlling
+      how their data is rendered on the watch face.
+      This allows a watch face to integrate the data naturally with the
+      watch face design.
+      The consuming watch faces are responsible for drawing
       the complications.
     </p>
 
     <p>
+      Watch faces can receive complication data of
+      <a href="#using_complication_types">various types</a> (e.g. small text
+      data or icon data) and then display it.
+    </p>
+
+    <p>
       As indicated in the diagram below, Android Wear mediates the flow of data
       from providers to watch faces.
     </p>
 
-    <img src="../images/complications-data-flow.png" width="" alt="Complications data flow" title=
-    "Complications data flow">
+    <img src="../images/complications-data-flow.png" width="" alt=
+    "Complications data flow" title="Complications data flow">
 
     <p>
-      Through this process, watch faces can receive complication data of
-      <a href="#using_complication_types">various types</a> (e.g. small text
-      data or icon data) and then display it.
+      For creating or modifying watch faces, see <a href=
+      "#adding_complications_to_a_watch_face">Adding complications to a watch
+      face</a>.
+    </p>
+
+    <p>
+      For writing apps that provide data to watch faces, see <a href=
+      "#exposing_data_to_complications">Exposing data to complications</a>.
     </p>
 
     <h2 id="adding_complications_to_a_watch_face">
@@ -205,15 +214,17 @@ android.support.wearable.complications.ACTION_COMPLICATION_UPDATE_REQUEST
     <p>
       The service's manifest entry should also include an
       <code>android:icon</code> attribute. The provided icon should be a
-      single-color white icon. This icon should represent the provider and will
-      be shown in the provider chooser.
+      single-color white icon. Vector drawables are recommended for the icons.
+      An icon should represent the provider and will be shown in the provider
+      chooser.
     </p>
 
     <p>
       Include metadata to specify the supported types, update period, and
       configuration action, if required; for details, download the Android Wear
       2.0 Preview Reference and see the keys listed for the
-      <code>ComplicationProviderService</code> class (in the Javadoc).
+      <code>ComplicationProviderService</code> class (in the Javadoc; see
+      <a href="#api_additions">API Additions</a>).
     </p>
 
     <h3 id="update_period">
@@ -266,11 +277,7 @@ android.support.wearable.complications.UPDATE_PERIOD_SECONDS
     <p>
       Then create the configuration activity with an intent filter for that
       action. The configuration activity must reside in the same package as the
-      provider.
-    </p>
-
-    <p>
-      The configuration activity must return <code>RESULT_OK</code> or
+      provider. The configuration activity must return <code>RESULT_OK</code> or
       <code>RESULT_CANCELED</code>, to tell the system whether the provider
       should be set.
     </p>
@@ -281,14 +288,15 @@ android.support.wearable.complications.UPDATE_PERIOD_SECONDS
     </p>
 
     <p>
-      For details, download the Android Wear 2.0 Preview Reference, containing
-      the Javadoc, and see the following in the
-      <code>ComplicationProviderService</code> class:
+      For details, download the Android Wear 2.0 Preview Reference (see
+      <a href="#api_additions">API Additions</a>), containing the Javadoc, and
+      see the following in the <code>ComplicationProviderService</code> class:
     </p>
 
     <pre>
 METADATA_KEY_PROVIDER_CONFIG_ACTION
-</pre>
+    </pre>
+
     <h2 id="using_complication_types">
       Using Complication Types
     </h2>
@@ -340,6 +348,16 @@ METADATA_KEY_PROVIDER_CONFIG_ACTION
       gauges can be shown without including text.
     </p>
 
+    <h3 id="examples_of_complication_types">
+      Examples of Complication Types
+    </h3>
+
+    <p>
+      The following shows examples of complication types:
+    </p>
+    <img src="../images/complication-type-exs.png" width="" alt=
+    "Complication types" title="Complications types - examples">
+
 
     <h3 id="types_and_fields">
       Types and fields
@@ -352,16 +370,16 @@ METADATA_KEY_PROVIDER_CONFIG_ACTION
 
     <table>
       <tr>
-        <th scope="col">
+        <th>
           Type
         </th>
-        <th scope="col">
+        <th>
           Required fields
         </th>
-        <th scope="col">
+        <th>
           Optional fields
         </th>
-        <th scope="col">
+        <th>
           Notes
         </th>
       </tr>
@@ -374,7 +392,8 @@ METADATA_KEY_PROVIDER_CONFIG_ACTION
           Short text
         </td>
         <td>
-          IconShort title
+          Icon<br>
+          Short title
         </td>
         <td>
           Exactly one of Icon/Short title is expected to be shown if either or
@@ -384,16 +403,16 @@ METADATA_KEY_PROVIDER_CONFIG_ACTION
 
       <tr>
         <td>
-          LONG_TEXT
+          ICON
         </td>
         <td>
-          Long text
+          Icon
         </td>
         <td>
-          Long titleIcon*Small image
         </td>
         <td>
-          Title is expected to be shown if provided.
+          Used when text is not needed.The icon is expected to be single-color,
+          and may be tinted by the watch face.
         </td>
       </tr>
 
@@ -402,29 +421,34 @@ METADATA_KEY_PROVIDER_CONFIG_ACTION
           RANGED_VALUE
         </td>
         <td>
-          ValueMin valueMax value
+          Value<br>
+          Min value<br>
+          Max value
         </td>
         <td>
-          IconShort textShort title
+          Icon<br>
+          Short text<br>
+          Short title
         </td>
         <td>
-          Optional fields are not guaranteed to be displayed. Uses include for
-          numerical data within bounds, such as for a percentage.
+          Optional fields are not guaranteed to be displayed.
         </td>
       </tr>
 
       <tr>
         <td>
-          ICON
+          LONG_TEXT
         </td>
         <td>
-          Icon
+          Long text
         </td>
         <td>
+          Long title<br>
+          Icon<br>
+          Small image
         </td>
         <td>
-          Used when text is not needed.The icon is expected to be single-color,
-          and may be tinted by the watch face.
+          Title is expected to be shown if provided.
         </td>
       </tr>
 
@@ -467,16 +491,16 @@ METADATA_KEY_PROVIDER_CONFIG_ACTION
 
     <table>
       <tr>
-        <th scope="col">
+        <th>
           Type
         </th>
-        <th scope="col">
+        <th>
           Required fields
         </th>
-        <th scope="col">
+        <th>
           Optional fields
         </th>
-        <th scope="col">
+        <th>
           Notes
         </th>
       </tr>
@@ -514,16 +538,6 @@ METADATA_KEY_PROVIDER_CONFIG_ACTION
       </tr>
     </table>
 
-    <h3 id="examples_of_complication_types">
-      Examples of Complication Types
-    </h3>
-    <p>
-      The following shows examples of complication types:
-    </p>
-
-    <img src="../images/complication-type-exs.png" width=""
-    alt="Complication types" title="Complications types - examples">
-
     <h2 id="using_fields_for_complication_data">
       Using Fields for Complication Data
     </h2>
@@ -543,10 +557,10 @@ METADATA_KEY_PROVIDER_CONFIG_ACTION
 
     <table>
       <tr>
-        <th scope="col">
+        <th>
           Field
         </th>
-        <th scope="col">
+        <th>
           Description
         </th>
       </tr>
@@ -563,11 +577,21 @@ METADATA_KEY_PROVIDER_CONFIG_ACTION
 
       <tr>
         <td>
+          Icon
+        </td>
+        <td>
+          A single-color image representing the data or the source of the data.
+          Must be tintable. Vector drawables are recommended for this field.
+        </td>
+      </tr>
+
+      <tr>
+        <td>
           Short title
         </td>
         <td>
-          Descriptive field for small complications.Should not exceed 7
-          characters.May only be meaningful in combination with <em>Short
+          Descriptive field for small complications. Should not exceed 7
+          characters. May only be meaningful in combination with <em>Short
           text</em>.
         </td>
       </tr>
@@ -586,7 +610,7 @@ METADATA_KEY_PROVIDER_CONFIG_ACTION
           Long title
         </td>
         <td>
-          Descriptive field for large, text-based complications.May only be
+          Descriptive field for large, text-based complications. May only be
           meaningful in combination with <em>Long text</em>.
         </td>
       </tr>
@@ -596,7 +620,7 @@ METADATA_KEY_PROVIDER_CONFIG_ACTION
           Value
         </td>
         <td>
-          A numerical (float) representation of the data.Expected to be
+          A numerical (float) representation of the data. Expected to be
           depicted relative to the bounds the <em>Min value</em> and <em>Max
           value</em> fields (but not required to be between those bounds).
         </td>
@@ -608,7 +632,7 @@ METADATA_KEY_PROVIDER_CONFIG_ACTION
         </td>
         <td>
           The lower bound for the range within which <em>Value</em> should be
-          depicted.Only meaningful in combination with <em>Value</em> and
+          depicted. Only meaningful in combination with <em>Value</em> and
           <em>Max value</em>.
         </td>
       </tr>
@@ -619,28 +643,18 @@ METADATA_KEY_PROVIDER_CONFIG_ACTION
         </td>
         <td>
           The upper bound for the range within which <em>value</em> should be
-          depicted.Only meaningful in combination with <em>Value</em> and
+          depicted. Only meaningful in combination with <em>Value</em> and
           <em>Min value</em>.
         </td>
       </tr>
 
       <tr>
         <td>
-          Icon
-        </td>
-        <td>
-          A single-color image representing the data or the source of the
-          data.Must be tintable.
-        </td>
-      </tr>
-
-      <tr>
-        <td>
           Small image
         </td>
         <td>
-          A small image to represent the data or the source of the data.May be
-          full color.Not expected to fill the entire watch face.
+          A small image to represent the data or the source of the data. May be
+          full color. Not expected to fill the entire watch face.
         </td>
       </tr>
 
@@ -649,7 +663,7 @@ METADATA_KEY_PROVIDER_CONFIG_ACTION
           Large image
         </td>
         <td>
-          An image with sufficient resolution to fill the watch face.May be
+          An image with sufficient resolution to fill the watch face. May be
           full color.
         </td>
       </tr>
@@ -681,8 +695,10 @@ METADATA_KEY_PROVIDER_CONFIG_ACTION
     </h2>
 
     <p>
-      The Complications API includes the following new classes in the Wearable
-      Support Library:
+      The Complications API includes new classes in the Wearable Support
+      Library. For more information, download the <a href=
+      "{@docRoot}wear/preview/start.html#get_the_preview_reference_documentation">
+      Android Wear 2.0 Preview Reference</a>.
     </p>
 
     <ul>
index 4ee507c..1301be9 100644 (file)
@@ -13,7 +13,6 @@ page.tags="wear"
       <li><a href="#creating">Creating an Input Method for Wear</a></li>
       <li><a href="#invoking">Invoking IME</a></li>
       <li><a href="#considerations">General IME Considerations</a></li>
-      <li><a href="#test">Testing your IME</a></li>
     </ol>
 
 </div>
@@ -28,32 +27,40 @@ Input Method Framework (IMF) to Android Wear. IMF allows for virtual, on-screen
 
 <p>Wear 2.0 comes with the system default Input Method Editor (IME) 
 and opens up the IMF APIs for third-party developers to create custom input 
-methods for Wear.
-</p>
+methods for Wear.</p>
 
+<p><img src="{@docRoot}wear/preview/images/new_input_methods.png"></p>
+<p><b>Figure 1</b>. Sample input methods </p>
 
 <h2 id="creating">Creating an Input Method for Wear</h2>
-
-<p>To create an input method for Wear, 
-see <a href="http://developer.android.com/guide/topics/text/creating-input-method.html">Creating an Input Method</a>.
+<p>The Android platform provides a standard framework for creating IMEs. To create
+ a Wear-specific IME, you need to optimize your IME for limited screen size.
+  </p>
+
+<p>This document provides guidance that can help you create a Wear-specific IME.
+Before you continue with this guide, it's important that you read the
+documentation for
+<a href="{@docRoot}guide/topics/text/creating-input-method.html">Creating an Input Method</a>
+ on handsets.
 </p>
 
-<h2 id="invoking">Invoking IME</h2>
+
+<h2 id="invoking">Invoking an Input Method</h2>
 If you are developing an IME for Wear, remember that the 
 feature is supported only on Android 6.0 (API level 23) and higher versions of 
 the platform. 
 To ensure that your IME can only be installed on Wearables that support input 
-methods beyond voice, add the following to your application's manifest:
+methods beyond voice, add the following to your app's manifest:
 <pre>
 &lt;uses-sdk android:minSdkVersion="23" />
 </pre>
-This indicates that your application requires Android 6.0 or higher. 
-For more information, see <a href="http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels">API Levels</a>
- and the documentation for the <a href="http://developer.android.com/guide/topics/manifest/uses-sdk-element.html">&lt;uses-sdk></a> 
+This indicates that your app requires Android 6.0 or higher. 
+For more information, see <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#ApiLevels">API Levels</a>
+ and the documentation for the <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html">&lt;uses-sdk></a> 
 element.
 <p>
-To control how your application is filtered from devices that do not support Wear
-IMEs (for example, on Phone), add the following to your application's manifest:
+To control how your app is filtered from devices that do not support Wear
+IMEs (for example, on Phone), add the following to your app's manifest:
 </p>
 <pre>
 &lt;uses-feature android:required="true" android:name="android.hardware.type.watch" />
@@ -64,9 +71,9 @@ IMEs (for example, on Phone), add the following to your application's manifest:
  can invoke your IME from:</p>
 <ul>
 <li>A notification or an app using the 
-<a href="http://developer.android.com/reference/android/support/v4/app/RemoteInput.html">RemoteInput</a></code> API.</li>
+<a href="{@docRoot}reference/android/support/v4/app/RemoteInput.html">RemoteInput</a></code> API.</li>
 <li>Wear apps with an 
-<a href="http://developer.android.com/reference/android/widget/EditText.html">EditText</a>
+<a href="{@docRoot}reference/android/widget/EditText.html">EditText</a>
  field. Touching a text field places the cursor in the field and automatically 
  displays the IME on focus.</li>
 </ul>
@@ -74,41 +81,39 @@ IMEs (for example, on Phone), add the following to your application's manifest:
 
 <h2 id="considerations">General IME Considerations</h2>
 
-<p>Here are some things to consider when implementing IME for wear:</p>
+<p>Here are some things to consider when implementing IME for Wear:</p>
 
 <ul>
 <li><strong>Set Default Action</strong>
 <p>
 <a href="http://developer.android.com/reference/android/support/v4/app/RemoteInput.html">{@code RemoteInput}</a> 
 and Wear apps expect only single-line text entry. The ENTER key should always trigger
- a call to <a href="http://developer.android.com/reference/android/inputmethodservice/InputMethodService.html#sendDefaultEditorAction(boolean)">sendDefaultEditorAction</a>,
+ a call to <a href="{@docRoot}reference/android/inputmethodservice/InputMethodService.html#sendDefaultEditorAction(boolean)">sendDefaultEditorAction</a>,
   which causes the app to dismiss the keyboard and continue on to the next step 
   or action.</p>
 </li>
 
-<li><Strong>Use full screen mode IME</strong>
+<li><Strong>Use full-screen-mode IME</strong>
 <p>
-Most on-screen input methods will consume most of the screen, leaving very little
- of the app visible; hence, we discourage Android Wear apps from presenting a 
- visible {@code EditTextView}. Instead, a full-screen IME uses 
- <a href="http://developer.android.com/reference/android/inputmethodservice/ExtractEditText.html">ExtractEditText</a>
-  to render its own view of the attached editor, also providing control over the
-   styling of this view. You can ignore all editor-related events that the IME 
-   doesn't generate.
-For more details on full-screen mode, see 
-<a href="http://developer.android.com/reference/android/inputmethodservice/InputMethodService.html">InputMethodService</a>.
+Input methods on Wear consume most of the screen, leaving very little of the
+ app visible; using full-screen mode ensures an optimal user experience regardless
+  of the app UI.  In full-screen mode, an 
+  <a href="{@docRoot}reference/android/view/inputmethod/ExtractedText.html">{@code ExtractEditText}</a> provides a mirrored
+   view of the text field being edited and can be styled to blend with the rest of
+    the input method UI. For more details on full-screen mode, see 
+    <a href="{@docRoot}reference/android/inputmethodservice/InputMethodService.html">InputMethodService</a>.
 </p>
 </li>
 
-<li><strong>Handle inputType flags</strong>
+<li><strong>Handle InputType flags</strong>
 <p>
-For privacy reasons, at a minimum you should handle the {@code inputType} 
+For privacy reasons, at a minimum you should handle the {@code InputType} 
 flag {@code TYPE_TEXT_VARIATION_PASSWORD} in your IME. When your IME is in 
 password mode, make sure that your keyboard is optimized for single key press 
 (auto spelling correction, auto completion and gesture input are disabled). 
 Most importantly, keyboard in password mode should support ASCII symbols 
 regardless of the input language.  For more details, see 
-<a href="http://developer.android.com/training/keyboard-input/style.html">Specifying The Input Method Type</a>.
+<a href="{@docRoot}training/keyboard-input/style.html">Specifying The Input Method Type</a>.
 </p>
 </li>
 
@@ -116,21 +121,13 @@ regardless of the input language.  For more details, see
 <p>
 Android allows users to easily switch between all IMEs supported by the platform.
  In your IME implementation, set the boolean 
- <a href="http://developer.android.com/guide/topics/text/creating-input-method.html#Switching">supportsSwitchingToNextInputMethod = true</a>
- to enable your IME to support switching mechanism 
+ <a href="{@docRoot}guide/topics/text/creating-input-method.html#Switching">supportsSwitchingToNextInputMethod = true</a>
+ to enable your IME to support the switching mechanism 
  (so that apps can switch to the next platform-supported IME).
 </p>
 </li>
 </ul>
 
 
-<h2 id="test">Test your IME</h2>
-
-<p>To test your IME, install the 
-<a href="https://drive.google.com/a/google.com/file/d/0ByOeMdiY1arvWUk5QXU1V0E3cFU/view?usp=sharing">Input Box</a>
- app which has a simple <i><code>EditText</i></code> field. 
- When responding to messages from chat apps, you can also use the IME on the 
- watch.</p>
-
 
 
index 21a77c2..5beb712 100644 (file)
@@ -1,7 +1,231 @@
-page.title=Expanded Notifications
+page.title=Notification Changes in Android Wear 2.0
 meta.tags="wear", "wear-preview", "notifications"
 page.tags="wear"
+page.image=/wear/preview/images/expanded_diagram.png
+
 
 @jd:body
 
-<p>stub</p>
\ No newline at end of file
+<div id="qv-wrapper">
+  <div id="qv">
+    <!-- table of contents -->
+    <h2>This document includes</h2>
+    <ol>
+      <li><a href="#visual">Visual Updates</a></li>
+      <li><a href="#expanded">Expanded Notifications</a></li>
+      <li><a href="#messaging">MessagingStyle</a></li>
+    </ol>
+  </div>
+</div>
+
+<p>Android Wear 2.0 updates the visual style and interaction paradigm of notifications
+  as well as introduces expanded notifications, which provide substantial additional
+  content and actions in an app-like experience.
+</p>
+
+<p>The visual and interaction changes make it much easier for users to read and
+  interact with notifications from your app. Expanded notifications enable
+  you to deliver Wear users an app-like experience even if you haven't built an
+  Android Wear app.
+</p>
+
+<p class="note">
+  <strong>Note:</strong> When developing for Wear 2.0, ensure that
+  you have the latest version of the Android Wear app on your phone.
+</p>
+
+<h2 id="visual">Visual Updates</h2>
+<p>Notifications receive important visual updates in Wear 2.0, with
+<a href="http://www.google.com/design/wear">
+material design</a> visual changes.
+</p>
+
+<p><img src="{@docRoot}wear/preview/images/comparison_diagram.png" /> </p>
+<p><b>Figure 1.</b> Comparison of the same notification in Android Wear 1.x and 2.0.</p> 
+
+<p>Some of the visual updates include:</p>
+<ul>
+<li><strong>Updated touch targets of a notification</strong>:
+  If no <a href="{@docRoot}reference/android/app/Notification.html#contentIntent">{@code contentIntent}</a>
+  is set or if the notification is
+  <a href="{@docRoot}design/wear/structure.html#Bridged">bridged</a>
+  from a paired phone, then tapping the notification opens an <a href="{@docRoot}wear/preview/features/notifications.html#expanded">expanded notification</a>.
+  If the notification is generated locally by a Wear app and if a
+  <a href="{@docRoot}reference/android/app/Notification.html#contentIntent">{@code contentIntent}</a>
+  is set, tapping the notification fires the
+  <a href="{@docRoot}reference/android/app/Notification.html#contentIntent">{@code contentIntent}</a>.
+  </li>
+
+<li><strong>Dark background color</strong>:
+  If you have notifications that are bridged to wearables, you need to be careful
+   with regards to using color for the notifications. Since a bridged
+  notification needs to support both light (Wear 1.x) and dark (Wear 2.0)
+  backgrounds, it is unlikely that any colors will work well on both.
+  <a href="{@docRoot}reference/android/app/Notification.WearableExtender.html#setDisplayIntent(android.app.PendingIntent)">{@code DisplayIntent}</a>
+   notifications render with both light and dark backgrounds
+  as well, and need to be checked for the same reason.
+  We recommended that you don't set color for bridged notifications.
+
+  When Wear apps post local notifications, you can work around this by checking
+  <a href="{@docRoot}training/basics/supporting-devices/platforms.html#version-codes">the API level of the device</a> they're running on and using an appropriate color
+  for Wear 1.x and a different color for Wear 2.0.
+</li>
+
+<li><strong>Updated horizontal swipe gesture on a notification</strong>:
+  To dismiss a notification in Wear 2.0, the user swipes horizontally in either
+  direction. So if your notification instructs the user to swipe left or right, 
+  you must update the text of your notification.
+</li>
+</ul>
+<h2 id="expanded">Expanded Notifications</h2>
+<p>Android Wear 2.0 introduces <i>expanded notifications</i>, which provide
+  substantial additional content and actions for each notification.
+</p>
+<p>When you <a href="{@docRoot}training/wearables/notifications/pages.html">specify additional content pages</a>
+ and actions for a notification, those are available to the user within the 
+ expanded notification. Each expanded notification follows 
+ <a href="http://www.google.com/design/wear">Material Design for Android Wear</a>,
+  so the user gets an app-like experience.
+</p>
+<p><img src="{@docRoot}wear/preview/images/expanded_diagram.png" /> </p>
+<p><b>Figure 2</b>. An expanded notification with content and actions.</p>
+<p>If the first action in the expanded notification has a
+<a href=" {@docRoot}reference/android/support/v4/app/RemoteInput.html">{@code RemoteInput}</a>
+  (e.g., a Reply action), then the choices you set with <a href="http://developer.android.com/reference/android/support/v4/app/RemoteInput.Builder.html#setChoices(java.lang.CharSequence[])">{@code setChoices()}</a>
+  appear within the expanded notification below the first action.
+</p>
+
+<p>The user can view the expanded notification by tapping on a notification when
+  either of the following is true:
+</p>
+<ul>
+  <li>The notification is generated by an app on the paired phone and
+    bridged to Wear.
+  </li>
+  <li>The notification does not have a 
+  <a href="http://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder.html#setContentIntent(android.app.PendingIntent)">{@code contentIntent}</a>.
+  </li>
+</ul>
+<h3>Best practices for expanded notifications</h3>
+<p>To decide when to use expanded notifications, follow these guidelines:</p>
+<ul>
+  <li>All notifications bridged from the paired phone to the Wear device will
+  use expanded notifications.
+  </li>
+  <li>If a notification is generated by an app running locally on Wear 2.0,
+    you should <a href="{@docRoot}training/notify-user/build-notification.html#action">
+    make the touch target of your notification </a> launch
+    <a href="{@docRoot}training/notify-user/build-notification.html#action"> an Activity</a>
+    within your app by calling <a href="{@docRoot}reference/android/support/v4/app/NotificationCompat.Builder.html#setContentIntent(android.app.PendingIntent)">{@code setContentIntent()}</a>.
+    We recommend that you do not use expanded notifications for notifications generated
+    by an app running locally on Wear 2.0.
+  </li>
+</ul>
+
+<h3>Adding expanded notifications</h3>
+<p>
+ Expanded Notifications allow you to include additional content and actions
+   for a notification. You choose the level of detail that your app's notifications
+    will provide; however be judicious with the amount of detail you include in a 
+    notification. 
+</p>
+<h4>Adding additional content</h4>
+To show additional content in your expanded notification, see <a href="{@docRoot}training/wearables/notifications/pages.html">Adding Pages to a Notification</a>.</p>
+<p>Additional content pages are stacked vertically in the expanded notification
+ and appear in the order they were added.
+  These additional content pages can optionally use a style such as <a href="{@docRoot}reference/android/support/v4/app/NotificationCompat.BigTextStyle.html">{@code BigTextStyle}</a> or <a href="{@docRoot}reference/android/support/v4/app/NotificationCompat.BigPictureStyle.html">{@code BigPictureStyle}</a>.
+</p>
+<h4>Primary action</h4>
+The expanded notification will contain one primary action, which is the first
+action in the notification unless a different action is specified using
+<a href="{@docRoot}reference/android/support/v4/app/NotificationCompat.WearableExtender.html#setContentAction(int)">{@code setContentAction()}</a>.
+</p>
+<h4>Additional actions</h4>
+<p>
+  To specify additional actions, use
+  <a href="{@docRoot}reference/android/support/v4/app/NotificationCompat.WearableExtender.html#addAction(android.support.v4.app.NotificationCompat.Action)">{@code addAction()}</a>
+   or <a href="{@docRoot}reference/android/support/v4/app/NotificationCompat.WearableExtender.html#addActions(java.util.List<android.support.v4.app.NotificationCompat.Action>)">{@code addActions()}</a>.
+    The action drawer of the expanded notification contains all available actions.
+</p>
+<h2 id="messaging">MessagingStyle</h2>
+
+<p>If you have a chat messaging app, your notifications should use
+<a href="{@docRoot}preview/features/notification-updates.html#style">{@code Notification.MessagingStyle}</a>,
+ which is new in Android 6.0. Wear 2.0 uses the chat messages included
+  in a <a href="{@docRoot}preview/features/notification-updates.html#style">{@code MessagingStyle}</a> notification 
+  (see <a href="{@docRoot}preview/features/notification-updates.html#style">{@code addMessage()}</a>) to provide
+  a rich chat app-like experience in the expanded notification.
+</p>
+<p class="note">Note: <a href="{@docRoot}preview/features/notification-updates.html#style">{@code MessagingStyle}</a> 
+expanded notifications require that you have at least version 1.5.0.2861804 of the
+  <a href="https://play.google.com/store/apps/details?id=com.google.android.wearable.app">Android Wear app</a>
+  on your paired Android phone. That version will be available within the next
+  few weeks in the Play Store.
+</p>
+<h3 id="smart-reply">Smart Reply</h3>
+<p>Wear 2.0 also introduces <i>Smart Reply</i> for <a href="{@docRoot}preview/features/notification-updates.html#style">{@code MessagingStyle}</a> notifications.
+  Smart Reply provides the user with contextually relevant, touchable choices in
+  the expanded notification and in {@code RemoteInput}. These augment the fixed
+  list of choices that the developer provides in 
+   <a href="http://developer.android.com/reference/android/support/v4/app/RemoteInput.html">{@code RemoteInput}</a>
+    using the 
+    <a href="{@docRoot}reference/android/support/v4/app/RemoteInput.Builder.html#setChoices(java.lang.CharSequence[])">{@code setChoices()}</a> method.
+</p>
+<p>By enabling Smart Reply for your MessagingStyle notifications,
+  you provide users with a fast (single tap), discreet (no speaking aloud), and
+  reliable way to respond to chat messages.
+</p>
+<p><img src="{@docRoot}wear/preview/images/messaging_style.png" /></p>
+<p><b>Figure 3</b>. The expanded notification includes contextually relevant
+  Smart Reply responses below the primary action.
+</p>
+
+<p>Responses generated by Smart Reply are shown in addition to those set using the
+  <a href="{@docRoot}reference/android/support/v4/app/RemoteInput.Builder.html#setChoices(java.lang.CharSequence[])">{@code setChoices()}</a> method.
+</p>
+<p>To enable Smart Reply for your notification action, you need to do the
+following:
+</p>
+<ol>
+  <li>Use <a href="{@docRoot}preview/features/notification-updates.html#style">{@code Notification.MessagingStyle}</a>.
+  </li>
+  <li>Call the method 
+  <a href="https://android-dot-devsite.googleplex.com/wear/preview/start.html#get_the_preview_reference_documentation">{@code setAllowGeneratedReplies()}</a>
+   for the notification action.</li>
+  <li>Ensure that the notification action has a
+    <a href="{@docRoot}reference/android/app/RemoteInput.html">{@code RemoteInput}</a>
+     (where the responses will reside).
+  </li>
+</ol>
+<p>The following example shows how to create a MessagingStyle notification with
+Smart Reply responses.</p>
+<pre>
+// Create an intent for the reply action
+Intent replyIntent = new Intent(this, ReplyActivity.class);
+PendingIntent replyPendingIntent =
+ PendingIntent.getActivity(this, 0, replyIntent,
+  PendingIntent.FLAG_UPDATE_CURRENT);
+
+// Create the reply action and add the remote input
+NotificationCompat.Action action =
+ new NotificationCompat.Action.Builder(R.drawable.ic_reply_icon,
+  getString(R.string.label), replyPendingIntent)
+ .addRemoteInput(remoteInput)
+
+// 1) allow generated replies
+.setAllowGeneratedReplies(true)
+ .build();
+
+Notification noti = new NotificationCompat.Builder()
+ .setContentTitle(messages.length + " new messages with " + sender.toString())
+ .setContentText(subject)
+ .setSmallIcon(R.drawable.new_message)
+ .setLargeIcon(aBitmap)
+ // 2) set the style to MessagingStyle
+ .setStyle(new NotificationCompat.MessagingStyle(resources.getString(R.string.reply_name)).addMessage(messages[0].getText(), messages[0].getTime(), messages[0].getSender())
+  .addMessage(messages[1].getText(), messages[1].getTime(), messages[1].getSender()))
+
+
+// 3) add an action with RemoteInput
+.extend(new WearableExtender().addAction(action)).build();
+</pre>
index 587f88f..1408334 100644 (file)
@@ -1,6 +1,7 @@
 page.title=Wear Navigation and Actions
 meta.tags="wear", "wear-preview", "navigation", "action"
 page.tags="wear"
+page.image=/wear/preview/images/card_drawer.png
 
 @jd:body
 
@@ -18,23 +19,27 @@ page.tags="wear"
 
    <h2>You should also read</h2>
    <ul>
-   <li><a href="https://spec.googleplex.com/wear/components/navigation-drawer.html">
+   <li><a href="http://www.google.com/design/wear-spec/components/navigation-drawer.html">
    Navigation Drawer Design</a> </li>
    <li>
-   <a href="https://spec.googleplex.com/wear/components/action-drawer.html">
+   <a href="http://www.google.com/design/wear-spec/components/action-drawer.html">
    Action Drawer Design</a>
    </ul>
 
-  <h2>Samples</h2>
+  <h2>See Also</h2>
   <ol>
-
+  <li>
+  <a href="https://github.com/googlesamples/android-WearDrawers">Sample app with
+  navigation and action drawers</a>
+  </li>
   </ol>
 
 </div>
 </div>
-<p>Wear 2.0 adds interactive navigation and action drawers that users can pull
-from the top or bottom edge of the window, respectively. The navigation drawer
-appears at the top of the screen and lets users jump to different views within
+<p>As part of the <a href="http://www.google.com/design/wear">Material Design</a>
+ for Android Wear, Wear 2.0 adds interactive navigation and action drawers. 
+ The navigation drawer appears at the top of the screen and lets users jump to 
+ different views within
 the app, similar to the navigation drawer on a phone. The action drawer appears
 at the bottom of the screen and provides context-specific actions for the user,
 similar to the action bar on a phone. These drawers are accessible when the user
diff --git a/docs/html/wear/preview/images/card_drawer.png b/docs/html/wear/preview/images/card_drawer.png
new file mode 100644 (file)
index 0000000..3614f95
Binary files /dev/null and b/docs/html/wear/preview/images/card_drawer.png differ
diff --git a/docs/html/wear/preview/images/comparison_diagram.png b/docs/html/wear/preview/images/comparison_diagram.png
new file mode 100644 (file)
index 0000000..7dbf65f
Binary files /dev/null and b/docs/html/wear/preview/images/comparison_diagram.png differ
index d6fe890..6e2287c 100644 (file)
Binary files a/docs/html/wear/preview/images/complication-type-exs.png and b/docs/html/wear/preview/images/complication-type-exs.png differ
index 7fa43f2..2415535 100644 (file)
Binary files a/docs/html/wear/preview/images/complications-data-flow.png and b/docs/html/wear/preview/images/complications-data-flow.png differ
diff --git a/docs/html/wear/preview/images/complications-main-image.png b/docs/html/wear/preview/images/complications-main-image.png
new file mode 100644 (file)
index 0000000..dd37b25
Binary files /dev/null and b/docs/html/wear/preview/images/complications-main-image.png differ
diff --git a/docs/html/wear/preview/images/expanded_diagram.png b/docs/html/wear/preview/images/expanded_diagram.png
new file mode 100644 (file)
index 0000000..03bca9a
Binary files /dev/null and b/docs/html/wear/preview/images/expanded_diagram.png differ
index 5dcc847..1d0cb6f 100644 (file)
Binary files a/docs/html/wear/preview/images/hero-1x.png and b/docs/html/wear/preview/images/hero-1x.png differ
index 19a60cd..9f4eb66 100644 (file)
Binary files a/docs/html/wear/preview/images/hero-2x.png and b/docs/html/wear/preview/images/hero-2x.png differ
diff --git a/docs/html/wear/preview/images/messaging_style.png b/docs/html/wear/preview/images/messaging_style.png
new file mode 100644 (file)
index 0000000..966e524
Binary files /dev/null and b/docs/html/wear/preview/images/messaging_style.png differ
diff --git a/docs/html/wear/preview/images/messaging_style_diagram.png b/docs/html/wear/preview/images/messaging_style_diagram.png
new file mode 100644 (file)
index 0000000..3b21c79
Binary files /dev/null and b/docs/html/wear/preview/images/messaging_style_diagram.png differ
diff --git a/docs/html/wear/preview/images/new_input_methods.png b/docs/html/wear/preview/images/new_input_methods.png
new file mode 100644 (file)
index 0000000..c035996
Binary files /dev/null and b/docs/html/wear/preview/images/new_input_methods.png differ
diff --git a/docs/html/wear/preview/images/remoteinput.png b/docs/html/wear/preview/images/remoteinput.png
new file mode 100644 (file)
index 0000000..9d80498
Binary files /dev/null and b/docs/html/wear/preview/images/remoteinput.png differ
index 3024654..c273888 100644 (file)
@@ -25,14 +25,19 @@ footer.hide=1
         <h1 class="dac-hero-title">Android Wear 2.0 Developer Preview</h1>
         <p class="dac-hero-description">
           Get ready for the next version of Android Wear!
-          Support stand-alone Wear devices and apps.
-          Create enhanced user interaction and glanceable experiences.
-          Test your apps on Wear devices.
+          Support <strong>stand-alone</strong> Wear devices and apps.
+          Create <strong>enhanced user interaction</strong> and
+          <strong>glanceable experiences</strong>.
+          Test your apps on <strong>Wear devices</strong>.
         </p>
 
         <a class="dac-hero-cta" href="{@docRoot}wear/preview/program.html">
           <span class="dac-sprite dac-auto-chevron"></span>
-          Learn more
+          Learn about the Preview
+        </a>
+        <a class="dac-hero-cta" href="https://www.google.com/design/wear">
+          <span class="dac-sprite dac-auto-chevron"></span>
+          Material Design for Wear
         </a>
       </div>
       <div class="col-9of16 col-pull-7of16 dac-hero-figure" style="margin-top:1.5em;padding-right:1.5em;">
@@ -57,7 +62,7 @@ footer.hide=1
     </a>
     <ul class="dac-actions">
       <li class="dac-action">
-        <a class="dac-action-link" href="{@docRoot}wear/preview/bug">
+        <a class="dac-action-link" href="http://g.co/wearpreviewbug">
           <i class="dac-action-sprite dac-sprite dac-auto-chevron-large"></i>
           Report an issue
         </a>
index 802e8a8..a130663 100644 (file)
@@ -25,7 +25,7 @@ page.image=images/cards/card-n-sdk_2x.png
             </h5>
 
             <p>
-              Run and test your apps on a range of devices or on an emulator.
+              Run and test your apps on supported Wear devices or the emulator.
             </p>
           </div>
 
@@ -35,7 +35,7 @@ page.image=images/cards/card-n-sdk_2x.png
             </h5>
 
             <p>
-              We’ll provide monthly updates during the preview, so you'll be
+              We'll provide frequent updates during the preview, so you'll be
               testing against the latest platform changes.
             </p>
           </div>
@@ -71,8 +71,10 @@ page.image=images/cards/card-n-sdk_2x.png
             </h5>
 
             <p>
-              Report issues and give us feedback using our issue tracker.
-              Connect with other developers in the Wear Developer Community.
+              Report issues and give us feedback using our
+              <a href="https://g.co/wearpreviewbug">issue tracker</a>.
+              Connect with other developers in
+              the <a href="https://g.co/androidweardev">Wear Developer Community</a>.
             </p>
           </div>
 
@@ -124,11 +126,12 @@ page.image=images/cards/card-n-sdk_2x.png
 
     <p>
       The first three milestones provide an early test and development
-      environment to helps you identify compatibility issues in your current
+      environment to help you identify compatibility issues in your current
       apps and plan migration or feature work needed to target the new
       platform. This is the priority period in which to give us your feedback
       on features and APIs and file compatibility issues — for all of these,
-      please use the issue tracker. You can expect some API changes across
+      please use the <a href="https://g.co/wearpreviewbug">issue tracker</a>.
+      You can expect some API changes across
       these updates.
     </p>
 
@@ -144,8 +147,6 @@ page.image=images/cards/card-n-sdk_2x.png
     <p>
       As you test and develop on Android Wear 2.0, we strongly recommend
       keeping your development environment up-to-date as updates are released.
-      Updated preview images will be available that you can download and flash
-      manually.
     </p>
 
     <p>
@@ -195,18 +196,25 @@ page.image=images/cards/card-n-sdk_2x.png
     </h3>
 
     <p>
-      You can download these hardware system images for Nexus devices from the
-      Downloads page:
+      You can download these hardware system images at <a href=
+      "{@docRoot}wear/preview/downloads.html">Download and Test with a
+      Device</a>:
     </p>
 
     <ul>
-      <li>LG Watch Urbane 2nd Edition “nemo”
+      <li>LGE Watch Urbane 2nd Edition
       </li>
 
-      <li>Huawei Watch “sturgeon”
+      <li>Huawei Watch
       </li>
     </ul>
 
+    <p>
+     Please keep in mind that the Developer Preview system images
+     are for app developers only, and for compatibility testing and
+     early development only, and are not ready for day-to-day use.
+    </p>
+
     <h3 id="documentation_and_sample_code">
       Documentation and sample code
     </h3>
@@ -216,17 +224,22 @@ page.image=images/cards/card-n-sdk_2x.png
     </p>
 
     <ul>
-      <li>[comment placeholder] Get Started has step-by-step instructions for
+      <li><a href=
+      "{@docRoot}wear/preview/start.html">Get Started</a>
+      has step-by-step instructions for
       setting up the SDK.
       </li>
 
-      <li>Documentation of new APIs, including an API Overview, downloadable
-      API Reference, and developer guides on key features such as
-      complications, design patterns for Wear, and building standalone Android
-      Wear apps.
+      <li>Documentation of new APIs, including an
+      <a href="{@docRoot}wear/preview/api-overview.html">API Overview</a>,
+      downloadable
+      <a href="{@docRoot}wear/preview/start.html#get_the_preview_reference_documentation">API Reference</a>,
+      and developer guides on key features such as
+      <a href="{@docRoot}wear/preview/features/complications.html">complications</a>
+      and design patterns for Wear.
       </li>
 
-      <li>Sample code that demonstrates how to implement [comment placeholder]
+      <li>Sample code that demonstrates how to implement
       complications and other new features.
       </li>
     </ul>
@@ -241,7 +254,8 @@ page.image=images/cards/card-n-sdk_2x.png
     </p>
 
     <ul>
-      <li>Wear Developer Preview Issue Tracker is your primary feedback
+      <li>Wear Developer Preview
+      <a href="https://g.co/wearpreviewbug">Issue Tracker</a> is your primary feedback
       channel. You can report bugs, performance issues, and general feedback
       through the issue tracker. You can also check for known issues and find
       workaround steps.
index 04b9fe6..31ecb46 100644 (file)
@@ -1,4 +1,4 @@
-page.title=Get Started with the Android Wear 2.0 Developer Preview
+page.title=Get Started with the Preview
 meta.keywords="wear-preview"
 page.tags="wear-preview"
 page.image=images/cards/card-n-sdk_2x.png
@@ -28,8 +28,8 @@ page.image=images/cards/card-n-sdk_2x.png
     </div>
 
     <p>
-      If you want an environment for basic <strong>compatibility
-      testing</strong> of your app, you can use your current APK and a
+      If you want an environment for basic compatibility
+      testing of your app, you can use your current APK and a
       supported watch or an emulator. You don't necessarily need to update your
       full development environment to do basic testing. To simply test your
       app's compatibility with a preview system image, see <a href=
@@ -97,19 +97,20 @@ page.image=images/cards/card-n-sdk_2x.png
 
     <table>
       <tr>
-        <th scope="col">
+        <th style="width:300px">
           Reference documentation
         </th>
-        <th scope="col">
-          Notes
+        <th>
+          Checksums
         </th>
       </tr>
 
       <tr>
         <td>
-          [zip file name]
+          <a href="http://storage.googleapis.com/androiddevelopers/shareables/wear-preview/wearable-support-preview-1-docs.zip">wearable-support-preview-1-docs.zip</a>
         </td>
-        <td>
+        <td>MD5: eff101c848aff7d0fa7a0812c7670145<br>
+            SHA-1: da1eba1869aaaf8bde30ecfb7e0d624125a41586
         </td>
       </tr>
     </table>
@@ -137,8 +138,8 @@ page.image=images/cards/card-n-sdk_2x.png
       </li>
 
       <li>If prompted by the Android SDK Manager for the SDK version to use for
-      the project, select <strong>Use</strong> <strong>Android Studio's
-      SDK</strong>. &lt;//li&gt;
+      the project, select <strong>Use Android Studio's
+      SDK</strong>.
       </li>
 
       <li>If prompted to update the Gradle plugin, update the version of the
@@ -151,12 +152,10 @@ page.image=images/cards/card-n-sdk_2x.png
       'com.google.android.support:wearable:1.4.0'</code>) by changing it to the
       following, which requires that your the Google Repository <a href=
       "#install_android_studio_and_the_latest_packages">is the latest
-      version</a>::
-
-        <pre>
-        compile 'com.google.android.support:wearable:2.0.0-alpha1'
-
-</pre>
+      version</a>:
+      <pre>
+compile 'com.google.android.support:wearable:2.0.0-alpha1'
+      </pre>
       </li>
 
       <li>See the following page for setting up a watch or emulator with a
@@ -195,11 +194,9 @@ page.image=images/cards/card-n-sdk_2x.png
       <code>dependencies</code> section, update the existing reference to the
       Wearable Support Library (perhaps <code>compile
       'com.google.android.support:wearable:1.4.0'</code>) to:
-
-        <pre>
-      compile 'com.google.android.support:wearable:2.0.0-alpha1'
-
-</pre>
+      <pre>
+compile 'com.google.android.support:wearable:2.0.0-alpha1'
+      </pre>
       </li>
 
       <li>See the following page for setting up a watch or emulator with a
diff --git a/docs/html/wear/preview/support.jd b/docs/html/wear/preview/support.jd
new file mode 100644 (file)
index 0000000..a738e3c
--- /dev/null
@@ -0,0 +1,137 @@
+page.title=Support and Release Notes
+meta.keywords="preview", "wear"
+page.tags="preview", "developer preview"
+
+@jd:body
+
+<p>
+  If you experience problems when developing and testing with the
+  Wear 2.0 Developer Preview, please file bugs at
+  <a href="https://g.co/wearpreviewbug">https://g.co/wearpreviewbug</a>.
+</p>
+
+<p>
+  To discuss issues or ideas with other developers working with Android Wear,
+  join the <a href="https://plus.google.com/communities/113381227473021565406">
+  Wear Developer Google+ community</a>.
+</p>
+
+<h2 id="dp">Developer Preview 1</h2>
+
+<div class="wrap">
+  <div class="cols">
+    <div class="col-6of12">
+      <p><em>Date: May 2016<br />
+      Builds: Wearable Support 2.0.0-alpha1, NVD36G <br />
+      Emulator support: x86 & ARM (32-bit)<br/>
+      </em></p>
+    </div>
+  </div>
+</div>
+
+
+<h3 id="general_advisories">General advisories</h3>
+
+<p>
+  This Developer Preview release is for app developers only and is designed for
+  use in compatibility testing and early development only.
+</p>
+
+<h4 id="deprecations">Deprecations</h4>
+
+
+<p>The following fields are deprecated in the Preview:</p>
+
+<ul>
+  <li>The <code>Notification.WearableExtender#setCustomSizePreset(int)</code>
+  method no longer accepts <code>SIZE_FULL_SCREEN</code> and this value is now
+  undefined.
+  </li>
+
+  <li>The <code>Notification.WearableExtender#setContentIcon(int)</code> method
+  is deprecated.
+  </li>
+</ul>
+
+<h3 id="known_issues">Known Issues</h3>
+
+
+<h4 id="notifications">Notifications</h4>
+
+
+<ul>
+  <li>This preview release does not include support for notification groups,
+  but will be supported in a future release.
+  </li>
+  <li>Tapping on next and previous controls in a notification while playing
+  music does not work.
+  </li>
+  <li>Bottom drawer actions user interface overlaps with media card
+  notifications.
+  </li>
+  <li>The system does not generate Smart Reply responses even if
+  <code>setAllowGeneratedReplies(true)</code> is set.
+  </li>
+</ul>
+
+
+<h4 id="complications">Complications</h4>
+
+<ul>
+  <li>Battery information is not synchronized between watch face and drop down
+  quick menu.
+  </li>
+  <li>Play music crashes when tapping on music complication in watch face.
+  </li>
+</ul>
+
+
+<h4 id="system_user_interface">System User Interface</h4>
+
+<ul>
+  <li>Pressing the hardware button in ambient mode triggers active mode with
+  the app launcher instead of active mode only.
+  </li>
+  <li>Double pressing the power hardware button while on the launcher causes
+  the watch screen to turn black.
+  </li>
+  <li>Dismissing multiple notifications can cause app to force close.
+  </li>
+  <li>Turning screen lock to off (Enable and disable) functionality is not
+  reliable.
+  </li>
+  <li>Airplane mode does not work from quick settings.
+  </li>
+  <li>Tapping Google keyboard English (United States) displays a <em>Settings
+  under construction</em> message.
+  </li>
+  <li>First calendar event notification must be dismissed in order to show the
+  rest of the event card.
+  </li>
+  <li>Unable to turn off the Wifi on wearable.
+  </li>
+</ul>
+
+
+<h4 id="companion_app">Companion App</h4>
+
+<ul>
+  <li>'More actions' via Companion app shows a blank screen on phone running
+  nyc-release and watch running feldspar-release.
+  </li>
+  <li>Select watch face on companion wear app will not change watch face on
+  wearable.
+  </li>
+</ul>
+
+
+<h4 id="devices">Devices</h4>
+
+<ul>
+  <li>On the Huawei Watch, selecting the language, followed by multiple
+  acknowledgement dialogues results in a black screen.
+  </li>
+  <li>On the LG Watch Urbane LTE, when answering call from the watch, the watch
+  does not provide audio from the caller.
+  </li>
+</ul>
index 66ffb99..a93bfa5 100644 (file)
@@ -523,7 +523,7 @@ android.app.extra.PROVISIONING_TIME_ZONE=America/New_York</pre>
 </p>
 
 <p>
-  <a href="https://connect.googleforwork.com/community/applicants/android/isv">
+  <a href="https://www.google.com/work/android/developers/applyDevHub/">
     <span class="dac-sprite dac-auto-chevron"></span>
     Learn about the Android for Work DevHub.
   </a>
index 2b1f08b..56d8c20 100644 (file)
@@ -40,7 +40,7 @@ page.image=images/work/cards/briefcase_600px.png
 <p>
   Additionally, Android for Work offers a partner program for
   developers through the
-  <a href="https://connect.googleforwork.com/community/applicants/android/isv"
+  <a href="https://www.google.com/work/android/developers/applyDevHub/"
   >Android for Work DevHub</a>, which provides exclusive access to beta
   features and developer events, along with access to a community of
   Android developers making enterprise apps.
@@ -72,7 +72,7 @@ page.image=images/work/cards/briefcase_600px.png
 <h2 id="community-overview">What Does the Android for Work DevHub Offer?</h2>
 
 <p>
-  The <a href="https://connect.googleforwork.com/community/applicants/android/isv"
+  The <a href="https://www.google.com/work/android/developers/applyDevHub/"
   >Android for Work DevHub</a> offers these incentives:
 </p>
 
@@ -103,7 +103,7 @@ page.image=images/work/cards/briefcase_600px.png
 
 <p>
   Apply to join the
-  <a href="https://connect.googleforwork.com/community/applicants/android/isv"
+  <a href="https://www.google.com/work/android/developers/applyDevHub/"
   >Android for Work DevHub</a>.
 </p>
 
diff --git a/docs/image_sources/topic/instant-apps/Play-Services.png b/docs/image_sources/topic/instant-apps/Play-Services.png
new file mode 100644 (file)
index 0000000..4b65c99
Binary files /dev/null and b/docs/image_sources/topic/instant-apps/Play-Services.png differ
diff --git a/docs/image_sources/topic/instant-apps/image03.png b/docs/image_sources/topic/instant-apps/image03.png
new file mode 100644 (file)
index 0000000..becc7ff
Binary files /dev/null and b/docs/image_sources/topic/instant-apps/image03.png differ
diff --git a/docs/image_sources/topic/instant-apps/instant-apps-section-2 b/docs/image_sources/topic/instant-apps/instant-apps-section-2
new file mode 100644 (file)
index 0000000..6857e1f
Binary files /dev/null and b/docs/image_sources/topic/instant-apps/instant-apps-section-2 differ
diff --git a/docs/image_sources/topic/instant-apps/instant-apps-section-4 b/docs/image_sources/topic/instant-apps/instant-apps-section-4
new file mode 100644 (file)
index 0000000..c9436f1
Binary files /dev/null and b/docs/image_sources/topic/instant-apps/instant-apps-section-4 differ
diff --git a/docs/image_sources/topic/instant-apps/instant-apps-section-5 b/docs/image_sources/topic/instant-apps/instant-apps-section-5
new file mode 100644 (file)
index 0000000..b33544c
Binary files /dev/null and b/docs/image_sources/topic/instant-apps/instant-apps-section-5 differ
diff --git a/docs/image_sources/topic/instant-apps/play-services-features-2x.png b/docs/image_sources/topic/instant-apps/play-services-features-2x.png
new file mode 100644 (file)
index 0000000..098f91c
Binary files /dev/null and b/docs/image_sources/topic/instant-apps/play-services-features-2x.png differ
diff --git a/docs/image_sources/topic/instant-apps/s3-BandH-animated.gif b/docs/image_sources/topic/instant-apps/s3-BandH-animated.gif
new file mode 100644 (file)
index 0000000..efa8827
Binary files /dev/null and b/docs/image_sources/topic/instant-apps/s3-BandH-animated.gif differ
diff --git a/docs/image_sources/topic/instant-apps/s3-BandH-static.png b/docs/image_sources/topic/instant-apps/s3-BandH-static.png
new file mode 100644 (file)
index 0000000..004afb7
Binary files /dev/null and b/docs/image_sources/topic/instant-apps/s3-BandH-static.png differ
diff --git a/docs/image_sources/topic/instant-apps/s3-BuzzFeed-animated.gif b/docs/image_sources/topic/instant-apps/s3-BuzzFeed-animated.gif
new file mode 100644 (file)
index 0000000..16c4619
Binary files /dev/null and b/docs/image_sources/topic/instant-apps/s3-BuzzFeed-animated.gif differ
diff --git a/docs/image_sources/topic/instant-apps/s3-BuzzFeed-static.png b/docs/image_sources/topic/instant-apps/s3-BuzzFeed-static.png
new file mode 100644 (file)
index 0000000..cdd0dc8
Binary files /dev/null and b/docs/image_sources/topic/instant-apps/s3-BuzzFeed-static.png differ
diff --git a/docs/image_sources/topic/instant-apps/s3-ParkandPay-animated.gif b/docs/image_sources/topic/instant-apps/s3-ParkandPay-animated.gif
new file mode 100644 (file)
index 0000000..f5cbfb0
Binary files /dev/null and b/docs/image_sources/topic/instant-apps/s3-ParkandPay-animated.gif differ
diff --git a/docs/image_sources/topic/instant-apps/s3-ParkandPay-static.png b/docs/image_sources/topic/instant-apps/s3-ParkandPay-static.png
new file mode 100644 (file)
index 0000000..1e07a74
Binary files /dev/null and b/docs/image_sources/topic/instant-apps/s3-ParkandPay-static.png differ
diff --git a/docs/image_sources/topic/instant-apps/upgrade-your-app-2x.png b/docs/image_sources/topic/instant-apps/upgrade-your-app-2x.png
new file mode 100644 (file)
index 0000000..fbf6a01
Binary files /dev/null and b/docs/image_sources/topic/instant-apps/upgrade-your-app-2x.png differ
diff --git a/docs/image_sources/topic/instant-apps/works-on-all-2x (1).png b/docs/image_sources/topic/instant-apps/works-on-all-2x (1).png
new file mode 100644 (file)
index 0000000..5a44032
Binary files /dev/null and b/docs/image_sources/topic/instant-apps/works-on-all-2x (1).png differ
index daa1d7c..054e29f 100644 (file)
@@ -19,11 +19,11 @@ package android.graphics;
 import android.annotation.ColorInt;
 import android.annotation.NonNull;
 import android.annotation.Size;
+import android.os.LocaleList;
 import android.text.GraphicsOperations;
 import android.text.SpannableString;
 import android.text.SpannedString;
 import android.text.TextUtils;
-import android.util.LocaleList;
 
 import com.android.internal.annotations.GuardedBy;
 
index 893c414..6de5ea9 100644 (file)
@@ -159,7 +159,7 @@ static void throwExceptionAsNecessary(
             if (err > 0) {
                 break;
             }
-            AString msgWithErrorCode(msg);
+            AString msgWithErrorCode(msg == NULL ? "" : msg);
             msgWithErrorCode.append(" error:");
             msgWithErrorCode.append(err);
             jniThrowException(env, "java/lang/IllegalStateException", msgWithErrorCode.c_str());
index 64b443b..60eaad2 100644 (file)
@@ -69,7 +69,7 @@ public abstract class KeyguardAbsKeyInputView extends LinearLayout
     public void reset() {
         // start fresh
         mDismissing = false;
-        resetPasswordText(false /* animate */);
+        resetPasswordText(false /* animate */, false /* announce */);
         // if the user is currently locked out, enforce it.
         long deadline = mLockPatternUtils.getLockoutAttemptDeadline(
                 KeyguardUpdateMonitor.getCurrentUser());
@@ -169,10 +169,10 @@ public abstract class KeyguardAbsKeyInputView extends LinearLayout
                 mSecurityMessageDisplay.setMessage(getWrongPasswordStringId(), true);
             }
         }
-        resetPasswordText(true /* animate */);
+        resetPasswordText(true /* animate */, !matched /* announce deletion if no match */);
     }
 
-    protected abstract void resetPasswordText(boolean animate);
+    protected abstract void resetPasswordText(boolean animate, boolean announce);
     protected abstract String getPasswordText();
     protected abstract void setPasswordEntryEnabled(boolean enabled);
     protected abstract void setPasswordEntryInputEnabled(boolean enabled);
index 4abb795..7ea767c 100644 (file)
@@ -60,6 +60,7 @@ public class KeyguardPINView extends KeyguardPinBasedInputView {
                 R.dimen.disappear_y_translation);
     }
 
+    @Override
     protected void resetState() {
         super.resetState();
         mSecurityMessageDisplay.setMessage(R.string.kg_pin_instructions, false);
index 189f5b7..b75f529 100644 (file)
@@ -72,6 +72,7 @@ public class KeyguardPasswordView extends KeyguardAbsKeyInputView
                 context, android.R.interpolator.fast_out_linear_in);
     }
 
+    @Override
     protected void resetState() {
         mSecurityMessageDisplay.setMessage(R.string.kg_password_instructions, false);
         final boolean wasDisabled = mPasswordEntry.isEnabled();
@@ -159,6 +160,7 @@ public class KeyguardPasswordView extends KeyguardAbsKeyInputView
 
         // Poke the wakelock any time the text is selected or modified
         mPasswordEntry.setOnClickListener(new OnClickListener() {
+            @Override
             public void onClick(View v) {
                 mCallback.userActivity();
             }
@@ -175,6 +177,7 @@ public class KeyguardPasswordView extends KeyguardAbsKeyInputView
             switchImeButton.setVisibility(View.VISIBLE);
             imeOrDeleteButtonVisible = true;
             switchImeButton.setOnClickListener(new OnClickListener() {
+                @Override
                 public void onClick(View v) {
                     mCallback.userActivity(); // Leave the screen on a bit longer
                     // Do not show auxiliary subtypes in password lock screen.
@@ -202,7 +205,7 @@ public class KeyguardPasswordView extends KeyguardAbsKeyInputView
     }
 
     @Override
-    protected void resetPasswordText(boolean animate) {
+    protected void resetPasswordText(boolean animate, boolean announce) {
         mPasswordEntry.setText("");
     }
 
index f14290a..c8719f3 100644 (file)
@@ -159,8 +159,8 @@ public abstract class KeyguardPinBasedInputView extends KeyguardAbsKeyInputView
     }
 
     @Override
-    protected void resetPasswordText(boolean animate) {
-        mPasswordEntry.reset(animate);
+    protected void resetPasswordText(boolean animate, boolean announce) {
+        mPasswordEntry.reset(animate, announce);
     }
 
     @Override
@@ -214,7 +214,7 @@ public abstract class KeyguardPinBasedInputView extends KeyguardAbsKeyInputView
             public boolean onLongClick(View v) {
                 // check for time-based lockouts
                 if (mPasswordEntry.isEnabled()) {
-                    resetPasswordText(true /* animate */);
+                    resetPasswordText(true /* animate */, true /* announce */);
                 }
                 doHapticKeyClick();
                 return true;
index 2033159..cfaf7b6 100644 (file)
@@ -71,6 +71,7 @@ public class KeyguardSimPinView extends KeyguardPinBasedInputView {
         super(context, attrs);
     }
 
+    @Override
     public void resetState() {
         super.resetState();
         if (DEBUG) Log.v(TAG, "Resetting state");
@@ -199,6 +200,7 @@ public class KeyguardSimPinView extends KeyguardPinBasedInputView {
                     Log.v(TAG, "supplyPinReportResult returned: " + result[0] + " " + result[1]);
                 }
                 post(new Runnable() {
+                    @Override
                     public void run() {
                         onSimCheckResponse(result[0], result[1]);
                     }
@@ -206,6 +208,7 @@ public class KeyguardSimPinView extends KeyguardPinBasedInputView {
             } catch (RemoteException e) {
                 Log.e(TAG, "RemoteException for supplyPinReportResult:", e);
                 post(new Runnable() {
+                    @Override
                     public void run() {
                         onSimCheckResponse(PhoneConstants.PIN_GENERAL_FAILURE, -1);
                     }
@@ -250,7 +253,7 @@ public class KeyguardSimPinView extends KeyguardPinBasedInputView {
         if (entry.length() < 4) {
             // otherwise, display a message to the user, and don't submit.
             mSecurityMessageDisplay.setMessage(R.string.kg_invalid_sim_pin_hint, true);
-            resetPasswordText(true);
+            resetPasswordText(true /* animate */, true /* announce */);
             mCallback.userActivity();
             return;
         }
@@ -259,13 +262,16 @@ public class KeyguardSimPinView extends KeyguardPinBasedInputView {
 
         if (mCheckSimPinThread == null) {
             mCheckSimPinThread = new CheckSimPin(mPasswordEntry.getText(), mSubId) {
+                @Override
                 void onSimCheckResponse(final int result, final int attemptsRemaining) {
                     post(new Runnable() {
+                        @Override
                         public void run() {
                             if (mSimUnlockProgressDialog != null) {
                                 mSimUnlockProgressDialog.hide();
                             }
-                            resetPasswordText(true /* animate */);
+                            resetPasswordText(true /* animate */,
+                                    result != PhoneConstants.PIN_RESULT_SUCCESS /* announce */);
                             if (result == PhoneConstants.PIN_RESULT_SUCCESS) {
                                 KeyguardUpdateMonitor.getInstance(getContext())
                                         .reportSimUnlocked(mSubId);
index af88239..59c01cf 100644 (file)
@@ -106,7 +106,7 @@ public class KeyguardSimPukView extends KeyguardPinBasedInputView {
                     msg = R.string.kg_invalid_confirm_pin_hint;
                 }
             }
-            resetPasswordText(true);
+            resetPasswordText(true /* animate */, true /* announce */);
             if (msg != 0) {
                 mSecurityMessageDisplay.setMessage(msg, true);
             }
@@ -163,6 +163,7 @@ public class KeyguardSimPukView extends KeyguardPinBasedInputView {
         return displayMessage;
     }
 
+    @Override
     public void resetState() {
         super.resetState();
         mStateMachine.reset();
@@ -242,6 +243,7 @@ public class KeyguardSimPukView extends KeyguardPinBasedInputView {
                     Log.v(TAG, "supplyPukReportResult returned: " + result[0] + " " + result[1]);
                 }
                 post(new Runnable() {
+                    @Override
                     public void run() {
                         onSimLockChangedResponse(result[0], result[1]);
                     }
@@ -249,6 +251,7 @@ public class KeyguardSimPukView extends KeyguardPinBasedInputView {
             } catch (RemoteException e) {
                 Log.e(TAG, "RemoteException for supplyPukReportResult:", e);
                 post(new Runnable() {
+                    @Override
                     public void run() {
                         onSimLockChangedResponse(PhoneConstants.PIN_GENERAL_FAILURE, -1);
                     }
@@ -316,13 +319,16 @@ public class KeyguardSimPukView extends KeyguardPinBasedInputView {
 
         if (mCheckSimPukThread == null) {
             mCheckSimPukThread = new CheckSimPuk(mPukText, mPinText, mSubId) {
+                @Override
                 void onSimLockChangedResponse(final int result, final int attemptsRemaining) {
                     post(new Runnable() {
+                        @Override
                         public void run() {
                             if (mSimUnlockProgressDialog != null) {
                                 mSimUnlockProgressDialog.hide();
                             }
-                            resetPasswordText(true /* animate */);
+                            resetPasswordText(true /* animate */,
+                                    result != PhoneConstants.PIN_RESULT_SUCCESS /* announce */);
                             if (result == PhoneConstants.PIN_RESULT_SUCCESS) {
                                 KeyguardUpdateMonitor.getInstance(getContext())
                                         .reportSimUnlocked(mSubId);
index 7dba545..48737f9 100644 (file)
@@ -268,7 +268,7 @@ public class PasswordTextView extends View {
         return charState;
     }
 
-    public void reset(boolean animated) {
+    public void reset(boolean animated, boolean announce) {
         String textbefore = mText;
         mText = "";
         int length = mTextChars.size();
@@ -297,7 +297,9 @@ public class PasswordTextView extends View {
         if (!animated) {
             mTextChars.clear();
         }
-        sendAccessibilityEventTypeViewTextChanged(textbefore, 0, textbefore.length(), 0);
+        if (announce) {
+            sendAccessibilityEventTypeViewTextChanged(textbefore, 0, textbefore.length(), 0);
+        }
     }
 
     void sendAccessibilityEventTypeViewTextChanged(String beforeText, int fromIndex,
index 0afab88..2aca788 100644 (file)
@@ -18,8 +18,8 @@ import android.annotation.Nullable;
 import android.content.Context;
 import android.content.res.Configuration;
 import android.content.res.TypedArray;
+import android.os.LocaleList;
 import android.util.AttributeSet;
-import android.util.LocaleList;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.widget.FrameLayout;
index 593e170..e66dc74 100644 (file)
@@ -956,32 +956,39 @@ public abstract class BaseStatusBar extends SystemUI implements
 
     protected View bindVetoButtonClickListener(View row, final StatusBarNotification n) {
         View vetoButton = row.findViewById(R.id.veto);
-        final String _pkg = n.getPackageName();
-        final String _tag = n.getTag();
-        final int _id = n.getId();
-        final int _userId = n.getUserId();
         vetoButton.setOnClickListener(new View.OnClickListener() {
             public void onClick(View v) {
                 // Accessibility feedback
                 v.announceForAccessibility(
                         mContext.getString(R.string.accessibility_notification_dismissed));
-                try {
-                    mBarService.onNotificationClear(_pkg, _tag, _id, _userId);
-                    if (FORCE_REMOTE_INPUT_HISTORY
-                            && mKeysKeptForRemoteInput.contains(n.getKey())) {
-                        removeNotification(n.getKey(), null);
-                        mKeysKeptForRemoteInput.remove(n.getKey());
-                    }
-
-                } catch (RemoteException ex) {
-                    // system process is dead if we're here.
-                }
+                performRemoveNotification(n, false /* removeView */);
             }
         });
         vetoButton.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO);
         return vetoButton;
     }
 
+    private void performRemoveNotification(StatusBarNotification n, boolean removeView) {
+        final String pkg = n.getPackageName();
+        final String tag = n.getTag();
+        final int id = n.getId();
+        final int userId = n.getUserId();
+        try {
+            mBarService.onNotificationClear(pkg, tag, id, userId);
+            if (FORCE_REMOTE_INPUT_HISTORY
+                    && mKeysKeptForRemoteInput.contains(n.getKey())) {
+                mKeysKeptForRemoteInput.remove(n.getKey());
+                removeView = true;
+            }
+            if (removeView) {
+                removeNotification(n.getKey(), null);
+            }
+
+        } catch (RemoteException ex) {
+            // system process is dead if we're here.
+        }
+    }
+
 
     protected void applyColorsAndBackgrounds(StatusBarNotification sbn,
             NotificationData.Entry entry) {
@@ -1826,6 +1833,13 @@ public abstract class BaseStatusBar extends SystemUI implements
         }, afterKeyguardGone);
     }
 
+    public void addPostCollapseAction(Runnable r) {
+    }
+
+    public boolean isCollapsing() {
+        return false;
+    }
+
     private final class NotificationClicker implements View.OnClickListener {
         public void onClick(final View v) {
             if (!(v instanceof ExpandableNotificationRow)) {
@@ -1875,6 +1889,15 @@ public abstract class BaseStatusBar extends SystemUI implements
                         HeadsUpManager.setIsClickedNotification(row, true);
                         mHeadsUpManager.releaseImmediately(notificationKey);
                     }
+                    StatusBarNotification parentToCancel = null;
+                    if (shouldAutoCancel(sbn) && mGroupManager.isOnlyChildInGroup(sbn)) {
+                        StatusBarNotification summarySbn = mGroupManager.getLogicalGroupSummary(sbn)
+                                        .getStatusBarNotification();
+                        if (shouldAutoCancel(summarySbn)) {
+                            parentToCancel = summarySbn;
+                        }
+                    }
+                    final StatusBarNotification parentToCancelFinal = parentToCancel;
                     new Thread() {
                         @Override
                         public void run() {
@@ -1930,6 +1953,28 @@ public abstract class BaseStatusBar extends SystemUI implements
                             } catch (RemoteException ex) {
                                 // system process is dead if we're here.
                             }
+                            if (parentToCancelFinal != null) {
+                                // We have to post it to the UI thread for synchronization
+                                mHandler.post(new Runnable() {
+                                    @Override
+                                    public void run() {
+                                        Runnable removeRunnable = new Runnable() {
+                                            @Override
+                                            public void run() {
+                                                performRemoveNotification(parentToCancelFinal,
+                                                        true);
+                                            }
+                                        };
+                                        if (isCollapsing()) {
+                                            // To avoid lags we're only performing the remove
+                                            // after the shade was collapsed
+                                            addPostCollapseAction(removeRunnable);
+                                        } else {
+                                            removeRunnable.run();
+                                        }
+                                    }
+                                });
+                            }
                         }
                     }.start();
 
@@ -1943,6 +1988,17 @@ public abstract class BaseStatusBar extends SystemUI implements
             }, afterKeyguardGone);
         }
 
+        private boolean shouldAutoCancel(StatusBarNotification sbn) {
+            int flags = sbn.getNotification().flags;
+            if ((flags & Notification.FLAG_AUTO_CANCEL) != Notification.FLAG_AUTO_CANCEL) {
+                return false;
+            }
+            if ((flags & Notification.FLAG_FOREGROUND_SERVICE) != 0) {
+                return false;
+            }
+            return true;
+        }
+
         public void register(ExpandableNotificationRow row, StatusBarNotification sbn) {
             Notification notification = sbn.getNotification();
             if (notification.contentIntent != null || notification.fullScreenIntent != null) {
index 270b6ed..7a9b264 100644 (file)
@@ -215,7 +215,11 @@ public class NotificationGroupManager implements HeadsUpManager.OnHeadsUpChanged
 
     public boolean isOnlyChildInSuppressedGroup(StatusBarNotification sbn) {
         return isGroupSuppressed(sbn.getGroupKey())
-                && !sbn.getNotification().isGroupSummary()
+                && isOnlyChildInGroup(sbn);
+    }
+
+    public boolean isOnlyChildInGroup(StatusBarNotification sbn) {
+        return !sbn.getNotification().isGroupSummary()
                 && getTotalNumberOfChildren(sbn) == 1;
     }
 
index 4bb9797..e3ce1e2 100644 (file)
@@ -1178,6 +1178,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
         mKeyguardIndicationController.setStatusBarKeyguardViewManager(
                 mStatusBarKeyguardViewManager);
         mFingerprintUnlockController.setStatusBarKeyguardViewManager(mStatusBarKeyguardViewManager);
+        mIconPolicy.setStatusBarKeyguardViewManager(mStatusBarKeyguardViewManager);
         mRemoteInputController.addCallback(mStatusBarKeyguardViewManager);
 
         if (FORCE_REMOTE_INPUT_HISTORY) {
@@ -3828,10 +3829,12 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
         updateMediaMetaData(true /* metaDataChanged */, true);
     }
 
+    @Override
     public boolean isCollapsing() {
         return mNotificationPanel.isCollapsing();
     }
 
+    @Override
     public void addPostCollapseAction(Runnable r) {
         mPostCollapseRunnables.add(r);
     }
@@ -4065,12 +4068,10 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
         }
         if (mState == StatusBarState.KEYGUARD || mState == StatusBarState.SHADE_LOCKED) {
             mScrimController.setKeyguardShowing(true);
-            mIconPolicy.setKeyguardShowing(true);
         } else {
             mScrimController.setKeyguardShowing(false);
-            mIconPolicy.setKeyguardShowing(false);
         }
-
+        mIconPolicy.notifyKeyguardShowingChanged();
         mNotificationPanel.setBarState(mState, mKeyguardFadingAway, goingToFullShade);
         updateDozingState();
         updatePublicMode();
index d32ffa1..d9dd9e2 100644 (file)
@@ -80,6 +80,7 @@ public class PhoneStatusBarPolicy implements Callback, RotationLockController.Ro
     private final StatusBarIconController mIconController;
     private final RotationLockController mRotationLockController;
     private final DataSaverController mDataSaver;
+    private StatusBarKeyguardViewManager mStatusBarKeyguardViewManager;
 
     // Assume it's all good unless we hear otherwise.  We don't always seem
     // to get broadcasts that it *is* there.
@@ -95,7 +96,6 @@ public class PhoneStatusBarPolicy implements Callback, RotationLockController.Ro
     private boolean mManagedProfileIconVisible = false;
     private boolean mManagedProfileInQuietMode = false;
 
-    private boolean mKeyguardVisible = true;
     private BluetoothController mBluetooth;
 
     public PhoneStatusBarPolicy(Context context, StatusBarIconController iconController,
@@ -192,6 +192,11 @@ public class PhoneStatusBarPolicy implements Callback, RotationLockController.Ro
         mDataSaver.addListener(this);
     }
 
+    public void setStatusBarKeyguardViewManager(
+            StatusBarKeyguardViewManager statusBarKeyguardViewManager) {
+        mStatusBarKeyguardViewManager = statusBarKeyguardViewManager;
+    }
+
     public void setZenMode(int zen) {
         mZen = zen;
         updateVolumeZen();
@@ -385,10 +390,9 @@ public class PhoneStatusBarPolicy implements Callback, RotationLockController.Ro
 
     private void updateManagedProfile() {
         if (DEBUG) Log.v(TAG, "updateManagedProfile: mManagedProfileFocused: "
-                + mManagedProfileFocused
-                + " mKeyguardVisible: " + mKeyguardVisible);
+                + mManagedProfileFocused);
         final boolean showIcon;
-        if (mManagedProfileFocused && !mKeyguardVisible) {
+        if (mManagedProfileFocused && !mStatusBarKeyguardViewManager.isShowing()) {
             showIcon = true;
             mIconController.setIcon(mSlotManagedProfile,
                     R.drawable.stat_sys_managed_profile_status,
@@ -461,8 +465,7 @@ public class PhoneStatusBarPolicy implements Callback, RotationLockController.Ro
         updateManagedProfile();
     }
 
-    public void setKeyguardShowing(boolean visible) {
-        mKeyguardVisible = visible;
+    public void notifyKeyguardShowingChanged() {
         updateManagedProfile();
     }
 
index 1edaa0f..8913530 100644 (file)
@@ -1757,6 +1757,9 @@ public class NotificationStackScrollLayout extends ViewGroup
     }
 
     private void startBackgroundAnimation() {
+        // left and right are always instantly applied
+        mCurrentBounds.left = mBackgroundBounds.left;
+        mCurrentBounds.right = mBackgroundBounds.right;
         startBottomAnimation();
         startTopAnimation();
     }
index b60f3e2..69960c7 100644 (file)
@@ -325,9 +325,7 @@ public class DeviceIdleController extends SystemService
         @Override public void onReceive(Context context, Intent intent) {
             switch (intent.getAction()) {
                 case ConnectivityManager.CONNECTIVITY_ACTION: {
-                    synchronized (DeviceIdleController.this) {
-                        updateConnectivityStateLocked(intent);
-                    }
+                    updateConnectivityState(intent);
                 } break;
                 case Intent.ACTION_BATTERY_CHANGED: {
                     synchronized (DeviceIdleController.this) {
@@ -1426,9 +1424,9 @@ public class DeviceIdleController extends SystemService
                 mLocalPowerManager.setDeviceIdleWhitelist(mPowerSaveWhitelistAllAppIdArray);
                 mLocalAlarmManager.setDeviceIdleUserWhitelist(mPowerSaveWhitelistUserAppIdArray);
                 mDisplayManager.registerDisplayListener(mDisplayListener, null);
-                updateConnectivityStateLocked(null);
                 updateDisplayLocked();
             }
+            updateConnectivityState(null);
         }
     }
 
@@ -1707,9 +1705,17 @@ public class DeviceIdleController extends SystemService
         }
     }
 
-    void updateConnectivityStateLocked(Intent connIntent) {
-        if (mConnectivityService != null) {
-            NetworkInfo ni = mConnectivityService.getActiveNetworkInfo();
+    void updateConnectivityState(Intent connIntent) {
+        ConnectivityService cm;
+        synchronized (this) {
+            cm = mConnectivityService;
+        }
+        if (cm == null) {
+            return;
+        }
+        // Note: can't call out to ConnectivityService with our lock held.
+        NetworkInfo ni = cm.getActiveNetworkInfo();
+        synchronized (this) {
             boolean conn;
             if (ni == null) {
                 conn = false;
index b0a00e6..727bf5c 100644 (file)
@@ -82,6 +82,7 @@ import android.os.Handler;
 import android.os.IBinder;
 import android.os.IInterface;
 import android.os.Message;
+import android.os.LocaleList;
 import android.os.Parcel;
 import android.os.Process;
 import android.os.RemoteException;
@@ -97,7 +98,6 @@ import android.util.ArrayMap;
 import android.util.ArraySet;
 import android.util.AtomicFile;
 import android.util.EventLog;
-import android.util.LocaleList;
 import android.util.LruCache;
 import android.util.Pair;
 import android.util.PrintWriterPrinter;
index a066462..a243493 100644 (file)
@@ -170,6 +170,7 @@ import android.os.IBinder;
 import android.os.IPermissionController;
 import android.os.IProcessInfoService;
 import android.os.IProgressListener;
+import android.os.LocaleList;
 import android.os.Looper;
 import android.os.Message;
 import android.os.Parcel;
@@ -205,7 +206,6 @@ import android.util.ArraySet;
 import android.util.AtomicFile;
 import android.util.DebugUtils;
 import android.util.EventLog;
-import android.util.LocaleList;
 import android.util.Log;
 import android.util.Pair;
 import android.util.PrintWriterPrinter;
@@ -7057,6 +7057,15 @@ public final class ActivityManagerService extends ActivityManagerNative
             return ((PendingIntentRecord)target).sendWithResult(code, intent, resolvedType,
                     finishedReceiver, requiredPermission, options);
         } else {
+            if (intent == null) {
+                // Weird case: someone has given us their own custom IIntentSender, and now
+                // they have someone else trying to send to it but of course this isn't
+                // really a PendingIntent, so there is no base Intent, and the caller isn't
+                // supplying an Intent... but we never want to dispatch a null Intent to
+                // a receiver, so um...  let's make something up.
+                Slog.wtf(TAG, "Can't use null intent with direct IIntentSender call");
+                intent = new Intent(Intent.ACTION_MAIN);
+            }
             try {
                 target.send(code, intent, resolvedType, null, requiredPermission, options);
             } catch (RemoteException e) {
index 8ade556..82431e7 100644 (file)
@@ -1725,13 +1725,9 @@ final class ActivityStack {
                     continue;
                 }
                 aboveTop = false;
-                // mLaunchingBehind: Activities launching behind are at the back of the task stack
-                // but must be drawn initially for the animation as though they were visible.
-                final boolean activityVisibleBehind =
-                        (behindTranslucentActivity || stackVisibleBehind) && visibleBehind == r;
-                final boolean isVisible = (!behindFullscreenActivity || r.mLaunchTaskBehind
-                        || activityVisibleBehind) && okToShowLocked(r);
-                if (isVisible) {
+
+                if (shouldBeVisible(r, behindTranslucentActivity, stackVisibleBehind,
+                        visibleBehind, behindFullscreenActivity)) {
                     if (DEBUG_VISIBILITY) Slog.v(TAG_VISIBILITY, "Make visible? " + r
                             + " finishing=" + r.finishing + " state=" + r.state);
                     // First: if this is not the current activity being started, make
@@ -1819,6 +1815,31 @@ final class ActivityStack {
         }
     }
 
+    /** Return true if the input activity should be made visible */
+    private boolean shouldBeVisible(ActivityRecord r, boolean behindTranslucentActivity,
+            boolean stackVisibleBehind, ActivityRecord visibleBehind,
+            boolean behindFullscreenActivity) {
+        // mLaunchingBehind: Activities launching behind are at the back of the task stack
+        // but must be drawn initially for the animation as though they were visible.
+        final boolean activityVisibleBehind =
+                (behindTranslucentActivity || stackVisibleBehind) && visibleBehind == r;
+
+        if (!okToShowLocked(r)) {
+            return false;
+        }
+
+        boolean isVisible =
+                !behindFullscreenActivity || r.mLaunchTaskBehind || activityVisibleBehind;
+
+        if (isVisible && r.isRecentsActivity()) {
+            // Recents activity can only be visible if the home stack isn't fullscreen or is the
+            // focused stack.
+            isVisible = !mFullscreen || mStackSupervisor.isFocusedStack(this);
+        }
+
+        return isVisible;
+    }
+
     private void checkTranslucentActivityWaiting(ActivityRecord top) {
         if (mTranslucentActivityWaiting != top) {
             mUndrawnActivitiesBelowTopTranslucent.clear();
index 96934f0..b4df10f 100644 (file)
@@ -1323,55 +1323,60 @@ public final class BatteryStatsService extends IBatteryStats.Stub
         delta.mTimestamp = latest.getTimeStamp();
         delta.mStackState = latest.getStackState();
 
-        // These times seem to be the most reliable.
-        delta.mControllerTxTimeMs = latest.mControllerTxTimeMs - lastTxMs;
-        delta.mControllerRxTimeMs = latest.mControllerRxTimeMs - lastRxMs;
-
-        // WiFi calculates the idle time as a difference from the on time and the various
-        // Rx + Tx times. There seems to be some missing time there because this sometimes
-        // becomes negative. Just cap it at 0 and move on.
-        // b/21613534
-        delta.mControllerIdleTimeMs = Math.max(0, latest.mControllerIdleTimeMs - lastIdleMs);
-        delta.mControllerEnergyUsed = Math.max(0, latest.mControllerEnergyUsed - lastEnergy);
-
-        if (delta.mControllerTxTimeMs < 0 || delta.mControllerRxTimeMs < 0) {
+        final long txTimeMs = latest.mControllerTxTimeMs - lastTxMs;
+        final long rxTimeMs = latest.mControllerRxTimeMs - lastRxMs;
+        final long idleTimeMs = latest.mControllerIdleTimeMs - lastIdleMs;
+
+        if (txTimeMs < 0 || rxTimeMs < 0) {
             // The stats were reset by the WiFi system (which is why our delta is negative).
             // Returns the unaltered stats.
             delta.mControllerEnergyUsed = latest.mControllerEnergyUsed;
             delta.mControllerRxTimeMs = latest.mControllerRxTimeMs;
             delta.mControllerTxTimeMs = latest.mControllerTxTimeMs;
             delta.mControllerIdleTimeMs = latest.mControllerIdleTimeMs;
-
             Slog.v(TAG, "WiFi energy data was reset, new WiFi energy data is " + delta);
-        }
-
-        // There is some accuracy error in reports so allow some slop in the results.
-        final long SAMPLE_ERROR_MILLIS = 750;
-        final long totalTimeMs = delta.mControllerIdleTimeMs + delta.mControllerRxTimeMs +
-                delta.mControllerTxTimeMs;
-        if (totalTimeMs > timePeriodMs + SAMPLE_ERROR_MILLIS) {
-            StringBuilder sb = new StringBuilder();
-            sb.append("Total time ");
-            TimeUtils.formatDuration(totalTimeMs, sb);
-            sb.append(" is longer than sample period ");
-            TimeUtils.formatDuration(timePeriodMs, sb);
-            sb.append(".\n");
-            sb.append("Previous WiFi snapshot: ").append("idle=");
-            TimeUtils.formatDuration(lastIdleMs, sb);
-            sb.append(" rx=");
-            TimeUtils.formatDuration(lastRxMs, sb);
-            sb.append(" tx=");
-            TimeUtils.formatDuration(lastTxMs, sb);
-            sb.append(" e=").append(lastEnergy);
-            sb.append("\n");
-            sb.append("Current WiFi snapshot: ").append("idle=");
-            TimeUtils.formatDuration(latest.mControllerIdleTimeMs, sb);
-            sb.append(" rx=");
-            TimeUtils.formatDuration(latest.mControllerRxTimeMs, sb);
-            sb.append(" tx=");
-            TimeUtils.formatDuration(latest.mControllerTxTimeMs, sb);
-            sb.append(" e=").append(latest.mControllerEnergyUsed);
-            Slog.wtf(TAG, sb.toString());
+        } else {
+            final long totalActiveTimeMs = txTimeMs + rxTimeMs;
+            long maxExpectedIdleTimeMs;
+            // Active time can never be greater than the total time, the stats received seem
+            // to be corrupt.
+            if (totalActiveTimeMs > timePeriodMs) {
+                maxExpectedIdleTimeMs = timePeriodMs;
+                StringBuilder sb = new StringBuilder();
+                sb.append("Total Active time ");
+                TimeUtils.formatDuration(totalActiveTimeMs, sb);
+                sb.append(" is longer than sample period ");
+                TimeUtils.formatDuration(timePeriodMs, sb);
+                sb.append(".\n");
+                sb.append("Previous WiFi snapshot: ").append("idle=");
+                TimeUtils.formatDuration(lastIdleMs, sb);
+                sb.append(" rx=");
+                TimeUtils.formatDuration(lastRxMs, sb);
+                sb.append(" tx=");
+                TimeUtils.formatDuration(lastTxMs, sb);
+                sb.append(" e=").append(lastEnergy);
+                sb.append("\n");
+                sb.append("Current WiFi snapshot: ").append("idle=");
+                TimeUtils.formatDuration(latest.mControllerIdleTimeMs, sb);
+                sb.append(" rx=");
+                TimeUtils.formatDuration(latest.mControllerRxTimeMs, sb);
+                sb.append(" tx=");
+                TimeUtils.formatDuration(latest.mControllerTxTimeMs, sb);
+                sb.append(" e=").append(latest.mControllerEnergyUsed);
+                Slog.wtf(TAG, sb.toString());
+            } else {
+                maxExpectedIdleTimeMs = timePeriodMs - totalActiveTimeMs;
+            }
+            // These times seem to be the most reliable.
+            delta.mControllerTxTimeMs = txTimeMs;
+            delta.mControllerRxTimeMs = rxTimeMs;
+            // WiFi calculates the idle time as a difference from the on time and the various
+            // Rx + Tx times. There seems to be some missing time there because this sometimes
+            // becomes negative. Just cap it at 0 and ensure that it is less than the expected idle
+            // time from the difference in timestamps.
+            // b/21613534
+            delta.mControllerIdleTimeMs = Math.min(maxExpectedIdleTimeMs, Math.max(0, idleTimeMs));
+            delta.mControllerEnergyUsed = Math.max(0, latest.mControllerEnergyUsed - lastEnergy);
         }
 
         mLastInfo = latest;
index 1222f54..0acc2a0 100644 (file)
@@ -38,7 +38,6 @@ import android.content.pm.PackageManager;
 import android.content.pm.ResolveInfo;
 import android.os.Build;
 import android.os.Bundle;
-import android.os.DeadObjectException;
 import android.os.Handler;
 import android.os.IBinder;
 import android.os.Looper;
index c649012..b5d5486 100644 (file)
@@ -18,7 +18,7 @@ package com.android.server.input;
 
 import android.annotation.NonNull;
 import android.annotation.Nullable;
-import android.util.LocaleList;
+import android.os.LocaleList;
 import android.view.Display;
 import com.android.internal.inputmethod.InputMethodSubtypeHandle;
 import com.android.internal.os.SomeArgs;
index 29b9b92..a77d512 100644 (file)
@@ -380,6 +380,10 @@ public class ImmersiveModeConfirmation {
         @Override
         public void onVrStateChanged(boolean enabled) throws RemoteException {
             mVrModeEnabled = enabled;
+            if (mVrModeEnabled) {
+                mHandler.removeMessages(H.SHOW);
+                mHandler.sendEmptyMessage(H.HIDE);
+            }
         }
     };
 }
index d2d9363..7a387ad 100644 (file)
@@ -606,12 +606,7 @@ public class DockedStackDividerController implements DimLayerUser {
     private void setMinimizedDockedStack(boolean minimized) {
         final TaskStack stack = mDisplayContent.getDockedStackVisibleForUserLocked();
         notifyDockedStackMinimizedChanged(minimized, 0);
-        if (stack == null) {
-            return;
-        }
-        if (stack.setAdjustedForMinimizedDock(minimized ? 1f : 0f)) {
-            mService.mWindowPlacerLocked.performSurfacePlacement();
-        }
+        setMinimizeAmount(stack, minimized ? 1f : 0f);
     }
 
     private boolean isAnimationMaximizing() {
@@ -695,11 +690,8 @@ public class DockedStackDividerController implements DimLayerUser {
         float t = Math.min(1f, (float) (now - mAnimationStartTime) / mAnimationDuration);
         t = (isAnimationMaximizing() ? TOUCH_RESPONSE_INTERPOLATOR : mMinimizedDockInterpolator)
                 .getInterpolation(t);
-        if (stack != null) {
-            if (stack.setAdjustedForMinimizedDock(getMinimizeAmount(stack, t))) {
-                mService.mWindowPlacerLocked.performSurfacePlacement();
-            }
-        }
+        setMinimizeAmount(stack, getMinimizeAmount(stack, t));
+
         if (t >= 1.0f) {
             mAnimatingForMinimizedDockedStack = false;
             return false;
@@ -708,6 +700,42 @@ public class DockedStackDividerController implements DimLayerUser {
         }
     }
 
+    void setMinimizeAmount(TaskStack dockedStack, float minimizeAmount) {
+        final ArrayList<TaskStack> stacks = mDisplayContent.getStacks();
+
+        // If the docked stack is not visible, clear the complementary stack on all stacks.
+        if (dockedStack == null) {
+            for (int i = stacks.size() - 1; i >= 0; --i) {
+                final TaskStack stack = stacks.get(i);
+                stack.resetAdjustedForComplementDock();
+            }
+            return;
+        }
+
+        // Otherwise if the docked stack minimize amount has changed, update the adjusted bounds
+        // on the other stack that's currently visible, so that the stack's getDimBounds()
+        // occupies what's left by the docked stack. This is needed so that stuff like wallpaper
+        // gets cropped properly to the area left by the dock.
+        if (dockedStack.setAdjustedForMinimizedDock(minimizeAmount)) {
+            final boolean adjusted =
+                    dockedStack.isVisibleForUserLocked() && minimizeAmount != 0.0f;
+            dockedStack.getDimBounds(mTmpRect2);
+            int dockSide = dockedStack.getDockSide();
+            for (int i = stacks.size() - 1; i >= 0; --i) {
+                final TaskStack stack = stacks.get(i);
+                if (stack == dockedStack) {
+                    continue;
+                }
+                if (stack.isVisibleLocked() && adjusted) {
+                    stack.setAdjustedForComplementDock(mTmpRect2, dockSide);
+                } else {
+                    stack.resetAdjustedForComplementDock();
+                }
+            }
+            mService.mWindowPlacerLocked.performSurfacePlacement();
+        }
+    }
+
     private float getInterpolatedAnimationValue(float t) {
         return t * mAnimationTarget + (1 - t) * mAnimationStart;
     }
index 1852b4c..eb8c1dc 100644 (file)
@@ -122,6 +122,7 @@ public class TaskStack implements DimLayer.DimLayerUser,
     private float mAdjustImeAmount;
     private float mAdjustDividerAmount;
     private final int mDockedStackMinimizeThickness;
+    private boolean mAdjustedForForComplementDock;
 
     // If this is true, we are in the bounds animating mode.
     // The task will be down or upscaled to perfectly fit the
@@ -247,7 +248,9 @@ public class TaskStack implements DimLayer.DimLayerUser,
                 insetBounds = mFullyAdjustedImeBounds;
             }
         }
-        alignTasksToAdjustedBounds(adjusted ? mAdjustedBounds : mBounds, insetBounds);
+        if (!mAdjustedForForComplementDock) {
+            alignTasksToAdjustedBounds(adjusted ? mAdjustedBounds : mBounds, insetBounds);
+        }
         mDisplayContent.layoutNeeded = true;
     }
 
@@ -854,6 +857,7 @@ public class TaskStack implements DimLayer.DimLayerUser,
         mImeWin = imeWin;
         mImeGoingAway = false;
         if (!mAdjustedForIme || forceUpdate) {
+            mAdjustedForForComplementDock = false;
             mAdjustedForIme = true;
             mAdjustImeAmount = 0f;
             mAdjustDividerAmount = 0f;
@@ -916,10 +920,12 @@ public class TaskStack implements DimLayer.DimLayerUser,
      * @return Whether the amount has changed and a layout is needed.
      */
     boolean setAdjustedForMinimizedDock(float minimizeAmount) {
+        mAdjustedForForComplementDock = false;
+
         if (minimizeAmount != mMinimizeAmount) {
             mMinimizeAmount = minimizeAmount;
             updateAdjustedBounds();
-            return isVisibleForUserLocked();
+            return true;
         } else {
             return false;
         }
@@ -929,6 +935,33 @@ public class TaskStack implements DimLayer.DimLayerUser,
         return mMinimizeAmount != 0f;
     }
 
+    void setAdjustedForComplementDock(Rect dockBounds, int dockSide) {
+        if (mMinimizeAmount != 0f || mAdjustedForIme) {
+            return;
+        }
+        mTmpAdjustedBounds.set(mBounds);
+        if (dockSide == DOCKED_TOP) {
+            mTmpAdjustedBounds.top = dockBounds.bottom;
+        } else if (dockSide == DOCKED_LEFT) {
+            mTmpAdjustedBounds.left = dockBounds.right;
+        } else if (dockSide == DOCKED_RIGHT) {
+            mTmpAdjustedBounds.right = dockBounds.left;
+        } else {
+            Slog.w(TAG_WM, "setAdjustedForComplementDock: invalid dock side " + dockSide);
+            return;
+        }
+        mAdjustedForForComplementDock = true;
+        setAdjustedBounds(mTmpAdjustedBounds);
+    }
+
+    void resetAdjustedForComplementDock() {
+        if (mAdjustedForForComplementDock) {
+            mAdjustedForForComplementDock = false;
+            mTmpAdjustedBounds.setEmpty();
+            setAdjustedBounds(mTmpAdjustedBounds);
+        }
+    }
+
     /**
      * Puts all visible tasks that are adjusted for IME into resizing mode and adds the windows
      * to the list of to be drawn windows the service is waiting for.
@@ -1089,7 +1122,7 @@ public class TaskStack implements DimLayer.DimLayerUser,
         }
         setAdjustedBounds(mTmpAdjustedBounds);
 
-        final boolean isImeTarget = (mService.getImeTargetStackLocked() == this);
+        final boolean isImeTarget = (mService.getImeFocusStackLocked() == this);
         if (mAdjustedForIme && adjust && !isImeTarget) {
             final float alpha = Math.max(mAdjustImeAmount, mAdjustDividerAmount)
                     * IME_ADJUST_DIM_AMOUNT;
index 5305fe2..ca8b7e5 100644 (file)
@@ -7581,7 +7581,7 @@ public class WindowManagerService extends IWindowManager.Stub
         final WindowState imeWin = mInputMethodWindow;
         final boolean imeVisible = imeWin != null && imeWin.isVisibleLw() && imeWin.isDisplayedLw();
         final boolean dockVisible = isStackVisibleLocked(DOCKED_STACK_ID);
-        final TaskStack imeTargetStack = getImeTargetStackLocked();
+        final TaskStack imeTargetStack = getImeFocusStackLocked();
         final int imeDockSide = (dockVisible && imeTargetStack != null) ?
                 imeTargetStack.getDockSide() : DOCKED_INVALID;
         final boolean imeOnTop = (imeDockSide == DOCKED_TOP);
@@ -7750,10 +7750,13 @@ public class WindowManagerService extends IWindowManager.Stub
         return mCurrentFocus;
     }
 
-    TaskStack getImeTargetStackLocked() {
-        // Don't use WindowState.getStack() because it returns home stack for system windows.
-        Task imeTask = mInputMethodTarget != null ? mInputMethodTarget.getTask() : null;
-        return imeTask != null ? imeTask.mStack : null;
+    TaskStack getImeFocusStackLocked() {
+        // Don't use mCurrentFocus.getStack() because it returns home stack for system windows.
+        // Also don't use mInputMethodTarget's stack, because some window with FLAG_NOT_FOCUSABLE
+        // and FLAG_ALT_FOCUSABLE_IM flags both set might be set to IME target so they're moved
+        // to make room for IME, but the window is not the focused window that's taking input.
+        return (mFocusedApp != null && mFocusedApp.mTask != null) ?
+                mFocusedApp.mTask.mStack : null;
     }
 
     private void showAuditSafeModeNotification() {